diff options
| author | hathach <[email protected]> | 2013-09-24 21:04:56 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-09-24 21:04:56 +0700 |
| commit | bd9af2d57b336c658d7e6f87e0abef4e695058b6 (patch) | |
| tree | 80284cb4e3e1398bbf092d68a4432269c43ab40c /demos/host/src/main.c | |
| parent | bbfa85aa08d19f57f6e1c8bb0040839e38d9a01c (diff) | |
added cli support
Diffstat (limited to 'demos/host/src/main.c')
| -rw-r--r-- | demos/host/src/main.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/demos/host/src/main.c b/demos/host/src/main.c index 14cf0b826..d38dba3f4 100644 --- a/demos/host/src/main.c +++ b/demos/host/src/main.c @@ -50,6 +50,8 @@ #include "app_os_prio.h" #endif +#include "cli.h" + #include "mouse_app.h" #include "keyboard_app.h" #include "msc_app.h" @@ -113,11 +115,11 @@ void os_none_start_scheduler(void) cdc_serial_app_task(NULL); rndis_app_task(NULL); -// int ch = ITM_ReceiveChar(); -// if ( ch > 0 ) -// { -// printf("%c", ch); -// } + int ch = getchar(); + if ( ch > 0 ) + { + cli_poll( (char) ch); + } } } #endif @@ -130,6 +132,8 @@ int main(void) tusb_init(); + cli_init(); + //------------- application task init -------------// (void) osal_task_create( OSAL_TASK_REF(led_blinking_task) ); |
