XenevaOS
Loading...
Searching...
No Matches
Macros | Functions | Variables
rtc.cpp File Reference
#include <Drivers/rtc.h>
#include <Hal/x86_64_lowlevel.h>
#include <Hal/hal.h>
#include <Mm/kmalloc.h>
#include <string.h>
#include <autimer.h>
Include dependency graph for rtc.cpp:

Macros

#define CMOS_ADDR   0x70
 
#define CMOS_DATA   0x71
 

Functions

uint8_t AuRTCGetRegister (int reg_num)
 
void AuRTCSetRegister (uint16_t reg_num, uint8_t val)
 
int AuRTCIsUpdating ()
 
void AuRTCReadDateTime ()
 
void AuRTCClockUpdate (size_t v, void *p)
 
void AuRTCInitialize ()
 
uint8_t AuRTCGetYear ()
 
uint8_t AuRTCGetCentury ()
 
uint8_t AuRTCGetMinutes ()
 
uint8_t AuRTCGetSecond ()
 
uint8_t AuRTCGetDay ()
 
uint8_t AuRTCGetHour ()
 
uint8_t AuRTCGetMonth ()
 

Variables

AuRTC__rtc
 

Macro Definition Documentation

◆ CMOS_ADDR

#define CMOS_ADDR   0x70

BSD 2-Clause License

Copyright (c) 2022-2023, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ CMOS_DATA

#define CMOS_DATA   0x71

Function Documentation

◆ AuRTCClockUpdate()

void AuRTCClockUpdate ( size_t  v,
void *  p 
)

◆ AuRTCGetCentury()

uint8_t AuRTCGetCentury ( )

◆ AuRTCGetDay()

uint8_t AuRTCGetDay ( )

◆ AuRTCGetHour()

uint8_t AuRTCGetHour ( )

◆ AuRTCGetMinutes()

uint8_t AuRTCGetMinutes ( )

◆ AuRTCGetMonth()

uint8_t AuRTCGetMonth ( )

◆ AuRTCGetRegister()

uint8_t AuRTCGetRegister ( int  reg_num)

◆ AuRTCGetSecond()

uint8_t AuRTCGetSecond ( )

◆ AuRTCGetYear()

uint8_t AuRTCGetYear ( )

◆ AuRTCInitialize()

void AuRTCInitialize ( )

◆ AuRTCIsUpdating()

int AuRTCIsUpdating ( )

◆ AuRTCReadDateTime()

void AuRTCReadDateTime ( )

◆ AuRTCSetRegister()

void AuRTCSetRegister ( uint16_t  reg_num,
uint8_t  val 
)

Variable Documentation

◆ __rtc

AuRTC* __rtc