diff options
| author | Yang sheng <[email protected]> | 2022-04-09 00:39:00 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-04-09 00:39:00 +0800 |
| commit | eb2fc60207fc86229460fe1ec066134751014871 (patch) | |
| tree | 4ad7aa0154d88ac2ad17eb8cdc68bd6d4688263c /components/drivers | |
| parent | 084bb1c95626f7ab14984a7fde0e56a3290659c4 (diff) | |
[bsp] Make all warnings into errors with qemu-vexpress-a9 qemu-virt64… (#5785)
* [bsp] Make all warnings into errors with qemu-vexpress-a9 qemu-virt64-aarch64 and stm32f411-st-nucleo.
* [RTC] Fix compile errors
Diffstat (limited to 'components/drivers')
| -rw-r--r-- | components/drivers/include/drivers/alarm.h | 9 | ||||
| -rw-r--r-- | components/drivers/include/drivers/rtc.h | 9 | ||||
| -rw-r--r-- | components/drivers/rtc/alarm.c | 1 |
3 files changed, 9 insertions, 10 deletions
diff --git a/components/drivers/include/drivers/alarm.h b/components/drivers/include/drivers/alarm.h index d96d1ba0d2..6ea9f5e271 100644 --- a/components/drivers/include/drivers/alarm.h +++ b/components/drivers/include/drivers/alarm.h @@ -39,15 +39,6 @@ typedef struct rt_alarm *rt_alarm_t; typedef void (*rt_alarm_callback_t)(rt_alarm_t alarm, time_t timestamp); -/* used for low level RTC driver */ -struct rt_rtc_wkalarm -{ - rt_bool_t enable; /* 0 = alarm disabled, 1 = alarm enabled */ - rt_int32_t tm_sec; /* alarm at tm_sec */ - rt_int32_t tm_min; /* alarm at tm_min */ - rt_int32_t tm_hour; /* alarm at tm_hour */ -}; - struct rt_alarm { rt_list_t list; diff --git a/components/drivers/include/drivers/rtc.h b/components/drivers/include/drivers/rtc.h index 21bbb26d08..2e007e8dd6 100644 --- a/components/drivers/include/drivers/rtc.h +++ b/components/drivers/include/drivers/rtc.h @@ -28,6 +28,15 @@ extern "C" { #define RT_DEVICE_CTRL_RTC_GET_ALARM (RT_DEVICE_CTRL_BASE(RTC) + 0x05) /**< get alarm */ #define RT_DEVICE_CTRL_RTC_SET_ALARM (RT_DEVICE_CTRL_BASE(RTC) + 0x06) /**< set alarm */ +/* used for alarm function */ +struct rt_rtc_wkalarm +{ + rt_bool_t enable; /* 0 = alarm disabled, 1 = alarm enabled */ + rt_int32_t tm_sec; /* alarm at tm_sec */ + rt_int32_t tm_min; /* alarm at tm_min */ + rt_int32_t tm_hour; /* alarm at tm_hour */ +}; + struct rt_rtc_ops { rt_err_t (*init)(void); diff --git a/components/drivers/rtc/alarm.c b/components/drivers/rtc/alarm.c index e56bf591c2..f6c536d354 100644 --- a/components/drivers/rtc/alarm.c +++ b/components/drivers/rtc/alarm.c @@ -748,7 +748,6 @@ void rt_alarm_dump(void) { rt_list_t *next; rt_alarm_t alarm; - rt_uint8_t index = 0; rt_kprintf("| hh:mm:ss | week | flag | en |\n"); rt_kprintf("+----------+------+------+----+\n"); |
