PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
rtc.c File Reference
#include <kernel/cpu/io.h>
#include <kernel/log/log.h>
#include <kernel/module/module.h>
#include <kernel/sched/clock.h>
#include <modules/acpi/devices.h>
#include <modules/acpi/tables.h>
#include <kernel/sync/lock.h>
#include <time.h>
Include dependency graph for rtc.c:

Go to the source code of this file.

Functions

static uint8_t rtc_read (uint8_t reg)
 
static int rtc_update_in_progress (void)
 
static uint8_t rtc_bcd_to_bin (uint8_t bcd)
 
static time_t rtc_read_epoch (void)
 
static uint64_t rtc_init (const char *deviceName)
 
uint64_t _module_procedure (const module_event_t *event)
 
 MODULE_INFO ("RTC Driver", "Kai Norberg", "A driver for the CMOS Real Time Clock", OS_VERSION, "MIT", "PNP0B00")
 

Variables

static uint8_t centuryRegister = 0
 
static port_t addressPort = 0
 
static port_t dataPort = 0
 
static lock_t lock = LOCK_CREATE()
 
static clock_source_t source
 

Function Documentation

◆ _module_procedure()

uint64_t _module_procedure ( const module_event_t event)

Definition at line 126 of file rtc.c.

Here is the call graph for this function:

◆ MODULE_INFO()

MODULE_INFO ( "RTC Driver"  ,
"Kai Norberg"  ,
"A driver for the CMOS Real Time Clock"  ,
OS_VERSION  ,
"MIT"  ,
"PNP0B00"   
)