mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-30 15:32:41 +00:00
gatt-services/battery_service_client: use btstack_next_cid_ignoring_zero
This commit is contained in:
parent
6a79f6bafc
commit
9eca220635
@ -68,11 +68,7 @@ static void handle_gatt_client_event(uint8_t packet_type, uint16_t channel, uint
|
|||||||
static void battery_service_poll_timer_start(battery_service_client_t * client);
|
static void battery_service_poll_timer_start(battery_service_client_t * client);
|
||||||
|
|
||||||
static uint16_t battery_service_get_next_cid(void){
|
static uint16_t battery_service_get_next_cid(void){
|
||||||
if (battery_service_cid_counter == 0xffff) {
|
battery_service_cid_counter = btstack_next_cid_ignoring_zero(battery_service_cid_counter);
|
||||||
battery_service_cid_counter = 1;
|
|
||||||
} else {
|
|
||||||
battery_service_cid_counter++;
|
|
||||||
}
|
|
||||||
return battery_service_cid_counter;
|
return battery_service_cid_counter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user