sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
aifregs.h File Reference
#include <tamtypes.h>

Go to the source code of this file.

Macros

#define AIF_REGBASE   (SPD_REGBASE + 0x4000000)
#define USE_AIF_REGS
#define AIF_INTCL   AIF_INTSR
#define AIF_INTR_ATA0   (1 << AIF_INUM_ATA0)
#define AIF_INTR_RTC   (1 << AIF_INUM_RTC)
#define AIF_INTR_PCMCIA   (1 << AIF_INUM_PCMCIA)
#define USE_AIF_RTC_REGS
#define RTC_FREQ_SELECT   RTC_REG_A
#define RTC_UIP   0x80
#define RTC_DIV_CTL   0x70
#define RTC_REF_CLCK_4MHZ   0x00
#define RTC_REF_CLCK_1MHZ   0x10
#define RTC_REF_CLCK_32KHZ   0x20
#define RTC_DIV_RESET1   0x60
#define RTC_DIV_RESET2   0x70
#define RTC_RATE_SELECT   0x0F
#define RTC_CONTROL   RTC_REG_B
#define RTC_SET   0x80
#define RTC_PIE   0x40
#define RTC_AIE   0x20
#define RTC_UIE   0x10
#define RTC_SQWE   0x08
#define RTC_DM_BINARY   0x04
#define RTC_24H   0x02
#define RTC_DST_EN   0x01
#define RTC_INTR_FLAGS   RTC_REG_C
#define RTC_IRQF   0x80
#define RTC_PF   0x40
#define RTC_AF   0x20
#define RTC_UF   0x10
#define RTC_VALID   RTC_REG_D
#define RTC_VRT   0x80

Enumerations

enum  AIF_REGS {
  AIF_IDENT = 0x00 , AIF_REVISION , AIF_INTSR , AIF_INTEN ,
  AIF_TIMCFG , AIF_COUNT_L = 0x08 , AIF_COUNT_H , AIF_ATA_TCFG = 0x20 ,
  AIF_ATA = 0x30 , AIF_ATACTL = 0x3C , AIF_RTC = 0x80
}
enum  AIF_INUM { AIF_INUM_ATA0 = 0 , AIF_INUM_RTC , AIF_INUM_PCMCIA , AIF_INUM_COUNT }
enum  RTC_REGS {
  RTC_SECONDS = 0x00 , RTC_SECONDS_ALARM , RTC_MINUTES , RTC_MINUTES_ALARM ,
  RTC_HOURS , RTC_HOURS_ALARM , RTC_DAY_OF_WEEK , RTC_DAY_OF_MONTH ,
  RTC_MONTH , RTC_YEAR , RTC_REG_A , RTC_REG_B ,
  RTC_REG_C , RTC_REG_D
}

Detailed Description

AIF and RTC registers

Definition in file aifregs.h.

Macro Definition Documentation

◆ AIF_INTCL

#define AIF_INTCL   AIF_INTSR

Definition at line 109 of file aifregs.h.

◆ AIF_INTR_ATA0

#define AIF_INTR_ATA0   (1 << AIF_INUM_ATA0)

Definition at line 120 of file aifregs.h.

◆ AIF_INTR_PCMCIA

#define AIF_INTR_PCMCIA   (1 << AIF_INUM_PCMCIA)

Definition at line 122 of file aifregs.h.

◆ AIF_INTR_RTC

#define AIF_INTR_RTC   (1 << AIF_INUM_RTC)

Definition at line 121 of file aifregs.h.

◆ AIF_REGBASE

#define AIF_REGBASE   (SPD_REGBASE + 0x4000000)

Definition at line 90 of file aifregs.h.

◆ RTC_24H

#define RTC_24H   0x02

24 hour mode - else hours bit 7 means pm

Definition at line 182 of file aifregs.h.

◆ RTC_AF

#define RTC_AF   0x20

Definition at line 193 of file aifregs.h.

◆ RTC_AIE

#define RTC_AIE   0x20

alarm interrupt enable

Definition at line 174 of file aifregs.h.

◆ RTC_CONTROL

#define RTC_CONTROL   RTC_REG_B

