libElysianVMU 1.6.0
Full-featured, accurate, cross-platform library emulating the Dreamcast's Visual Memory Unit
Loading...
Searching...
No Matches
evmu_battery.h File Reference

Go to the source code of this file.

Data Structures

struct  EvmuBatteryClass
 
struct  EvmuBattery
 

Macros

#define EVMU_BATTERY_NAME   "battery"
 
Type System

Type UUID and cast operators

#define EVMU_BATTERY_TYPE   (GBL_TYPEID(EvmuBattery))
 
#define EVMU_BATTERY(self)   (GBL_CAST(EvmuBattery, self))
 
#define EVMU_BATTERY_CLASS(klass)   (GBL_CLASS_CAST(EvmuBattery, klass))
 
#define EVMU_BATTERY_GET(self)   (GBL_CLASSOF(EvmuBattery, self))
 

Functions

GblType EvmuBattery_type (void)
 

Detailed Description

EvmuBattery BIOS monitor + low battery detection circuit.

EvmuBattery is an EvmuPeripheral which encompasses two things:

  • A low battery alarm which is asserted on Pin 7.1 when low voltage is detected
  • A monitor within the BIOS which listens for this alarm and tells you to change the battery
Warning
The battery alarm is there to ensure that you don't do something like begin writing to flash with a dying battery, which could result in loss of data and filesystem corruption.
Todo:
  • rig up properties
  • battery lifetime profiler API
Author
2023 Falco Girgis

Definition in file evmu_battery.h.

Macro Definition Documentation

◆ EVMU_BATTERY

#define EVMU_BATTERY (   self)    (GBL_CAST(EvmuBattery, self))

Function-style GblInstance cast.

Definition at line 33 of file evmu_battery.h.

◆ EVMU_BATTERY_CLASS

#define EVMU_BATTERY_CLASS (   klass)    (GBL_CLASS_CAST(EvmuBattery, klass))

Function-style GblClass cast.

Definition at line 34 of file evmu_battery.h.

◆ EVMU_BATTERY_GET

#define EVMU_BATTERY_GET (   self)    (GBL_CLASSOF(EvmuBattery, self))

Extract EvmuBatteryClass from GblInstance

Definition at line 35 of file evmu_battery.h.

◆ EVMU_BATTERY_NAME

#define EVMU_BATTERY_NAME   "battery"

GblObject peripheral name.

Definition at line 38 of file evmu_battery.h.

◆ EVMU_BATTERY_TYPE

#define EVMU_BATTERY_TYPE   (GBL_TYPEID(EvmuBattery))

GblType UUID for EvmuBattery.

Definition at line 32 of file evmu_battery.h.

Function Documentation

◆ EvmuBattery_type()

GblType EvmuBattery_type ( void  )

Returns the GblType UUID associated with EvmuBattery.