FIQ: enable on boot & add support for using custom FIQ handler #110

Merged
sb10q merged 1 commits from morgan/zynq-rs:fiq into master 2024-08-17 17:37:18 +08:00
3 changed files with 4 additions and 2 deletions

View File

@ -18,5 +18,5 @@ embedded-hal = "0.2"
libregister = { path = "../libregister" } libregister = { path = "../libregister" }
libcortex_a9 = { path = "../libcortex_a9" } libcortex_a9 = { path = "../libcortex_a9" }
libboard_zynq = { path = "../libboard_zynq" } libboard_zynq = { path = "../libboard_zynq" }
libsupport_zynq = { path = "../libsupport_zynq", default-features = false, features = ["panic_handler"]} libsupport_zynq = { path = "../libsupport_zynq", default-features = false, features = ["panic_handler", "dummy_fiq_handler"]}
libasync = { path = "../libasync" } libasync = { path = "../libasync" }

View File

@ -12,9 +12,10 @@ target_redpitaya = ["libboard_zynq/target_redpitaya"]
target_kasli_soc = ["libboard_zynq/target_kasli_soc"] target_kasli_soc = ["libboard_zynq/target_kasli_soc"]
panic_handler = [] panic_handler = []
dummy_irq_handler = [] dummy_irq_handler = []
dummy_fiq_handler = []
alloc_core = [] alloc_core = []
default = ["panic_handler", "dummy_irq_handler"] default = ["panic_handler", "dummy_irq_handler", "dummy_fiq_handler"]
[dependencies] [dependencies]
r0 = "1" r0 = "1"

View File

@ -42,6 +42,7 @@ interrupt_handler!(IRQ, irq, __irq_stack0_start, __irq_stack1_start, {
loop {} loop {}
}); });
#[cfg(feature = "dummy_fiq_handler")]
interrupt_handler!(FIQ, fiq, __irq_stack0_start, __irq_stack1_start, { interrupt_handler!(FIQ, fiq, __irq_stack0_start, __irq_stack1_start, {
stdio::drop_uart(); stdio::drop_uart();
println!("FIQ"); println!("FIQ");