fix unused device frame error

This commit is contained in:
shuobatian 2021-04-05 15:08:53 +08:00
parent 9f4ce7ee6f
commit a8fb6109e0
3 changed files with 5 additions and 3 deletions

View File

@ -156,7 +156,7 @@ RT_WEAK void rt_hw_board_init()
#endif #endif
/* Set the shell console output device */ /* Set the shell console output device */
#ifdef RT_USING_CONSOLE #if defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE)
rt_console_set_device(RT_CONSOLE_DEVICE_NAME); rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
#endif #endif

View File

@ -13,7 +13,9 @@
#include <rtthread.h> #include <rtthread.h>
#include <rthw.h> #include <rthw.h>
#ifdef RT_USING_DEVICE
#include <rtdevice.h> #include <rtdevice.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -227,8 +227,8 @@ int gettimeofday(struct timeval *tp, void *ignore)
tp->tv_usec = 0; tp->tv_usec = 0;
} }
#else #else
tv->tv_sec = 0; tp->tv_sec = 0;
tv->tv_usec = 0; tp->tv_usec = 0;
#endif #endif
return time; return time;