libws libws
WSwan hardware library for the Wonderful toolchain
Loading...
Searching...
No Matches
rtc.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include "hardware.h"
#include "util.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 RTC_MONTH_AMPM   0x80
 
#define RTC_MONTH_AM   0x80
 
#define RTC_MONTH_PM   0x80
 
#define RTC_STATUS_POWER_LOST   0x80
 
#define RTC_STATUS_12_HOUR   0x00
 
#define RTC_STATUS_24_HOUR   0x40
 
#define RTC_STATUS_INTAE   0x20
 
#define RTC_STATUS_INTME   0x08
 
#define RTC_STATUS_INTFE   0x02
 
#define RTC_STATUS_INT_OFF   0
 
#define RTC_STATUS_INT_FREQ_STEADY   (RTC_STATUS_INTFE)
 
#define RTC_STATUS_INT_MINUTE_EDGE   (RTC_STATUS_INTME)
 
#define RTC_STATUS_INT_MINUTE_STEADY   (RTC_STATUS_INTME | RTC_STATUS_INTFE)
 
#define RTC_STATUS_INT_ALARM   (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.