mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-03 07:13:51 +00:00
ble/gatt_client: use bool instead of int in internal function
This commit is contained in:
parent
d68300f919
commit
aacf1b1ab9
@ -194,14 +194,14 @@ static gatt_client_t * gatt_client_provide_context_for_handle_and_start_timer(hc
|
||||
return gatt_client;
|
||||
}
|
||||
|
||||
static int is_ready(gatt_client_t * gatt_client){
|
||||
static bool is_ready(gatt_client_t * gatt_client){
|
||||
return gatt_client->gatt_client_state == P_READY;
|
||||
}
|
||||
|
||||
int gatt_client_is_ready(hci_con_handle_t con_handle){
|
||||
gatt_client_t * gatt_client = gatt_client_provide_context_for_handle(con_handle);
|
||||
if (gatt_client == NULL) return 0;
|
||||
return is_ready(gatt_client);
|
||||
return is_ready(gatt_client) ? 1 : 0;
|
||||
}
|
||||
|
||||
void gatt_client_mtu_enable_auto_negotiation(uint8_t enabled){
|
||||
|
@ -272,7 +272,7 @@ void gatt_client_mtu_enable_auto_negotiation(uint8_t enabled);
|
||||
void gatt_client_send_mtu_negotiation(btstack_packet_handler_t callback, hci_con_handle_t con_handle);
|
||||
|
||||
/**
|
||||
* @brief Returns if the GATT client is ready to receive a query. It is used with daemon.
|
||||
* @brief Returns 1 if the GATT client is ready to receive a query. It is used with daemon.
|
||||
* @param con_handle
|
||||
* @return is_ready_status 0 - if no GATT client for con_handle is found, or is not ready, otherwise 1
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user