summaryrefslogtreecommitdiff
path: root/src/BLE/BleManager.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-04-05 18:59:15 +0200
committerGitea <gitea@fake.local>2020-04-05 18:59:15 +0200
commit6e1bd118c5ecc53016548072501591b329500870 (patch)
tree8447f6b7bbff0f423e9cf5d15ed709c630bed25e /src/BLE/BleManager.h
parent7e9a7e4d5fa0f55b43180600d499f1d0ce6aded1 (diff)
parentd5c2a58914fdeac4ef69382269b81d529e6d7c90 (diff)
Merge branch 'ble-notifications' of JF/PineTime into develop
Diffstat (limited to 'src/BLE/BleManager.h')
-rw-r--r--src/BLE/BleManager.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/BLE/BleManager.h b/src/BLE/BleManager.h
index 4424d665..da5f8e3f 100644
--- a/src/BLE/BleManager.h
+++ b/src/BLE/BleManager.h
@@ -10,7 +10,7 @@ extern "C" {
#define BLE_MANAGER_DEVICE_NAME "PineTime" /* Name of device. Will be included in the advertising data.*/
#define BLE_MANAGER_MANUFACTURER_NAME "Codingfield"
-#define BLE_MANAGER_MIN_CONN_INTERVAL MSEC_TO_UNITS(400, UNIT_1_25_MS) /* Minimum acceptable connection interval (0.4 seconds).*/
+#define BLE_MANAGER_MIN_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS) /* Minimum acceptable connection interval (0.4 seconds).*/
#define BLE_MANAGER_MAX_CONN_INTERVAL MSEC_TO_UNITS(650, UNIT_1_25_MS) /*Maximum acceptable connection interval (0.65 second).*/
#define BLE_MANAGER_SLAVE_LATENCY 0 /* Slave latency.*/
#define BLE_MANAGER_CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS) /* Connection supervisory time-out (4 seconds).*/
@@ -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
}