mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-18 05:42:49 +00:00
att_db_util: Add API to specify next attribute handle. (#647)
Co-authored-by: Alex McHugh <alex.mchugh@allient.com>
This commit is contained in:
parent
b7aa69761a
commit
12f6b60600
@ -89,6 +89,11 @@ void att_db_util_init(void){
|
|||||||
att_db_util_set_end_tag();
|
att_db_util_set_end_tag();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void att_db_util_set_next_handle(uint16_t handle){
|
||||||
|
btstack_assert(handle >= att_db_next_handle); // do not reuse assigned handles
|
||||||
|
att_db_next_handle = handle;
|
||||||
|
}
|
||||||
|
|
||||||
static bool att_db_util_hash_include_with_value(uint16_t uuid16){
|
static bool att_db_util_hash_include_with_value(uint16_t uuid16){
|
||||||
/* «Primary Service», «Secondary Service», «Included Service», «Characteristic», or «Characteristic Extended Properties» */
|
/* «Primary Service», «Secondary Service», «Included Service», «Characteristic», or «Characteristic Extended Properties» */
|
||||||
switch (uuid16){
|
switch (uuid16){
|
||||||
|
@ -61,6 +61,13 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
void att_db_util_init(void);
|
void att_db_util_init(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set handle value for next table entry
|
||||||
|
* @param handle
|
||||||
|
* @note new handle must be >= previous to avoid reusing assigned handles
|
||||||
|
*/
|
||||||
|
void att_db_util_set_next_handle(uint16_t handle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Add primary service for 16-bit UUID
|
* @brief Add primary service for 16-bit UUID
|
||||||
* @param uuid16
|
* @param uuid16
|
||||||
|
Loading…
x
Reference in New Issue
Block a user