mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-28 08:37:22 +00:00
mtk: fix compile -> named union on btstack_data_source_t
This commit is contained in:
parent
1dcd7dc6a3
commit
c6d79a8426
@ -94,7 +94,7 @@ static int h4_open(void){
|
||||
|
||||
static int h4_close(void){
|
||||
|
||||
mtk_bt_disable(hci_transport_h4->ds->fd);
|
||||
mtk_bt_disable(hci_transport_h4->ds->source.fd);
|
||||
|
||||
// first remove run loop handler
|
||||
btstack_run_loop_remove_data_source(hci_transport_h4->ds);
|
||||
@ -114,7 +114,7 @@ static int h4_send_packet(uint8_t packet_type, uint8_t * packet, int size){
|
||||
memcpy(&hci_packet_out[1], packet, size);
|
||||
|
||||
// send
|
||||
int res = mtk_bt_write(hci_transport_h4->ds->fd, hci_packet_out, size + 1);
|
||||
int res = mtk_bt_write(hci_transport_h4->ds->source.fd, hci_packet_out, size + 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -124,10 +124,10 @@ static void h4_register_packet_handler(void (*handler)(uint8_t packet_type, ui
|
||||
}
|
||||
|
||||
static void h4_process(btstack_data_source_t *ds, btstack_data_source_callback_type_t callback_type) {
|
||||
if (hci_transport_h4->ds->fd == 0) return;
|
||||
if (hci_transport_h4->ds->source.fd == 0) return;
|
||||
|
||||
// read up to bytes_to_read data in
|
||||
ssize_t bytes_read = mtk_bt_read(hci_transport_h4->ds->fd, &hci_packet_in[0], sizeof(hci_packet_in));
|
||||
ssize_t bytes_read = mtk_bt_read(hci_transport_h4->ds->source.fd, &hci_packet_in[0], sizeof(hci_packet_in));
|
||||
|
||||
if (bytes_read == 0) return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user