diff options
| author | Not Black Magic <[email protected]> | 2022-08-15 14:34:01 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-08-15 09:34:01 -0400 |
| commit | eb1261965401cb452b0559eaeeb9e125eae7ba5f (patch) | |
| tree | 52aebea6a8c49a6a11438603fd35e8d540604edc /bsp | |
| parent | fde369f0119bfa8a5841af82e11951862093f4ec (diff) | |
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.
Diffstat (limited to 'bsp')
| -rw-r--r-- | bsp/imxrt/libraries/drivers/drv_rtc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bsp/imxrt/libraries/drivers/drv_rtc.c b/bsp/imxrt/libraries/drivers/drv_rtc.c index c0667ddbc9..a0954df9a9 100644 --- a/bsp/imxrt/libraries/drivers/drv_rtc.c +++ b/bsp/imxrt/libraries/drivers/drv_rtc.c @@ -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; |
