clean up virtual com example

This commit is contained in:
hathach 2018-03-08 00:00:35 +07:00
parent bd5f9ecdec
commit d28e7e3966
3 changed files with 3 additions and 21 deletions

View File

@ -37,11 +37,7 @@
/**************************************************************************/
#include "cdc_device_app.h"
#if TUSB_CFG_DEVICE_CDC
#include "common/fifo.h" // TODO refractor
#include "app_os_prio.h"
//--------------------------------------------------------------------+
// INCLUDE
@ -89,8 +85,6 @@ void cdc_serial_app_init(void)
{
sem_hdl = osal_semaphore_create(1, 0);
VERIFY(sem_hdl, );
osal_task_create(cdc_serial_app_task, "cdc", 128, NULL, CDC_SERIAL_APP_TASK_PRIO);
}
tusb_error_t cdc_serial_subtask(void);
@ -136,5 +130,3 @@ tusb_error_t cdc_serial_subtask(void)
OSAL_SUBTASK_END
}
#endif

View File

@ -53,24 +53,12 @@
extern "C" {
#endif
#if TUSB_CFG_DEVICE_CDC
void cdc_serial_app_init(void);
void cdc_serial_app_task(void* param);
void cdc_serial_app_mount(uint8_t coreid);
void cdc_serial_app_umount(uint8_t coreid);
#else
#define cdc_serial_app_init()
#define cdc_serial_app_task(x)
#define cdc_serial_app_mount(x)
#define cdc_serial_app_umount(x)
#endif
#ifdef __cplusplus
}
#endif

View File

@ -56,7 +56,9 @@
// INTERNAL OBJECT & FUNCTION DECLARATION
//--------------------------------------------------------------------+
void print_greeting(void);
void led_blinking_task(void);
/*------------- MAIN -------------*/
int main(void)
{
board_init();
@ -71,7 +73,7 @@ int main(void)
{
tusb_task();
led_blinking_task(NULL);
led_blinking_task();
cdc_serial_app_task(NULL);
}