aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2021-11-13 00:51:10 -0700
committerChristian Cunningham <cc@localhost>2021-11-13 00:51:10 -0700
commit45f83cfebe49b4cc073848511c3ee5a12a30a049 (patch)
tree90d2ebe011504ff594f7f2afc844f96524266d8d /src
parentdbd54a6adc72213f8bb015ed156164d140c43b69 (diff)
FIQ Stuff
Diffstat (limited to 'src')
-rw-r--r--src/kernel.S29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/kernel.S b/src/kernel.S
index 0eb1389..4aa5c2d 100644
--- a/src/kernel.S
+++ b/src/kernel.S
@@ -5,6 +5,8 @@ kernel_main:
push {lr}
bl uart_init
bl enable_irq
+ bl enable_fiq
+ bl check_fiq_status
ldr r0, =os_info
bl uart_string
kernel_main.loop:
@@ -12,6 +14,33 @@ kernel_main.loop:
b kernel_main.loop
pop {lr}
+check_fiq_status:
+ push {lr}
+ mov r2, #0xB208
+ movt r2, #0x3F00
+ //mov r3, #57
+ //movt r3, #0
+ //str r3, [r2]
+ ldr r3, [r2]
+ push {r3}
+ mov r0, r3
+ bl uart_hex
+ pop {r3}
+ tst r3, #0x80
+ beq check_fiq_status.off
+ ldr r0, =fiq_on
+ bl uart_string
+ b check_fiq_status.exit
+check_fiq_status.off:
+ ldr r0, =fiq_off
+ bl uart_string
+check_fiq_status.exit:
+ pop {pc}
+
.section ".data"
os_info:
.asciz "Sergey Bilovytskyy's Real Time Operating System\n Version 0.0a\n Interrupt 01: uart rx interrupt\n Exit : Ctrl-A x\n Monitor : Ctrl-A c\n\n"
+fiq_on:
+ .asciz "\nFIQ - Enabled\n"
+fiq_off:
+ .asciz "\nFIQ - Disabled\n"