from __future__ import annotations


SCI1_SMR = 0xFED8
SCI1_BRR = 0xFED9
SCI1_SCR = 0xFEDA
SCI1_TDR = 0xFEDB
SCI1_SSR = 0xFEDC
SCI1_RDR = 0xFEDD

P7DDR = 0xFE8C
P7DR = 0xFE8E
P9DDR = 0xFEFE
P9DR = 0xFEFF

IPRA = 0xFF00
IPRC = 0xFF02
IPRE = 0xFF04
WDT_TCSR_R = 0xFEEC

FRT1_TCR = 0xFE90
FRT1_TCSR = 0xFE91
FRT1_FRC_H = 0xFE92
FRT1_FRC_L = 0xFE93
FRT1_OCRA_H = 0xFE94
FRT1_OCRA_L = 0xFE95
FRT2_TCR = 0xFEA0
FRT2_TCSR = 0xFEA1
FRT2_FRC_H = 0xFEA2
FRT2_FRC_L = 0xFEA3
FRT2_OCRA_H = 0xFEA4
FRT2_OCRA_L = 0xFEA5

SCI_SCR_TIE = 0x80
SCI_SCR_RIE = 0x40
SCI_SCR_TE = 0x20
SCI_SCR_RE = 0x10
SCI_SSR_TDRE = 0x80
SCI_SSR_RDRF = 0x40
SCI_SSR_ORER = 0x20
SCI_SSR_FER = 0x10
SCI_SSR_PER = 0x08
FRT_TCR_OCIEA = 0x20
FRT_TCSR_OCFA = 0x20
FRT_TCSR_CCLRA = 0x01

ON_CHIP_RAM_START = 0xF680
ON_CHIP_RAM_END = 0xFE7F
REGISTER_FIELD_START = 0xFE80
REGISTER_FIELD_END = 0xFFFF
RAMCR = 0xFF11

HEARTBEAT_FRAME = bytes([0x00, 0x00, 0x00, 0x00, 0x80, 0xDA])
VECTOR_INTERVAL_TIMER = 0x0042
VECTOR_FRT1_OCIA = 0x0062
VECTOR_FRT2_OCIA = 0x006A
VECTOR_SCI1_ERI = 0x0080
VECTOR_SCI1_RXI = 0x0082
VECTOR_SCI1_TXI = 0x0084
