[kernel] enable RT_DEBUG_DEVICE by default and move weak rt_hw_dealy_us in kservice.c

This commit is contained in:
Meco Man 2022-04-14 18:12:56 -04:00 committed by guo
parent d6c74af535
commit 5e9f525c41
3 changed files with 8 additions and 10 deletions

View File

@ -11,15 +11,6 @@
#include <sys/types.h>
#include <rtthread.h>
#include <rthw.h>
#define DBG_TAG "POSIX.delay"
#define DBG_LVL DBG_INFO
#include <rtdbg.h>
RT_WEAK void rt_hw_us_delay(rt_uint32_t us)
{
(void) us;
LOG_W("Please consider implementing rt_hw_us_delay() in another file.");
}
void msleep(unsigned int msecs)
{

View File

@ -53,7 +53,7 @@
#endif
#ifndef RT_DEBUG_DEVICE
#define RT_DEBUG_DEVICE 0
#define RT_DEBUG_DEVICE 1
#endif
#ifndef RT_DEBUG_INIT

View File

@ -45,6 +45,13 @@ static volatile int __rt_errno;
static rt_device_t _console_device = RT_NULL;
#endif
RT_WEAK void rt_hw_us_delay(rt_uint32_t us)
{
(void) us;
RT_DEBUG_LOG(RT_DEBUG_DEVICE, ("rt_hw_us_delay() doesn't support for this board."
"Please consider implementing rt_hw_us_delay() in another file."));
}
/**
* This function gets the global errno for the current thread.
*