mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-07 05:54:11 +08:00
clean up
This commit is contained in:
parent
92646ebadb
commit
15c80a9580
@ -136,14 +136,5 @@ OSAL_TASK_FUNCTION( cdc_serial_app_task ) (void* p_task_para)
|
||||
|
||||
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
|
||||
|
@ -53,9 +53,17 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if TUSB_CFG_HOST_CDC
|
||||
|
||||
void cdc_serial_app_init(void);
|
||||
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
|
||||
}
|
||||
|
@ -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];
|
||||
}
|
||||
|
||||
#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
|
||||
|
@ -59,10 +59,18 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if TUSB_CFG_HOST_HID_KEYBOARD
|
||||
|
||||
void keyboard_app_init(void);
|
||||
OSAL_TASK_FUNCTION( keyboard_app_task ) (void* p_task_para);
|
||||
|
||||
#else
|
||||
|
||||
#define keyboard_app_init()
|
||||
#define keyboard_app_task(x)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
#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
|
||||
|
@ -62,9 +62,18 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if TUSB_CFG_HOST_HID_MOUSE
|
||||
|
||||
void mouse_app_init(void);
|
||||
OSAL_TASK_FUNCTION( mouse_app_task ) (void* p_task_para);
|
||||
|
||||
#else
|
||||
|
||||
#define mouse_app_init()
|
||||
#define mouse_app_task(x)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -173,14 +173,4 @@ OSAL_TASK_FUNCTION( msc_app_task ) (void* p_task_para)
|
||||
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
|
||||
|
@ -57,10 +57,17 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if TUSB_CFG_HOST_MSC
|
||||
|
||||
void msc_app_init(void);
|
||||
OSAL_TASK_FUNCTION( msc_app_task ) (void* p_task_para);
|
||||
|
||||
#else
|
||||
|
||||
#define msc_app_init()
|
||||
#define msc_app_task(x)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -76,14 +76,4 @@ OSAL_TASK_FUNCTION( rndis_app_task ) (void* p_task_para)
|
||||
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
|
||||
|
@ -53,9 +53,19 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if TUSB_CFG_HOST_CDC && TUSB_CFG_HOST_CDC_RNDIS
|
||||
|
||||
void rndis_app_init(void);
|
||||
OSAL_TASK_FUNCTION( rndis_app_task ) (void* p_task_para);
|
||||
|
||||
#else
|
||||
|
||||
#define rndis_app_init()
|
||||
#define rndis_app_task(x)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -74,7 +74,7 @@
|
||||
//------------- CLASS -------------//
|
||||
#define TUSB_CFG_HOST_HUB 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_MSC 1
|
||||
#define TUSB_CFG_HOST_CDC 0
|
||||
|
@ -43,7 +43,6 @@
|
||||
char const* const TUSB_ErrorStr[TUSB_ERROR_COUNT] =
|
||||
{
|
||||
ERROR_TABLE(ERROR_STRING)
|
||||
0
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user