From 3f9a73a34d2809007a0d6f5396a54ce7189271c2 Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 22 Apr 2013 10:44:51 +0700 Subject: [PATCH] change config to use USB0 only fix some compiler warnings --- demos/host/src/keyboard_app.h | 3 +++ demos/host/src/main.c | 3 +++ demos/host/src/mouse_app.h | 3 +++ demos/host/src/tusb_config.h | 2 +- tinyusb/host/ehci/ehci.c | 2 +- 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/demos/host/src/keyboard_app.h b/demos/host/src/keyboard_app.h index 23109ca51..9fa574d2d 100644 --- a/demos/host/src/keyboard_app.h +++ b/demos/host/src/keyboard_app.h @@ -62,6 +62,9 @@ #endif +void keyboard_app_init(void); +OSAL_TASK_DECLARE( keyboard_app_task ); + #ifdef __cplusplus } #endif diff --git a/demos/host/src/main.c b/demos/host/src/main.c index 7b935670c..3e5110a39 100644 --- a/demos/host/src/main.c +++ b/demos/host/src/main.c @@ -5,6 +5,9 @@ #include "boards/board.h" #include "tusb.h" +#include "mouse_app.h" +#include "keyboard_app.h" + #if defined(__CODE_RED) #include #include diff --git a/demos/host/src/mouse_app.h b/demos/host/src/mouse_app.h index 6d494c006..7c5972310 100644 --- a/demos/host/src/mouse_app.h +++ b/demos/host/src/mouse_app.h @@ -61,6 +61,9 @@ extern "C" { #endif +void mouse_app_init(void); +OSAL_TASK_DECLARE( mouse_app_task ); + #ifdef __cplusplus } #endif diff --git a/demos/host/src/tusb_config.h b/demos/host/src/tusb_config.h index 00f32f150..d6f3c55ef 100644 --- a/demos/host/src/tusb_config.h +++ b/demos/host/src/tusb_config.h @@ -59,7 +59,7 @@ // CONTROLLER CONFIGURATION //--------------------------------------------------------------------+ #define TUSB_CFG_CONTROLLER0_MODE (TUSB_MODE_HOST) -#define TUSB_CFG_CONTROLLER1_MODE (TUSB_MODE_HOST) +#define TUSB_CFG_CONTROLLER1_MODE (TUSB_MODE_NONE) //--------------------------------------------------------------------+ // HOST CONFIGURATION diff --git a/tinyusb/host/ehci/ehci.c b/tinyusb/host/ehci/ehci.c index 2f61afe78..42752c4e2 100644 --- a/tinyusb/host/ehci/ehci.c +++ b/tinyusb/host/ehci/ehci.c @@ -531,7 +531,7 @@ void period_list_process_isr(uint8_t hostid, uint8_t interval_ms) // TODO abstract max loop guard for period while( !next_item.terminate && - !(interval_ms > 1 && align32(next_item.address) == get_period_head(hostid, 1)) && + !(interval_ms > 1 && align32(next_item.address) == (uint32_t) get_period_head(hostid, 1)) && max_loop < (EHCI_MAX_QHD + EHCI_MAX_ITD + EHCI_MAX_SITD)) { switch ( next_item.type )