This file provides a mechanism to buffer connection-table-change-events from the btstack. This is needed since the callback call from the btstack should return as soon as possible, running on the high priority btstack thread. Further event handling is done in a seperate thread which calls con_event_listen().
#include <bt/bt_defs.h>
Data Structures | |
struct | _con_event_info |
struct | _event_entry |
struct | _event_fifo |
Defines | |
#define | MAX_CON_CHANGE_EVENT_ENTRY 10 |
Typedefs | |
typedef _con_event_info | con_event_info_t |
typedef _event_entry | event_entry_t |
typedef _event_fifo | event_fifo_t |
Functions | |
void | con_event_buffer_init (struct btstack *bt_stack, HCI_CON_TABLE_CB_REGISTRATION) |
initializes the connection event buffer and registers itself to the btstack. | |
void | con_event_buffer_register_con_table_cb (struct btstack *bt_stack, HCI_CON_TABLE_CB, void *cb_arg) |
void | con_event_listen (void) |
starts listening to connection table changes. This function adjusts the connection properties and calls the registered callback function. | |
Variables | |
con_event_info_t * | _con_event_info |
void con_event_buffer_init | ( | struct btstack * | bt_stack, | |
HCI_CON_TABLE_CB_REGISTRATION | ||||
) |
initializes the connection event buffer and registers itself to the btstack.
bt_stack | pointer to the btstack. |
void con_event_buffer_register_con_table_cb | ( | struct btstack * | bt_stack, | |
HCI_CON_TABLE_CB | , | |||
void * | cb_arg | |||
) |
Registers external function cb, wich will be called on connection table changes. Function cb will run in the context of the thread which called con_event_listen().
void con_event_listen | ( | void | ) |
starts listening to connection table changes. This function adjusts the connection properties and calls the registered callback function.