libws libws
WSwan hardware library for the Wonderful toolchain
Loading...
Searching...
No Matches
Cartridge - RTC

Data Structures

struct  ws_rtc_date_t
struct  ws_rtc_time_t
struct  ws_rtc_datetime_t

Macros

#define WS_RTC_MONTH_AMPM   0x80
#define WS_RTC_MONTH_AM   0x00
#define WS_RTC_MONTH_PM   0x80
#define WS_RTC_STATUS_POWER_LOST   0x80
#define WS_RTC_STATUS_12_HOUR   0x00
#define WS_RTC_STATUS_24_HOUR   0x40
#define WS_RTC_STATUS_INTAE   0x20
#define WS_RTC_STATUS_INTME   0x08
#define WS_RTC_STATUS_INTFE   0x02
#define WS_RTC_STATUS_INT_OFF   0
#define WS_RTC_STATUS_INT_FREQ_STEADY   (WS_RTC_STATUS_INTFE)
#define WS_RTC_STATUS_INT_MINUTE_EDGE   (WS_RTC_STATUS_INTME)
#define WS_RTC_STATUS_INT_MINUTE_STEADY   (WS_RTC_STATUS_INTME | WS_RTC_STATUS_INTFE)
#define WS_RTC_STATUS_INT_ALARM   (WS_RTC_STATUS_INTAE)

Functions

int16_t ws_rtc_low_read_byte (uint16_t timeout)
bool ws_rtc_low_write_byte (uint8_t value, uint16_t timeout)
bool ws_rtc_low_write_ctrl (uint8_t value, uint16_t timeout)

Detailed Description

Macro Definition Documentation

◆ WS_RTC_MONTH_AM

#define WS_RTC_MONTH_AM   0x00

Definition at line 38 of file rtc.h.

◆ WS_RTC_MONTH_AMPM

#define WS_RTC_MONTH_AMPM   0x80

Definition at line 37 of file rtc.h.

◆ WS_RTC_MONTH_PM

#define WS_RTC_MONTH_PM   0x80

Definition at line 39 of file rtc.h.

◆ WS_RTC_STATUS_12_HOUR

#define WS_RTC_STATUS_12_HOUR   0x00

Definition at line 42 of file rtc.h.

◆ WS_RTC_STATUS_24_HOUR

#define WS_RTC_STATUS_24_HOUR   0x40

Definition at line 43 of file rtc.h.

◆ WS_RTC_STATUS_INT_ALARM

#define WS_RTC_STATUS_INT_ALARM   (WS_RTC_STATUS_INTAE)

Definition at line 51 of file rtc.h.

◆ WS_RTC_STATUS_INT_FREQ_STEADY

#define WS_RTC_STATUS_INT_FREQ_STEADY   (WS_RTC_STATUS_INTFE)

Definition at line 48 of file rtc.h.

◆ WS_RTC_STATUS_INT_MINUTE_EDGE

#define WS_RTC_STATUS_INT_MINUTE_EDGE   (WS_RTC_STATUS_INTME)

Definition at line 49 of file rtc.h.

◆ WS_RTC_STATUS_INT_MINUTE_STEADY

#define WS_RTC_STATUS_INT_MINUTE_STEADY   (WS_RTC_STATUS_INTME | WS_RTC_STATUS_INTFE)

Definition at line 50 of file rtc.h.

◆ WS_RTC_STATUS_INT_OFF

#define WS_RTC_STATUS_INT_OFF   0

Definition at line 47 of file rtc.h.

◆ WS_RTC_STATUS_INTAE

#define WS_RTC_STATUS_INTAE   0x20

Definition at line 44 of file rtc.h.

◆ WS_RTC_STATUS_INTFE

#define WS_RTC_STATUS_INTFE   0x02

Definition at line 46 of file rtc.h.

◆ WS_RTC_STATUS_INTME

#define WS_RTC_STATUS_INTME   0x08

Definition at line 45 of file rtc.h.

◆ WS_RTC_STATUS_POWER_LOST

#define WS_RTC_STATUS_POWER_LOST   0x80

Definition at line 41 of file rtc.h.

Function Documentation

◆ ws_rtc_low_read_byte()

int16_t ws_rtc_low_read_byte ( uint16_t timeout)

◆ ws_rtc_low_write_byte()

bool ws_rtc_low_write_byte ( uint8_t value,
uint16_t timeout )

◆ ws_rtc_low_write_ctrl()

bool ws_rtc_low_write_ctrl ( uint8_t value,
uint16_t timeout )