2 * @copyright Copyright (c) 2017-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 #ifndef HAL_API_CLOCK_HAL_H_
17 #define HAL_API_CLOCK_HAL_H_
23 #include <native_service/frameworkunified_types.h>
27 /** @addtogroup clock_hal
32 * \ingroup SetHardwareClock
33 * \~english @par Brief
35 * \~english @param [in] h_app
36 * HANDLE - Handle for Application
37 * \~english @param [in] l_tm
38 * const struct tm * - pointer to the time will be set
39 * \~english @retval eFrameworkunifiedStatusOK : Ok
40 * \~english @retval eFrameworkunifiedStatusFail : Failed
41 * \~english @retval eFrameworkunifiedStatusInvldHandle : parameter "h_app" is NULL
42 * \~english @retval eFrameworkunifiedStatusNullPointer : parameter "l_tm" is NULL
43 * \~english @par Prerequisite
44 * - /dev/rtc node is exist, rtc driver is availability.
45 * \~english @par Change of internal state
46 * - Change of internal state according to the API does not occur.
47 * \~english @par Conditions of processing failure
48 * - Set time to RTC failed. [eFrameworkunifiedStatusFail]
49 * - The parameter "l_tm" is NULL. [eFrameworkunifiedStatusNullPointer]
50 * - The parameter "h_app" is NULL. [eFrameworkunifiedStatusInvldHandle]
51 * \~english @par Detail
53 * - The API can be used by 1 process.
54 * \~english @par Classification
61 EFrameworkunifiedStatus SetHardwareClock(HANDLE h_app, const struct tm *l_tm);
64 /**@}*/ // end of clock_hal
65 /**@}*/ // end of clock
67 #endif // HAL_API_CLOCK_HAL_H_