From 36b60e250da45ab958564c4823b9abd4909fc9c3 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sun, 20 Nov 2022 18:04:45 +1100 Subject: [PATCH] rough status handler done --- source/Core/BSP/Pinecilv2/ble_handlers.cpp | 4 ++-- source/Core/BSP/Pinecilv2/ble_handlers.h | 2 +- source/Core/BSP/Pinecilv2/ble_peripheral.c | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/Core/BSP/Pinecilv2/ble_handlers.cpp b/source/Core/BSP/Pinecilv2/ble_handlers.cpp index ce2763fa..be1c717f 100644 --- a/source/Core/BSP/Pinecilv2/ble_handlers.cpp +++ b/source/Core/BSP/Pinecilv2/ble_handlers.cpp @@ -25,9 +25,9 @@ #include "power.hpp" /************************************************************************* NAME - ble_char_read_callback + ble_char_read_status_callback */ - int ble_char_read_callback(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, u16_t len, u16_t offset) { + int ble_char_read_status_callback(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, u16_t len, u16_t offset) { if (attr == NULL || attr->uuid == NULL) { return 0; } diff --git a/source/Core/BSP/Pinecilv2/ble_handlers.h b/source/Core/BSP/Pinecilv2/ble_handlers.h index 1d4f119c..54421ec4 100644 --- a/source/Core/BSP/Pinecilv2/ble_handlers.h +++ b/source/Core/BSP/Pinecilv2/ble_handlers.h @@ -7,7 +7,7 @@ extern "C" { #endif -int ble_char_read_callback(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, u16_t len, u16_t offset); +int ble_char_read_status_callback(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, u16_t len, u16_t offset); int ble_tp_recv_wr(struct bt_conn *conn, const struct bt_gatt_attr *attr, const void *buf, u16_t len, u16_t offset, u8_t flags); #ifdef __cplusplus diff --git a/source/Core/BSP/Pinecilv2/ble_peripheral.c b/source/Core/BSP/Pinecilv2/ble_peripheral.c index e70d8a61..44d2d09e 100644 --- a/source/Core/BSP/Pinecilv2/ble_peripheral.c +++ b/source/Core/BSP/Pinecilv2/ble_peripheral.c @@ -145,12 +145,12 @@ static void ble_tp_ind_ccc_changed(const struct bt_gatt_attr *attr, u16_t value) static struct bt_gatt_attr attrs[] = { BT_GATT_PRIMARY_SERVICE(BT_UUID_SVC_LIVE_DATA), - BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_LIVE_LIVE_TEMP, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, ble_char_read_callback, NULL, NULL), - BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_LIVE_SETPOINT_TEMP, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, ble_char_read_callback, NULL, NULL), - BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_LIVE_DC_INPUT, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, ble_char_read_callback, NULL, NULL), - BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_LIVE_HANDLE_TEMP, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, ble_char_read_callback, NULL, NULL), - BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_LIVE_POWER_LEVEL, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, ble_char_read_callback, NULL, NULL), - BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_LIVE_POWER_SRC, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, ble_char_read_callback, NULL, NULL), + BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_LIVE_LIVE_TEMP, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, ble_char_read_status_callback, NULL, NULL), + BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_LIVE_SETPOINT_TEMP, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, ble_char_read_status_callback, NULL, NULL), + BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_LIVE_DC_INPUT, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, ble_char_read_status_callback, NULL, NULL), + BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_LIVE_HANDLE_TEMP, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, ble_char_read_status_callback, NULL, NULL), + BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_LIVE_POWER_LEVEL, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, ble_char_read_status_callback, NULL, NULL), + BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_LIVE_POWER_SRC, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, ble_char_read_status_callback, NULL, NULL), BT_GATT_PRIMARY_SERVICE(BT_UUID_SVC_SETTINGS_DATA), };