first commit
This commit is contained in:
18
main/include/ble_client.h
Normal file
18
main/include/ble_client.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
#ifndef BLE_CLIENT_H
|
||||
#define BLE_CLIENT_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
void ble_client_init(void);
|
||||
bool ble_client_is_ready(void);
|
||||
uint16_t ble_client_max_payload(void);
|
||||
int ble_client_send(const uint8_t *data, size_t len);
|
||||
|
||||
#endif // BLE_CLIENT_H
|
||||
37
main/include/common.h
Executable file
37
main/include/common.h
Executable file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
|
||||
/* Includes */
|
||||
/* STD APIs */
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/* ESP APIs */
|
||||
#include "esp_log.h"
|
||||
#include "nvs_flash.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
/* FreeRTOS APIs */
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/task.h>
|
||||
|
||||
/* NimBLE stack APIs */
|
||||
#include "host/ble_hs.h"
|
||||
#include "host/ble_uuid.h"
|
||||
#include "host/util/util.h"
|
||||
#include "nimble/ble.h"
|
||||
#include "nimble/nimble_port.h"
|
||||
#include "nimble/nimble_port_freertos.h"
|
||||
|
||||
/* Defines */
|
||||
#define TAG "BLE_UART_BRIDGE"
|
||||
#define DEVICE_NAME "ESP32-BLE-UART"
|
||||
|
||||
#endif // COMMON_H
|
||||
15
main/include/uart_bridge.h
Normal file
15
main/include/uart_bridge.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
#ifndef UART_BRIDGE_H
|
||||
#define UART_BRIDGE_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
void uart_bridge_init(void);
|
||||
void uart_bridge_write(const uint8_t *data, size_t len);
|
||||
|
||||
#endif // UART_BRIDGE_H
|
||||
Reference in New Issue
Block a user