apps/bttester: refactor GATT Client service

Accomodated to new API.
This commit is contained in:
Krzysztof Kopyściński
2023-07-26 19:38:24 +02:00
committed by Szymon Janc
parent 8abb2ecef8
commit 7d25c1c718
4 changed files with 375 additions and 322 deletions
+3
View File
@@ -34,6 +34,9 @@ struct btp_gattc_read_supported_commands_rp {
} __packed;
#define BTP_GATTC_EXCHANGE_MTU 0x02
struct btp_gattc_exchange_mtu_cmd {
ble_addr_t address;
} __packed;
#define BTP_GATTC_DISC_ALL_PRIM_SVCS 0x03
struct btp_gattc_disc_all_prim_svcs_cmd {
+4 -4
View File
@@ -100,9 +100,6 @@ uint8_t
tester_init_gatt(void);
uint8_t
tester_unregister_gatt(void);
void
tester_handle_gattc(uint8_t opcode, uint8_t *data,
uint16_t len);
int
tester_gattc_notify_rx_ev(uint16_t conn_handle, uint16_t attr_handle,
uint8_t indication, struct os_mbuf *om);
@@ -128,7 +125,10 @@ tester_init_mesh(void);
uint8_t
tester_unregister_mesh(void);
#endif /* MYNEWT_VAL(BLE_MESH) */
uint8_t
tester_init_gatt_cl(void);
uint8_t
tester_unregister_gatt_cl(void);
void
gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *arg);
+6
View File
@@ -101,6 +101,9 @@ register_service(const void *cmd, uint16_t cmd_len,
case BTP_SERVICE_ID_MESH:
status = tester_init_mesh();
break;
case BTP_SERVICE_ID_GATTC:
status = tester_init_gatt_cl();
break;
#endif /* MYNEWT_VAL(BLE_MESH) */
default:
status = BTP_STATUS_FAILED;
@@ -148,6 +151,9 @@ unregister_service(const void *cmd, uint16_t cmd_len,
status = tester_unregister_mesh();
break;
#endif /* MYNEWT_VAL(BLE_MESH) */
case BTP_SERVICE_ID_GATTC:
status = tester_unregister_gatt_cl();
break;
default:
status = BTP_STATUS_FAILED;
break;
File diff suppressed because it is too large Load Diff