28#ifndef LIBCHIP_MCP7940M_RTC_H
29#define LIBCHIP_MCP7940M_RTC_H
33#include <libchip/rtc.h>
40extern const rtc_fns rtc_mcp7940m_fns;
41bool rtc_mcp7940m_probe(
int minor);
78#define MCP7940M_RTC_INITIALIZER(i2c_path, i2c_address, has_crystal) { \
79 .mutex = RTEMS_MUTEX_INITIALIZER("mcp7940m"), \
80 .i2c_bus_path = i2c_path, \
81 .i2c_addr = i2c_address, \
82 .crystal = has_crystal, \
83 .initialized = false, \
86#define MCP7940M_RTC_TBL_ENTRY(dev_name, mcp7940m_rtc_ctx) \
88 .sDeviceName = dev_name, \
89 .deviceType = RTC_CUSTOM, \
90 .pDeviceFns = &rtc_mcp7940m_fns, \
91 .deviceProbe = rtc_mcp7940m_probe, \
92 .pDeviceParams = (void *)mcp7940m_rtc_ctx, \
95 .getRegister = NULL, \
96 .setRegister = NULL, \
This header file defines the RTEMS Classic API.
Definition: mcp7940m-rtc.h:61
bool initialized
Definition: mcp7940m-rtc.h:75
const char * i2c_bus_path
Definition: mcp7940m-rtc.h:66
uint8_t i2c_addr
Definition: mcp7940m-rtc.h:69
bool crystal
Definition: mcp7940m-rtc.h:72
rtems_mutex mutex
Definition: mcp7940m-rtc.h:63
This header file provides the API of Self-Contained Objects.