diff options
Diffstat (limited to 'arch/arm/imx-common/sci/svc/timer')
-rw-r--r-- | arch/arm/imx-common/sci/svc/timer/rpc.h | 1 | ||||
-rw-r--r-- | arch/arm/imx-common/sci/svc/timer/rpc_clnt.c | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/imx-common/sci/svc/timer/rpc.h b/arch/arm/imx-common/sci/svc/timer/rpc.h index 7ba00b6f27f..b87056bcc7c 100644 --- a/arch/arm/imx-common/sci/svc/timer/rpc.h +++ b/arch/arm/imx-common/sci/svc/timer/rpc.h @@ -37,6 +37,7 @@ typedef enum timer_func_e TIMER_FUNC_GET_RTC_TIME = 7, /*!< Index for timer_get_rtc_time() RPC call */ TIMER_FUNC_GET_RTC_SEC1970 = 9, /*!< Index for timer_get_rtc_sec1970() RPC call */ TIMER_FUNC_SET_RTC_ALARM = 8, /*!< Index for timer_set_rtc_alarm() RPC call */ + TIMER_FUNC_SET_RTC_CALB = 11, /*!< Index for timer_set_rtc_calb() RPC call */ } timer_func_t; /* Functions */ diff --git a/arch/arm/imx-common/sci/svc/timer/rpc_clnt.c b/arch/arm/imx-common/sci/svc/timer/rpc_clnt.c index 6e11d3782d6..7fc6bcd0424 100644 --- a/arch/arm/imx-common/sci/svc/timer/rpc_clnt.c +++ b/arch/arm/imx-common/sci/svc/timer/rpc_clnt.c @@ -230,5 +230,22 @@ sc_err_t sc_timer_set_rtc_alarm(sc_ipc_t ipc, uint16_t year, uint8_t mon, return (sc_err_t) result; } +sc_err_t sc_timer_set_rtc_calb(sc_ipc_t ipc, int8_t count) +{ + sc_rpc_msg_t msg; + uint8_t result; + + RPC_VER(&msg) = SC_RPC_VERSION; + RPC_SVC(&msg) = SC_RPC_SVC_TIMER; + RPC_FUNC(&msg) = TIMER_FUNC_SET_RTC_CALB; + RPC_I8(&msg, 0) = count; + RPC_SIZE(&msg) = 2; + + sc_call_rpc(ipc, &msg, false); + + result = RPC_R8(&msg); + return (sc_err_t) result; +} + /**@}*/ |