[DeviceDriver][RTC] Add RT_DEVICE_CTRL_RTC_GET_TIMEVAL and RT_DEVICE_CTRL_RTC_SET_TIMEVAL ops
This commit is contained in:
parent
a4619732df
commit
816a99d88e
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user