RTC: Fix threshold/irq_threshold initialization

Also throw some newlines in the kernel print messages.
This commit is contained in:
Byron Lathi
2023-11-19 23:28:11 -08:00
parent 680bccee62
commit 1e9be6c764
2 changed files with 9 additions and 9 deletions

View File

@@ -51,19 +51,19 @@ RTC_CONTROL = $30
lda #$00
sta RTC_DAT
lda #RTC_THRESHOLD+0 ; Set irq threshold to 50 ($32)
lda #RTC_IRQ_THRESHOLD+0 ; Set irq threshold to 50 ($32)
sta RTC_CMD
lda #$32
sta RTC_DAT
lda #RTC_THRESHOLD+1
lda #RTC_IRQ_THRESHOLD+1
sta RTC_CMD
lda #$00
sta RTC_DAT
lda #RTC_THRESHOLD+2
lda #RTC_IRQ_THRESHOLD+2
sta RTC_CMD
lda #$00
sta RTC_DAT
lda #RTC_THRESHOLD+3
lda #RTC_IRQ_THRESHOLD+3
sta RTC_CMD
lda #$00
sta RTC_DAT

View File

@@ -7,19 +7,19 @@ int main() {
cputs("Kernel\n");
// cputs("Init Paging")
// cputs("Init Paging\n")
// init_paging()
// cputs("Initialize Interrupts");
// cputs("Initialize Interrupts\n");
// init_interrupts();
cputs("Initialize Interrupt Controller");
cputs("Initialize Interrupt Controller\n");
init_interrupt_controller();
cputs("Initialize RTC");
cputs("Initialize RTC\n");
init_rtc();
// cputs("Initialize Serial");
// cputs("Initialize Serial\n");
// // init_serial();
// enable_irq(2, IRQ_EDGE);