This commit is contained in:
hathach 2013-10-16 12:35:55 +07:00
parent 92646ebadb
commit 15c80a9580
12 changed files with 1144 additions and 1151 deletions

View File

@ -136,14 +136,5 @@ OSAL_TASK_FUNCTION( cdc_serial_app_task ) (void* p_task_para)
OSAL_TASK_LOOP_END OSAL_TASK_LOOP_END
} }
#else
// dummy implementation to remove #ifdef in main.c
void cdc_serial_app_init(void) { }
OSAL_TASK_FUNCTION( cdc_serial_app_task ) (void* p_task_para)
{
OSAL_TASK_LOOP_BEGIN
OSAL_TASK_LOOP_END
}
#endif #endif

View File

@ -53,9 +53,17 @@
extern "C" { extern "C" {
#endif #endif
#if TUSB_CFG_HOST_CDC
void cdc_serial_app_init(void); void cdc_serial_app_init(void);
OSAL_TASK_FUNCTION( cdc_serial_app_task ) (void* p_task_para); OSAL_TASK_FUNCTION( cdc_serial_app_task ) (void* p_task_para);
#else
#define cdc_serial_app_init()
#define cdc_serial_app_task(x)
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -179,13 +179,4 @@ static inline uint8_t keycode_to_ascii(uint8_t modifier, uint8_t keycode)
hid_keycode_to_ascii_tbl [modifier & (KEYBOARD_MODIFIER_LEFTSHIFT | KEYBOARD_MODIFIER_RIGHTSHIFT) ? 1 : 0] [keycode]; hid_keycode_to_ascii_tbl [modifier & (KEYBOARD_MODIFIER_LEFTSHIFT | KEYBOARD_MODIFIER_RIGHTSHIFT) ? 1 : 0] [keycode];
} }
#else
// dummy implementation to remove #ifdef in main.c
void keyboard_app_init(void) { }
OSAL_TASK_FUNCTION( keyboard_app_task ) (void* p_task_para)
{
OSAL_TASK_LOOP_BEGIN
OSAL_TASK_LOOP_END
}
#endif #endif

View File

@ -59,10 +59,18 @@
extern "C" { extern "C" {
#endif #endif
#if TUSB_CFG_HOST_HID_KEYBOARD
void keyboard_app_init(void); void keyboard_app_init(void);
OSAL_TASK_FUNCTION( keyboard_app_task ) (void* p_task_para); OSAL_TASK_FUNCTION( keyboard_app_task ) (void* p_task_para);
#else
#define keyboard_app_init()
#define keyboard_app_task(x)
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -182,14 +182,4 @@ static inline void process_mouse_report(tusb_mouse_report_t const * p_report)
cursor_movement(p_report->x, p_report->y, p_report->wheel); cursor_movement(p_report->x, p_report->y, p_report->wheel);
} }
#else
// dummy implementation to remove #ifdef in main.c
void mouse_app_init(void) { }
OSAL_TASK_FUNCTION( mouse_app_task ) (void* p_task_para)
{
OSAL_TASK_LOOP_BEGIN
OSAL_TASK_LOOP_END
}
#endif #endif

View File

@ -62,9 +62,18 @@
extern "C" { extern "C" {
#endif #endif
#if TUSB_CFG_HOST_HID_MOUSE
void mouse_app_init(void); void mouse_app_init(void);
OSAL_TASK_FUNCTION( mouse_app_task ) (void* p_task_para); OSAL_TASK_FUNCTION( mouse_app_task ) (void* p_task_para);
#else
#define mouse_app_init()
#define mouse_app_task(x)
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -173,14 +173,4 @@ OSAL_TASK_FUNCTION( msc_app_task ) (void* p_task_para)
OSAL_TASK_LOOP_END OSAL_TASK_LOOP_END
} }
#else
// dummy implementation to remove #ifdef in main.c
void msc_app_init(void) { }
OSAL_TASK_FUNCTION( msc_app_task ) (void* p_task_para)
{
OSAL_TASK_LOOP_BEGIN
OSAL_TASK_LOOP_END
}
#endif #endif

View File

@ -57,10 +57,17 @@
extern "C" { extern "C" {
#endif #endif
#if TUSB_CFG_HOST_MSC
void msc_app_init(void); void msc_app_init(void);
OSAL_TASK_FUNCTION( msc_app_task ) (void* p_task_para); OSAL_TASK_FUNCTION( msc_app_task ) (void* p_task_para);
#else
#define msc_app_init()
#define msc_app_task(x)
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -76,14 +76,4 @@ OSAL_TASK_FUNCTION( rndis_app_task ) (void* p_task_para)
OSAL_TASK_LOOP_END OSAL_TASK_LOOP_END
} }
#else
// dummy implementation to remove #ifdef in main.c
void rndis_app_init(void) { }
OSAL_TASK_FUNCTION( rndis_app_task ) (void* p_task_para)
{
OSAL_TASK_LOOP_BEGIN
OSAL_TASK_LOOP_END
}
#endif #endif

View File

@ -53,9 +53,19 @@
extern "C" { extern "C" {
#endif #endif
#if TUSB_CFG_HOST_CDC && TUSB_CFG_HOST_CDC_RNDIS
void rndis_app_init(void); void rndis_app_init(void);
OSAL_TASK_FUNCTION( rndis_app_task ) (void* p_task_para); OSAL_TASK_FUNCTION( rndis_app_task ) (void* p_task_para);
#else
#define rndis_app_init()
#define rndis_app_task(x)
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -74,7 +74,7 @@
//------------- CLASS -------------// //------------- CLASS -------------//
#define TUSB_CFG_HOST_HUB 1 #define TUSB_CFG_HOST_HUB 1
#define TUSB_CFG_HOST_HID_KEYBOARD 1 #define TUSB_CFG_HOST_HID_KEYBOARD 1
#define TUSB_CFG_HOST_HID_MOUSE 1 #define TUSB_CFG_HOST_HID_MOUSE 0
#define TUSB_CFG_HOST_HID_GENERIC 0 #define TUSB_CFG_HOST_HID_GENERIC 0
#define TUSB_CFG_HOST_MSC 1 #define TUSB_CFG_HOST_MSC 1
#define TUSB_CFG_HOST_CDC 0 #define TUSB_CFG_HOST_CDC 0

View File

@ -43,7 +43,6 @@
char const* const TUSB_ErrorStr[TUSB_ERROR_COUNT] = char const* const TUSB_ErrorStr[TUSB_ERROR_COUNT] =
{ {
ERROR_TABLE(ERROR_STRING) ERROR_TABLE(ERROR_STRING)
0
}; };
#endif #endif