summaryrefslogtreecommitdiff
path: root/bsp/efm32
diff options
context:
space:
mode:
authorYonggang Luo <[email protected]>2025-09-27 08:20:12 +0800
committerR b b666 <[email protected]>2025-10-11 15:27:04 +0800
commitb2d6e2c2686a7ecfdbdd97bb2bdefc231ecf8433 (patch)
tree2d1451c99d39b8594f49b506ef84bb40737b20a9 /bsp/efm32
parent5ae232b6d0752ab823b5d0a52ef0aa269fdb3aed (diff)
Use time_t for RT_DEVICE_CTRL_RTC_GET_TIME RT_DEVICE_CTRL_RTC_SET_TIME
Diffstat (limited to 'bsp/efm32')
-rw-r--r--bsp/efm32/drv_rtc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bsp/efm32/drv_rtc.c b/bsp/efm32/drv_rtc.c
index 20acb19666..9dfe96f3af 100644
--- a/bsp/efm32/drv_rtc.c
+++ b/bsp/efm32/drv_rtc.c
@@ -85,13 +85,13 @@ static rt_err_t rt_rtc_control(rt_device_t dev, int cmd, void *args)
switch (cmd)
{
case RT_DEVICE_CTRL_RTC_GET_TIME:
- *(rt_uint32_t *)args = rtc_time + RTC_CounterGet();
+ *(time_t *)args = rtc_time + RTC_CounterGet();
rtc_debug("RTC: get rtc_time %x + %x\n", rtc_time, RTC_CounterGet());
break;
case RT_DEVICE_CTRL_RTC_SET_TIME:
{
- rtc_time = *(rt_uint32_t *)args;
+ rtc_time = *(time_t *)args;
rtc_debug("RTC: set rtc_time %x\n", rtc_time);
/* Reset counter */