Data Structures | |
struct | ble_serial_open_t |
The structure of transmission channel open. More... | |
struct | ble_serial_tran_data_t |
The structure of transmission data. More... | |
struct | ble_serial_tran_error_t |
The structure of transmission data. More... | |
struct | ble_serial_close_t |
The structure of transmission channel close. More... | |
struct | ble_serial_tran_export_t |
The structure of transmission export. More... | |
Macros | |
#define | BLE_DFU_CATEID 0x01 |
#define | BLE_CONSOLE_CATEID 0x02 |
#define | BLE_CUSTOMIZE_CATEID 0x10 |
#define | BLE_LOG_CATEID 0x03 |
#define | BLE_WATCHFACE_CATEID 0x04 |
#define | BLE_EQ_CONFIG_CATEID 0x05 |
#define | serial_tran_svc_uuid |
#define | serial_tran_configure_uuid |
#define | serial_tran_data_uuid |
#define | BLE_SERIAL_TRAN_EXPORT(cate_id, callback) |
The macro that register user categoryID and callback. More... | |
Enumerations | |
enum | ble_serial_tran_event_t { BLE_SERIAL_TRAN_OPEN, BLE_SERIAL_TRAN_DATA, BLE_SERIAL_TRAN_SEND_AVAILABLE, BLE_SERIAL_TRAN_CLOSE, BLE_SERIAL_TRAN_ERROR } |
The structure of transmission event. More... | |
enum | ble_serial_tran_error_event_t { BLE_SERIAL_TRAN_ERROR_CATE_ID, BLE_SERIAL_TRAN_ERROR_LACK_OF_MEMORY, BLE_SERIAL_TRAN_ERROR_ASSEMBLE_OVER_LEN, BLE_SERIAL_TRAN_ERROR_ASSEMBLE_ERROR } |
Functions | |
int | ble_serial_tran_send_data (ble_serial_tran_data_t *data) |
Send serial transmission data. More... | |
void | ble_serial_tran_init (void) |
Enable serial transmission service. | |
int | rt_ble_serial_dev_register (const char *name) |
Register serial device for BLE serial service. More... | |
int | ble_serial_tran_send_data_advance (uint8_t handle, uint8_t *data, uint16_t data_len) |
#define BLE_SERIAL_TRAN_EXPORT | ( | cate_id, | |
callback | |||
) |
The macro that register user categoryID and callback.
[in] | cate_id | categoryID. |
[in] | callback | user callback. |
#define serial_tran_configure_uuid |
#define serial_tran_data_uuid |
#define serial_tran_svc_uuid |
The structure of transmission event.
int ble_serial_tran_send_data | ( | ble_serial_tran_data_t * | data | ) |
Send serial transmission data.
[in] | data | serial transmission data. |
result | 0 is successful, others are failed. |
int rt_ble_serial_dev_register | ( | const char * | name | ) |
Register serial device for BLE serial service.
[in] | name | for the device. |
result | 0 is successful, others are failed. |