Example #1
0
/**
 * @brief   Set current time.
 *
 * @param[in] rtcp      pointer to RTC driver structure
 * @param[in] timespec  pointer to a @p RTCTime structure
 *
 * @api
 */
void rtcSetTime(RTCDriver *rtcp, const RTCTime *timespec) {

  chDbgCheck((rtcp != NULL) && (timespec != NULL), "rtcSetTime");

  chSysLock();
  rtcSetTimeI(rtcp, timespec);
  chSysUnlock();
}
Example #2
0
/**
 * @brief   Set current time.
 *
 * @param[in] rtcp      pointer to RTC driver structure
 * @param[in] timespec  pointer to a @p RTCDateTime structure
 *
 * @api
 */
void rtcSetTime(RTCDriver *rtcp, const RTCDateTime *timespec) {

  osalDbgCheck((rtcp != NULL) && (timespec != NULL));

  osalSysLock();
  rtcSetTimeI(rtcp, timespec);
  osalSysUnlock();
}