RTC configuration.
More...
#include <libchip/rtc.h>
#include <bsp.h>
#include <bsp/lpc32xx.h>
#include <rtems/rtems/clockimpl.h>
#include <time.h>
|
#define | LPC32XX_RTC_COUNT 1U |
|
#define | LPC32XX_RTC_COUNTER_DELTA 0xfffffffeU |
|
#define | LPC32XX_RTC_KEY 0xb5c13f27U |
|
#define | LPC32XX_RTC_CTRL_FORCE_ONSW (1U << 7) |
|
#define | LPC32XX_RTC_CTRL_STOP (1U << 6) |
|
#define | LPC32XX_RTC_CTRL_RESET (1U << 4) |
|
#define | LPC32XX_RTC_CTRL_MATCH_1_ONSW (1U << 3) |
|
#define | LPC32XX_RTC_CTRL_MATCH_0_ONSW (1U << 2) |
|
#define | LPC32XX_RTC_CTRL_MATCH_1_INTR (1U << 1) |
|
#define | LPC32XX_RTC_CTRL_MATCH_0_INTR (1U << 0) |
|
◆ lpc32xx_rtc_ops
Initial value:= {
.deviceInitialize = lpc32xx_rtc_initialize,
.deviceGetTime = lpc32xx_rtc_get_time,
.deviceSetTime = lpc32xx_rtc_set_time
}
◆ RTC_Table
rtc_tbl RTC_Table[LPC32XX_RTC_COUNT] |
Initial value:= {
{
.sDeviceName = "/dev/rtc",
.deviceType = RTC_CUSTOM,
.pDeviceFns = &lpc32xx_rtc_ops,
.deviceProbe = lpc32xx_rtc_probe,
.pDeviceParams = NULL,
.ulCtrlPort1 = 0,
.ulDataPort = 0,
.getRegister = NULL,
.setRegister = NULL
}
}
Table to describes the rtc device.