Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
rtc_max31331.h File Reference
#include <zephyr/device.h>
#include <zephyr/drivers/rtc.h>
#include <zephyr/drivers/gpio.h>
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef void(* rtc_max31331_timestamp_callback) (const struct device *dev, void *user_data)
 MAX31331 timestamp callback type.

Functions

int rtc_max31331_get_timestamps (const struct device *dev, struct rtc_time *timeptr, uint8_t index, uint8_t *flags)
 Read a stored timestamp from the MAX31331.
int rtc_max31331_set_timestamp_callback (const struct device *dev, rtc_max31331_timestamp_callback cb, void *user_data)
 Register a timestamp event callback.

Typedef Documentation

◆ rtc_max31331_timestamp_callback

typedef void(* rtc_max31331_timestamp_callback) (const struct device *dev, void *user_data)

MAX31331 timestamp callback type.

Parameters
devPointer to the RTC device.
user_dataPointer to user context.

Function Documentation

◆ rtc_max31331_get_timestamps()

int rtc_max31331_get_timestamps ( const struct device * dev,
struct rtc_time * timeptr,
uint8_t index,
uint8_t * flags )

Read a stored timestamp from the MAX31331.

Parameters
devPointer to the RTC device.
timeptrPointer to struct rtc_time to store result.
indexTimestamp index (0–3).
flagsPointer to variable receiving timestamp flags.
Return values
0If successful.
negativeerrno code otherwise.

◆ rtc_max31331_set_timestamp_callback()

int rtc_max31331_set_timestamp_callback ( const struct device * dev,
rtc_max31331_timestamp_callback cb,
void * user_data )

Register a timestamp event callback.

Parameters
devPointer to the RTC device.
cbCallback function pointer.
user_dataApplication-provided context.
Return values
0If successful.
negativeerrno code otherwise.