Skip to content

Commit eb12619

Browse files
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.
1 parent fde369f commit eb12619

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bsp/imxrt/libraries/drivers/drv_rtc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#error "Please don't define 'FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL'!"
2626
#endif
2727

28-
static time_t get_timestamp(void)
28+
static time_t imxrt_hp_get_timestamp(void)
2929
{
3030
struct tm tm_new = {0};
3131
snvs_hp_rtc_datetime_t rtcDate = {0};
@@ -43,7 +43,7 @@ static time_t get_timestamp(void)
4343
return timegm(&tm_new);
4444
}
4545

46-
static int set_timestamp(time_t timestamp)
46+
static int imxrt_hp_set_timestamp(time_t timestamp)
4747
{
4848
struct tm now;
4949
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)
109109
{
110110
case RT_DEVICE_CTRL_RTC_GET_TIME:
111111
{
112-
*(uint32_t *)args = get_timestamp();
112+
*(uint32_t *)args = imxrt_hp_get_timestamp();
113113
}
114114
break;
115115

116116
case RT_DEVICE_CTRL_RTC_SET_TIME:
117117
{
118-
set_timestamp(*(time_t *)args);
118+
imxrt_hp_set_timestamp(*(time_t *)args);
119119
}
120120
break;
121121

0 commit comments

Comments
 (0)