Definition at line 168 of file aifregs.h.

◆ RTC_DIV_CTL

#define RTC_DIV_CTL   0x70

Definition at line 156 of file aifregs.h.

◆ RTC_DIV_RESET1

#define RTC_DIV_RESET1   0x60

2 values for divider stage reset, others for "testing purposes only"

Definition at line 162 of file aifregs.h.

◆ RTC_DIV_RESET2

#define RTC_DIV_RESET2   0x70

Definition at line 163 of file aifregs.h.

◆ RTC_DM_BINARY

#define RTC_DM_BINARY   0x04

all time/date values are BCD if clear

Definition at line 180 of file aifregs.h.

◆ RTC_DST_EN

#define RTC_DST_EN   0x01

auto switch DST - works f. USA only

Definition at line 184 of file aifregs.h.

◆ RTC_FREQ_SELECT

#define RTC_FREQ_SELECT   RTC_REG_A

Definition at line 148 of file aifregs.h.

◆ RTC_INTR_FLAGS

#define RTC_INTR_FLAGS   RTC_REG_C

Definition at line 188 of file aifregs.h.

◆ RTC_IRQF

#define RTC_IRQF   0x80

any of the following 3 is active

Definition at line 191 of file aifregs.h.

◆ RTC_PF

#define RTC_PF   0x40

Definition at line 192 of file aifregs.h.

◆ RTC_PIE

#define RTC_PIE   0x40

periodic interrupt enable

Definition at line 172 of file aifregs.h.

◆ RTC_RATE_SELECT

#define RTC_RATE_SELECT   0x0F

Periodic intr. / Square wave rate select. 0=none, 1=32.8kHz,... 15=2Hz

Definition at line 165 of file aifregs.h.

◆ RTC_REF_CLCK_1MHZ

#define RTC_REF_CLCK_1MHZ   0x10

Definition at line 159 of file aifregs.h.

◆ RTC_REF_CLCK_32KHZ

#define RTC_REF_CLCK_32KHZ   0x20

Definition at line 160 of file aifregs.h.

◆ RTC_REF_CLCK_4MHZ

#define RTC_REF_CLCK_4MHZ   0x00

divider control: refclock values 4.194 / 1.049 MHz / 32.768 kHz

Definition at line 158 of file aifregs.h.

◆ RTC_SET

#define RTC_SET   0x80

disable updates for clock setting

Definition at line 170 of file aifregs.h.

◆ RTC_SQWE

#define RTC_SQWE   0x08

enable square-wave output

Definition at line 178 of file aifregs.h.

◆ RTC_UF

#define RTC_UF   0x10

Definition at line 194 of file aifregs.h.

◆ RTC_UIE

#define RTC_UIE   0x10

update-finished interrupt enable

Definition at line 176 of file aifregs.h.

◆ RTC_UIP

#define RTC_UIP   0x80

update-in-progress - set to "1" 244 microsecs before RTC goes off the bus, reset after update (may take 1.984ms @ 32768Hz RefClock) is complete, totalling to a max high interval of 2.228 ms.

Definition at line 155 of file aifregs.h.

◆ RTC_VALID

#define RTC_VALID   RTC_REG_D

Definition at line 197 of file aifregs.h.

◆ RTC_VRT

#define RTC_VRT   0x80

valid RAM and time

Definition at line 199 of file aifregs.h.

◆ USE_AIF_REGS

#define USE_AIF_REGS
Value:
volatile u16 *aif_regs = \
(volatile u16 *)AIF_REGBASE

Definition at line 92 of file aifregs.h.

◆ USE_AIF_RTC_REGS

#define USE_AIF_RTC_REGS
Value:
volatile u16 *aif_rtc_regs = \
(&aif_regs[AIF_RTC])

Definition at line 125 of file aifregs.h.

Enumeration Type Documentation

◆ AIF_INUM

enum AIF_INUM

Definition at line 112 of file aifregs.h.

◆ AIF_REGS

enum AIF_REGS

Definition at line 95 of file aifregs.h.

◆ RTC_REGS

enum RTC_REGS

Definition at line 128 of file aifregs.h.