mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-06 03:40:16 +00:00
btstack_uart_posix: assert no pending read/write opration
This commit is contained in:
parent
6c9f72810b
commit
efef2dd3af
@ -380,6 +380,8 @@ static void btstack_uart_posix_set_block_sent( void (*block_handler)(void)){
|
||||
}
|
||||
|
||||
static void btstack_uart_posix_send_block(const uint8_t *data, uint16_t size){
|
||||
btstack_assert(btstack_uart_block_write_bytes_len == 0);
|
||||
|
||||
// setup async write
|
||||
btstack_uart_block_write_bytes_data = data;
|
||||
btstack_uart_block_write_bytes_len = size;
|
||||
@ -387,6 +389,9 @@ static void btstack_uart_posix_send_block(const uint8_t *data, uint16_t size){
|
||||
}
|
||||
|
||||
static void btstack_uart_posix_receive_block(uint8_t *buffer, uint16_t len){
|
||||
btstack_assert(btstack_uart_block_read_bytes_len == 0);
|
||||
|
||||
// setup async read
|
||||
btstack_uart_block_read_bytes_data = buffer;
|
||||
btstack_uart_block_read_bytes_len = len;
|
||||
btstack_run_loop_enable_data_source_callbacks(&transport_data_source, DATA_SOURCE_CALLBACK_READ);
|
||||
|
Loading…
x
Reference in New Issue
Block a user