diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2024-12-07 13:58:46 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2024-12-07 13:58:46 -0700 |
| commit | 546a5ccdba66dd8d8c19ce6d8486f46c84637cf2 (patch) | |
| tree | 95b52da91414c1bfbad745c6b55617011012813e /fdl | |
| parent | 9182b65ae2045c5087257751d30409deecf9520a (diff) | |
| download | ch573-546a5ccdba66dd8d8c19ce6d8486f46c84637cf2.tar.gz ch573-546a5ccdba66dd8d8c19ce6d8486f46c84637cf2.tar.bz2 ch573-546a5ccdba66dd8d8c19ce6d8486f46c84637cf2.zip | |
Add way to toggle the default pattern and a way to switch the pattern.
Diffstat (limited to 'fdl')
| -rw-r--r-- | fdl/ch573/gpio.fdl | 16 | ||||
| -rw-r--r-- | fdl/ch573/pfic.fdl | 6 |
2 files changed, 14 insertions, 8 deletions
diff --git a/fdl/ch573/gpio.fdl b/fdl/ch573/gpio.fdl index bab481a..86ffaef 100644 --- a/fdl/ch573/gpio.fdl +++ b/fdl/ch573/gpio.fdl @@ -4,7 +4,7 @@ import "ch573/common.fdl"; package ch573.gpio { location sys_base = 0x4000_1000; - location gpio_base = 0x4000_1018; + location gpio_base = 0x4000_1000; location gpio_port_a_base = 0x4000_10A0; location gpio_port_b_base = 0x4000_10C0; @@ -64,7 +64,7 @@ package ch573.gpio { /** Gpio Type. */ type gpio_t : struct { /** Function pin remapping register. */ - reg pin_alternate(16) : struct { + reg pin_alternate(16) @0x18 : struct { /** * TMR0 function pin mapping selection bit: * @@ -201,22 +201,22 @@ package ch573.gpio { }; /** Port A interrupt enable register. */ - reg pa_interrupt_enable(16); + reg pa_interrupt_enable(16) @0x90; /** Port B interrupt enable register. */ - reg pb_interrupt_enable(16); + reg pb_interrupt_enable(16) @0x92; /** Port A interrupt mode configure register. */ - reg pa_interrupt_mode(16); + reg pa_interrupt_mode(16) @0x94; /** Port B interrupt mode configure register. */ - reg pb_interrupt_mode(16); + reg pb_interrupt_mode(16) @0x96; /** Port A interrupt flag register. */ - reg pa_interrupt_flag(16); + reg pa_interrupt_flag(16) @0x9c; /** Port B interrupt flag register. */ - reg pb_interrupt_flag(16); + reg pb_interrupt_flag(16) @0x9e; }; instance gpio at gpio_base : gpio_t; diff --git a/fdl/ch573/pfic.fdl b/fdl/ch573/pfic.fdl index 13ed54f..2323ad2 100644 --- a/fdl/ch573/pfic.fdl +++ b/fdl/ch573/pfic.fdl @@ -9,6 +9,12 @@ package ch573.pfic { bits interrupts : enum(32) { [[ c: unqualified ]] IRQ_SysTick = 0x1000, + + [[ c: unqualified ]] + IRQ_GpioA = 0x20000, + + [[ c: unqualified ]] + IRQ_GpioB = 0x40000, }; /** Type definition for the PFIC structure */ |