add cardinality_of function to return number of set bits

refractor tests in ehci
This commit is contained in:
hathach
2013-05-11 00:40:21 +07:00
parent e50010c36c
commit 81780008e9
13 changed files with 107 additions and 78 deletions
+11 -11
View File
@@ -50,19 +50,19 @@
usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1];
uint8_t const control_max_packet_size = 64;
uint8_t const hub_addr = 2;
uint8_t const hub_port = 2;
uint8_t dev_addr;
uint8_t hostid;
uint8_t xfer_data [100];
static uint8_t const control_max_packet_size = 64;
static uint8_t const hub_addr = 2;
static uint8_t const hub_port = 2;
static uint8_t dev_addr;
static uint8_t hostid;
static uint8_t xfer_data [100];
ehci_qhd_t *async_head;
ehci_qhd_t *p_control_qhd;
static ehci_qhd_t *async_head;
static ehci_qhd_t *p_control_qhd;
ehci_qtd_t *p_setup;
ehci_qtd_t *p_data;
ehci_qtd_t *p_status;
static ehci_qtd_t *p_setup;
static ehci_qtd_t *p_data;
static ehci_qtd_t *p_status;
//--------------------------------------------------------------------+
// Setup/Teardown + helper declare