mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-20 18:40:31 +00:00
btstack_uart_block: add set_wakeup_handler to allow wake up notifications
This commit is contained in:
parent
c4e86052e3
commit
c3dafd4604
@ -156,7 +156,8 @@ static const btstack_uart_block_t btstack_uart_embedded = {
|
||||
/* void (*receive_block)(uint8_t *buffer, uint16_t len); */ &btstack_uart_embedded_receive_block,
|
||||
/* void (*send_block)(const uint8_t *buffer, uint16_t length); */ &btstack_uart_embedded_send_block,
|
||||
/* int (*get_supported_sleep_modes); */ NULL,
|
||||
/* void (*set_sleep)(btstack_uart_sleep_mode_t sleep_mode); */ NULL
|
||||
/* void (*set_sleep)(btstack_uart_sleep_mode_t sleep_mode); */ NULL,
|
||||
/* void (*set_wakeup_handler)(void (*handler)(void)); */ NULL,
|
||||
};
|
||||
|
||||
const btstack_uart_block_t * btstack_uart_block_embedded_instance(void){
|
||||
|
@ -380,7 +380,8 @@ static const btstack_uart_block_t btstack_uart_posix = {
|
||||
/* void (*receive_block)(uint8_t *buffer, uint16_t len); */ &btstack_uart_posix_receive_block,
|
||||
/* void (*send_block)(const uint8_t *buffer, uint16_t length); */ &btstack_uart_posix_send_block,
|
||||
/* int (*get_supported_sleep_modes); */ NULL,
|
||||
/* void (*set_sleep)(btstack_uart_sleep_mode_t sleep_mode); */ NULL
|
||||
/* void (*set_sleep)(btstack_uart_sleep_mode_t sleep_mode); */ NULL,
|
||||
/* void (*set_wakeup_handler)(void (*handler)(void)); */ NULL,
|
||||
};
|
||||
|
||||
const btstack_uart_block_t * btstack_uart_block_posix_instance(void){
|
||||
|
@ -411,7 +411,8 @@ static const btstack_uart_block_t btstack_uart_windows = {
|
||||
/* void (*receive_block)(uint8_t *buffer, uint16_t len); */ &btstack_uart_windows_receive_block,
|
||||
/* void (*send_block)(const uint8_t *buffer, uint16_t length); */ &btstack_uart_windows_send_block,
|
||||
/* int (*get_supported_sleep_modes); */ NULL,
|
||||
/* void (*set_sleep)(btstack_uart_sleep_mode_t sleep_mode); */ NULL
|
||||
/* void (*set_sleep)(btstack_uart_sleep_mode_t sleep_mode); */ NULL,
|
||||
/* void (*set_wakeup_handler)(void (*handler)(void)); */ NULL,
|
||||
};
|
||||
|
||||
const btstack_uart_block_t * btstack_uart_block_windows_instance(void){
|
||||
|
@ -323,7 +323,8 @@ static const btstack_uart_block_t btstack_uart_block_wiced = {
|
||||
/* void (*receive_block)(uint8_t *buffer, uint16_t len); */ &btstack_uart_block_wiced_receive_block,
|
||||
/* void (*send_block)(const uint8_t *buffer, uint16_t length); */ &btstack_uart_block_wiced_send_block,
|
||||
/* int (*get_supported_sleep_modes); */ NULL,
|
||||
/* void (*set_sleep)(btstack_uart_sleep_mode_t sleep_mode); */ NULL
|
||||
/* void (*set_sleep)(btstack_uart_sleep_mode_t sleep_mode); */ NULL,
|
||||
/* void (*set_wakeup_handler)(void (*handler)(void)); */ NULL,
|
||||
};
|
||||
|
||||
const btstack_uart_block_t * btstack_uart_block_wiced_instance(void){
|
||||
|
@ -132,6 +132,12 @@ typedef struct {
|
||||
*/
|
||||
void (*set_sleep)(btstack_uart_sleep_mode_t sleep_mode);
|
||||
|
||||
/**
|
||||
* set wakeup handler - needed to notify hci transport of wakeup requests by Bluetooth controller
|
||||
* Called upon CTS pulse or RX data. See sleep modes.
|
||||
*/
|
||||
void (*set_wakeup_handler)(void (*wakeup_handler)(void));
|
||||
|
||||
} btstack_uart_block_t;
|
||||
|
||||
// common implementations
|
||||
|
Loading…
x
Reference in New Issue
Block a user