libws libws
WSwan hardware library for the Wonderful toolchain
Loading...
Searching...
No Matches
rtc.h File Reference
#include "../ports.h"
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

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

Functionality related to the cartridge RTC.

Definition in file rtc.h.