diff options
| author | Bernard Xiong <[email protected]> | 2021-09-11 20:00:39 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-09-11 20:00:39 +0800 |
| commit | 4423b487c551e0220233bc84f290abd5a1b8c2f4 (patch) | |
| tree | 0d237cb8cdb7bf80a0df677d3fbd8108b41f3e15 /components/drivers | |
| parent | 8907d3216713dfeb4a65b4cd2f8ef8da0beec237 (diff) | |
| parent | 51e055963127f443595e29fc493dcd22f33ac0f1 (diff) | |
Merge pull request #5044 from BernardXiong/libc_pr
[libc] remove rtlibc
Diffstat (limited to 'components/drivers')
| -rw-r--r-- | components/drivers/include/drivers/cputime.h | 2 | ||||
| -rw-r--r-- | components/drivers/include/drivers/pm.h | 1 | ||||
| -rw-r--r-- | components/drivers/phy/phy.c | 2 | ||||
| -rw-r--r-- | components/drivers/rtc/rtc.c | 7 |
4 files changed, 8 insertions, 4 deletions
diff --git a/components/drivers/include/drivers/cputime.h b/components/drivers/include/drivers/cputime.h index 0141f24805..26a1e40f8e 100644 --- a/components/drivers/include/drivers/cputime.h +++ b/components/drivers/include/drivers/cputime.h @@ -11,6 +11,8 @@ #ifndef CPUTIME_H__ #define CPUTIME_H__ +#include <stdint.h> + struct rt_clock_cputime_ops { float (*cputime_getres) (void); diff --git a/components/drivers/include/drivers/pm.h b/components/drivers/include/drivers/pm.h index 51bff54ebb..d38c0a4e2a 100644 --- a/components/drivers/include/drivers/pm.h +++ b/components/drivers/include/drivers/pm.h @@ -15,6 +15,7 @@ #ifndef __PM_H__ #define __PM_H__ +#include <stdint.h> #include <rtthread.h> #ifndef PM_HAS_CUSTOM_CONFIG diff --git a/components/drivers/phy/phy.c b/components/drivers/phy/phy.c index 6d408ce612..87152a306e 100644 --- a/components/drivers/phy/phy.c +++ b/components/drivers/phy/phy.c @@ -8,7 +8,7 @@ * Date Author Notes * 2020-09-27 wangqiang first version */ - +#include <stddef.h> #include <rthw.h> #include <rtthread.h> #include <rtdevice.h> diff --git a/components/drivers/rtc/rtc.c b/components/drivers/rtc/rtc.c index 35e7ddc3c4..bc75c83e7d 100644 --- a/components/drivers/rtc/rtc.c +++ b/components/drivers/rtc/rtc.c @@ -223,7 +223,7 @@ rt_err_t set_time(rt_uint32_t hour, rt_uint32_t minute, rt_uint32_t second) /** * get date and time or set (local timezone) [year month day hour min sec] */ -static void date(uint8_t argc, char **argv) +static void date(int argc, char **argv) { if (argc == 1) { @@ -235,8 +235,9 @@ static void date(uint8_t argc, char **argv) else if (argc >= 7) { /* set time and date */ - uint16_t year; - uint8_t month, day, hour, min, sec; + rt_uint16_t year; + rt_uint8_t month, day, hour, min, sec; + year = atoi(argv[1]); month = atoi(argv[2]); day = atoi(argv[3]); |
