summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-03-08 00:00:35 +0700
committerhathach <[email protected]>2018-03-08 00:00:35 +0700
commitd28e7e3966bd4ac471b667c73d2cb1451808e641 (patch)
treec99755642cb6426fd4ee941ba68c01980d92133b /examples
parentbd5f9ecdec79eef1c7c45647ad16cf566f572148 (diff)
clean up virtual com example
Diffstat (limited to 'examples')
-rw-r--r--examples/device/device_virtual_com/src/cdc_device_app.c8
-rw-r--r--examples/device/device_virtual_com/src/cdc_device_app.h12
-rw-r--r--examples/device/device_virtual_com/src/main.c4
3 files changed, 3 insertions, 21 deletions
diff --git a/examples/device/device_virtual_com/src/cdc_device_app.c b/examples/device/device_virtual_com/src/cdc_device_app.c
index 2a10d2ca6..2ead76f23 100644
--- a/examples/device/device_virtual_com/src/cdc_device_app.c
+++ b/examples/device/device_virtual_com/src/cdc_device_app.c
@@ -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
diff --git a/examples/device/device_virtual_com/src/cdc_device_app.h b/examples/device/device_virtual_com/src/cdc_device_app.h
index 5433da207..24326d379 100644
--- a/examples/device/device_virtual_com/src/cdc_device_app.h
+++ b/examples/device/device_virtual_com/src/cdc_device_app.h
@@ -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
diff --git a/examples/device/device_virtual_com/src/main.c b/examples/device/device_virtual_com/src/main.c
index c512f7c05..5aa9cf5ff 100644
--- a/examples/device/device_virtual_com/src/main.c
+++ b/examples/device/device_virtual_com/src/main.c
@@ -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);
}