mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-31 10:20:58 +00:00
use AYSNC_POLLING_INTERVAL_MS to specify polling interval, disable debug output
This commit is contained in:
parent
22f8b3cca7
commit
09da5c0ba4
@ -92,6 +92,7 @@ static libusb_device * dev;
|
|||||||
static libusb_device_handle * handle;
|
static libusb_device_handle * handle;
|
||||||
|
|
||||||
#define ASYNC_BUFFERS 4
|
#define ASYNC_BUFFERS 4
|
||||||
|
#define AYSNC_POLLING_INTERVAL_MS 10
|
||||||
|
|
||||||
static struct libusb_transfer *event_in_transfer[ASYNC_BUFFERS];
|
static struct libusb_transfer *event_in_transfer[ASYNC_BUFFERS];
|
||||||
static struct libusb_transfer *bulk_in_transfer[ASYNC_BUFFERS];
|
static struct libusb_transfer *bulk_in_transfer[ASYNC_BUFFERS];
|
||||||
@ -111,6 +112,7 @@ static int event_in_addr;
|
|||||||
static int acl_in_addr;
|
static int acl_in_addr;
|
||||||
static int acl_out_addr;
|
static int acl_out_addr;
|
||||||
|
|
||||||
|
|
||||||
#if !USB_VENDOR_ID || !USB_PRODUCT_ID
|
#if !USB_VENDOR_ID || !USB_PRODUCT_ID
|
||||||
void scan_for_bt_endpoints(void) {
|
void scan_for_bt_endpoints(void) {
|
||||||
int r;
|
int r;
|
||||||
@ -268,8 +270,8 @@ void usb_process_ts(timer_source_t *timer) {
|
|||||||
// actually handled the packet in the pollfds function
|
// actually handled the packet in the pollfds function
|
||||||
usb_process_ds((struct data_source *) NULL);
|
usb_process_ds((struct data_source *) NULL);
|
||||||
|
|
||||||
// "Compute" the amount of time until next event is due
|
// Get the amount of time until next event is due
|
||||||
long msec = 10;
|
long msec = AYSNC_POLLING_INTERVAL_MS;
|
||||||
|
|
||||||
// Activate timer
|
// Activate timer
|
||||||
run_loop_set_timer(&usb_timer, msec);
|
run_loop_set_timer(&usb_timer, msec);
|
||||||
@ -301,7 +303,7 @@ static int usb_open(void *transport_config){
|
|||||||
libusb_state = LIB_USB_OPENED;
|
libusb_state = LIB_USB_OPENED;
|
||||||
|
|
||||||
// configure debug level
|
// configure debug level
|
||||||
libusb_set_debug(0,3);
|
// libusb_set_debug(0,3);
|
||||||
|
|
||||||
#if USB_VENDOR_ID && USB_PRODUCT_ID
|
#if USB_VENDOR_ID && USB_PRODUCT_ID
|
||||||
// Use a specified device
|
// Use a specified device
|
||||||
|
Loading…
x
Reference in New Issue
Block a user