mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-16 08:42:28 +00:00
h5: extract hci_transport_h5_process_read
This commit is contained in:
parent
9f0074223d
commit
7205a54d7d
@ -599,9 +599,7 @@ static int hci_transport_h5_close(void){
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void hci_transport_h5_process(btstack_data_source_t *ds, btstack_data_source_callback_type_t callback_type) {
|
||||
if (hci_transport_h5_data_source.fd < 0) return;
|
||||
|
||||
static void hci_transport_h5_process_read(btstack_data_source_t *ds) {
|
||||
// process data byte by byte
|
||||
uint8_t data;
|
||||
while (1) {
|
||||
@ -617,6 +615,23 @@ static void hci_transport_h5_process(btstack_data_source_t *ds, btstack_data_sou
|
||||
};
|
||||
}
|
||||
|
||||
static void hci_transport_h5_process_write(btstack_data_source_t *ds) {
|
||||
}
|
||||
|
||||
static void hci_transport_h5_process(btstack_data_source_t *ds, btstack_data_source_callback_type_t callback_type) {
|
||||
if (hci_transport_h5_data_source.fd < 0) return;
|
||||
switch (callback_type){
|
||||
case DATA_SOURCE_CALLBACK_READ:
|
||||
hci_transport_h5_process_read(ds);
|
||||
break;
|
||||
case DATA_SOURCE_CALLBACK_WRITE:
|
||||
hci_transport_h5_process_write(ds);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// get h5 singleton
|
||||
const hci_transport_t * hci_transport_h5_instance(void) {
|
||||
if (hci_transport_h5 == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user