Zephyr API Documentation 4.4.0-rc1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
RTC Driver Backend API

Data Structures

struct  rtc_driver_api
  Driver Operations RTC driver operations More...

Typedefs

typedef int(* rtc_api_set_time) (const struct device *dev, const struct rtc_time *timeptr)
 Callback API to set RTC time.
typedef int(* rtc_api_get_time) (const struct device *dev, struct rtc_time *timeptr)
 Callback API to get RTC time.
typedef int(* rtc_api_alarm_get_supported_fields) (const struct device *dev, uint16_t id, uint16_t *mask)
 Callback API to get the supported fields of the RTC alarm time.
typedef int(* rtc_api_alarm_set_time) (const struct device *dev, uint16_t id, uint16_t mask, const struct rtc_time *timeptr)
 Callback API to set RTC alarm time.
typedef int(* rtc_api_alarm_get_time) (const struct device *dev, uint16_t id, uint16_t *mask, struct rtc_time *timeptr)
 Callback API to get RTC alarm time.
typedef int(* rtc_api_alarm_is_pending) (const struct device *dev, uint16_t id)
 Callback API to test if RTC alarm is pending.
typedef int(* rtc_api_alarm_set_callback) (const struct device *dev, uint16_t id, rtc_alarm_callback callback, void *user_data)
 Callback API to set RTC alarm callback.
typedef int(* rtc_api_update_set_callback) (const struct device *dev, rtc_update_callback callback, void *user_data)
 Callback API to set RTC update callback.
typedef int(* rtc_api_set_calibration) (const struct device *dev, int32_t calibration)
 Callback API to set RTC calibration.
typedef int(* rtc_api_get_calibration) (const struct device *dev, int32_t *calibration)
 Callback API to get RTC calibration.

Detailed Description

This group contains the API type definitions, callback signatures, and other helpers required to implement a RTC driver.

Typedef Documentation

◆ rtc_api_alarm_get_supported_fields

typedef int(* rtc_api_alarm_get_supported_fields) (const struct device *dev, uint16_t id, uint16_t *mask)

#include <zephyr/drivers/rtc.h>

Callback API to get the supported fields of the RTC alarm time.

See rtc_alarm_get_supported_fields() for argument description.

◆ rtc_api_alarm_get_time

typedef int(* rtc_api_alarm_get_time) (const struct device *dev, uint16_t id, uint16_t *mask, struct rtc_time *timeptr)

#include <zephyr/drivers/rtc.h>

Callback API to get RTC alarm time.

See rtc_alarm_get_time() for argument description.

◆ rtc_api_alarm_is_pending

typedef int(* rtc_api_alarm_is_pending) (const struct device *dev, uint16_t id)

#include <zephyr/drivers/rtc.h>

Callback API to test if RTC alarm is pending.

See rtc_alarm_is_pending() for argument description.

◆ rtc_api_alarm_set_callback

typedef int(* rtc_api_alarm_set_callback) (const struct device *dev, uint16_t id, rtc_alarm_callback callback, void *user_data)

#include <zephyr/drivers/rtc.h>

Callback API to set RTC alarm callback.

See rtc_alarm_set_callback() for argument description.

◆ rtc_api_alarm_set_time

typedef int(* rtc_api_alarm_set_time) (const struct device *dev, uint16_t id, uint16_t mask, const struct rtc_time *timeptr)

#include <zephyr/drivers/rtc.h>

Callback API to set RTC alarm time.

See rtc_alarm_set_time() for argument description.

◆ rtc_api_get_calibration

typedef int(* rtc_api_get_calibration) (const struct device *dev, int32_t *calibration)

#include <zephyr/drivers/rtc.h>

Callback API to get RTC calibration.

See rtc_get_calibration() for argument description.

◆ rtc_api_get_time

typedef int(* rtc_api_get_time) (const struct device *dev, struct rtc_time *timeptr)

#include <zephyr/drivers/rtc.h>

Callback API to get RTC time.

See rtc_get_time() for argument description.

◆ rtc_api_set_calibration

typedef int(* rtc_api_set_calibration) (const struct device *dev, int32_t calibration)

#include <zephyr/drivers/rtc.h>

Callback API to set RTC calibration.

See rtc_set_calibration() for argument description.

◆ rtc_api_set_time

typedef int(* rtc_api_set_time) (const struct device *dev, const struct rtc_time *timeptr)

#include <zephyr/drivers/rtc.h>

Callback API to set RTC time.

See rtc_set_time() for argument description.

◆ rtc_api_update_set_callback

typedef int(* rtc_api_update_set_callback) (const struct device *dev, rtc_update_callback callback, void *user_data)

#include <zephyr/drivers/rtc.h>

Callback API to set RTC update callback.

See rtc_update_set_callback() for argument description.