From 68240704c7a60534342cfc0157564f11cf82d9d8 Mon Sep 17 00:00:00 2001 From: JF Date: Wed, 25 Mar 2020 21:23:40 +0100 Subject: Add support for BLE notification (ANS client). Work In Progress!!! --- src/BLE/BleManager.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/BLE/BleManager.h') diff --git a/src/BLE/BleManager.h b/src/BLE/BleManager.h index 4424d665..e3b9faf3 100644 --- a/src/BLE/BleManager.h +++ b/src/BLE/BleManager.h @@ -31,6 +31,8 @@ extern "C" { #define NEXT_CONN_PARAMS_UPDATE_DELAY 30000 /* Time between each call to sd_ble_gap_conn_param_update after the first call (30 seconds). */ #define MAX_CONN_PARAMS_UPDATE_COUNT 3 /* Number of attempts before giving up the connection parameter negotiation. */ +#define MESSAGE_BUFFER_SIZE 18 /**< Size of buffer holding optional messages in notifications. */ +#define BLE_ANS_NB_OF_CATEGORY_ID 10 /**< Number of categories. */ void ble_manager_init(); void ble_manager_start_advertising(void *p_erase_bonds); @@ -41,6 +43,8 @@ void ble_manager_set_new_time_callback(void (*OnNewTime)(current_time_char_t* cu void ble_manager_set_ble_disconnection_callback(void (*OnBleDisconnection)()); void ble_manager_set_ble_connection_callback(void (*OnBleConnection)()); +void ble_manager_set_new_notification_callback(void (*OnNewNotification)(const char* message, uint8_t size)); + #ifdef __cplusplus } -- cgit v1.2.3-70-g09d2