diff options
| author | armink <[email protected]> | 2021-09-29 17:52:10 +0800 |
|---|---|---|
| committer | armink <[email protected]> | 2021-09-29 17:52:10 +0800 |
| commit | 816a99d88e5f42ceb846f587235281a1a1414750 (patch) | |
| tree | d10fa77b442e59fffd8916bc1b750d97ad97ffde /components | |
| parent | a4619732dfb3789a1ea9107d47629fe5025fd02c (diff) | |
[DeviceDriver][RTC] Add RT_DEVICE_CTRL_RTC_GET_TIMEVAL and RT_DEVICE_CTRL_RTC_SET_TIMEVAL ops
Diffstat (limited to 'components')
| -rw-r--r-- | components/drivers/include/drivers/rtc.h | 4 | ||||
| -rw-r--r-- | components/drivers/rtc/rtc.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/components/drivers/include/drivers/rtc.h b/components/drivers/include/drivers/rtc.h index f8702a2e99..5b333161f8 100644 --- a/components/drivers/include/drivers/rtc.h +++ b/components/drivers/include/drivers/rtc.h @@ -29,8 +29,8 @@ struct rt_rtc_ops rt_err_t (*set_secs)(void *arg); rt_err_t (*get_alarm)(void *arg); rt_err_t (*set_alarm)(void *arg); - rt_err_t (*get_usecs)(void *arg); - rt_err_t (*set_usecs)(void *arg); + rt_err_t (*get_timeval)(void *arg); + rt_err_t (*set_timeval)(void *arg); }; typedef struct rt_rtc_device diff --git a/components/drivers/rtc/rtc.c b/components/drivers/rtc/rtc.c index bc75c83e7d..0658d2aaf4 100644 --- a/components/drivers/rtc/rtc.c +++ b/components/drivers/rtc/rtc.c @@ -71,11 +71,11 @@ static rt_err_t rt_rtc_control(struct rt_device *dev, int cmd, void *args) case RT_DEVICE_CTRL_RTC_SET_TIME: ret = TRY_DO_RTC_FUNC(rtc_device, set_secs, args); break; - case RT_DEVICE_CTRL_RTC_GET_TIME_US: - ret = TRY_DO_RTC_FUNC(rtc_device, get_usecs, args); + case RT_DEVICE_CTRL_RTC_GET_TIMEVAL: + ret = TRY_DO_RTC_FUNC(rtc_device, get_timeval, args); break; - case RT_DEVICE_CTRL_RTC_SET_TIME_US: - ret = TRY_DO_RTC_FUNC(rtc_device, set_usecs, args); + case RT_DEVICE_CTRL_RTC_SET_TIMEVAL: + ret = TRY_DO_RTC_FUNC(rtc_device, set_timeval, args); break; case RT_DEVICE_CTRL_RTC_GET_ALARM: ret = TRY_DO_RTC_FUNC(rtc_device, get_alarm, args); |
