未验证 提交 eb126196 编写于 作者: N Not Black Magic 提交者: GitHub

Fix BSP/imxrt/imxrt1060-nxp-evk: RTC Driver issue (#6283)

Fix BSP bug:
-Function naming conflict in drv_rtc.c, rename get/set_timestamp to imxrt_hp_get/set_timestamp, which conflicted with rtc.c/.h framework.
上级 fde369f0
......@@ -25,7 +25,7 @@
#error "Please don't define 'FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL'!"
#endif
static time_t get_timestamp(void)
static time_t imxrt_hp_get_timestamp(void)
{
struct tm tm_new = {0};
snvs_hp_rtc_datetime_t rtcDate = {0};
......@@ -43,7 +43,7 @@ static time_t get_timestamp(void)
return timegm(&tm_new);
}
static int set_timestamp(time_t timestamp)
static int imxrt_hp_set_timestamp(time_t timestamp)
{
struct tm now;
snvs_hp_rtc_datetime_t rtcDate = {0};
......@@ -109,13 +109,13 @@ static rt_err_t imxrt_hp_rtc_control(rt_device_t dev, int cmd, void *args)
{
case RT_DEVICE_CTRL_RTC_GET_TIME:
{
*(uint32_t *)args = get_timestamp();
*(uint32_t *)args = imxrt_hp_get_timestamp();
}
break;
case RT_DEVICE_CTRL_RTC_SET_TIME:
{
set_timestamp(*(time_t *)args);
imxrt_hp_set_timestamp(*(time_t *)args);
}
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册