diff options
| author | Felipe Balbi <[email protected]> | 2025-11-18 12:16:14 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-18 12:16:14 -0800 |
| commit | ffe3e5acae6c0038db4176dc7d031b57f865e07f (patch) | |
| tree | f69475bd7f177ad2ceb69d77ea02a408e5bf6ef7 /src/clocks | |
| parent | e07497690faf1c8a14229183f4054f96832b1d5d (diff) | |
Correct gpio driver (#9)
* Correct gpio driver
Signed-off-by: Felipe Balbi <[email protected]>
* Simplify blinky example
Make it look like every other HAL for consistency. While at that, also
rename the example to match the name used by other HALs.
Signed-off-by: Felipe Balbi <[email protected]>
* Add some documentation to GPIO driver
Signed-off-by: Felipe Balbi <[email protected]>
* Enable GPIO clocks during HAL initialization
Provide the user with working GPIO clocks.
Signed-off-by: Felipe Balbi <[email protected]>
---------
Signed-off-by: Felipe Balbi <[email protected]>
Co-authored-by: Felipe Balbi <[email protected]>
Diffstat (limited to 'src/clocks')
| -rw-r--r-- | src/clocks/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/clocks/mod.rs b/src/clocks/mod.rs index e02840592..558fb0278 100644 --- a/src/clocks/mod.rs +++ b/src/clocks/mod.rs | |||
| @@ -874,10 +874,17 @@ pub(crate) mod gate { | |||
| 874 | // other than enabling through the MRCC gate. Currently, these peripherals will | 874 | // other than enabling through the MRCC gate. Currently, these peripherals will |
| 875 | // ALWAYS return `Ok(0)` when calling [`enable_and_reset()`] and/or | 875 | // ALWAYS return `Ok(0)` when calling [`enable_and_reset()`] and/or |
| 876 | // [`SPConfHelper::post_enable_config()`]. | 876 | // [`SPConfHelper::post_enable_config()`]. |
| 877 | impl_cc_gate!(PORT0, mrcc_glb_cc1, mrcc_glb_rst1, port0, NoConfig); | ||
| 877 | impl_cc_gate!(PORT1, mrcc_glb_cc1, mrcc_glb_rst1, port1, NoConfig); | 878 | impl_cc_gate!(PORT1, mrcc_glb_cc1, mrcc_glb_rst1, port1, NoConfig); |
| 878 | impl_cc_gate!(PORT2, mrcc_glb_cc1, mrcc_glb_rst1, port2, NoConfig); | 879 | impl_cc_gate!(PORT2, mrcc_glb_cc1, mrcc_glb_rst1, port2, NoConfig); |
| 879 | impl_cc_gate!(PORT3, mrcc_glb_cc1, mrcc_glb_rst1, port3, NoConfig); | 880 | impl_cc_gate!(PORT3, mrcc_glb_cc1, mrcc_glb_rst1, port3, NoConfig); |
| 881 | impl_cc_gate!(PORT4, mrcc_glb_cc1, mrcc_glb_rst1, port4, NoConfig); | ||
| 882 | |||
| 883 | impl_cc_gate!(GPIO0, mrcc_glb_cc2, mrcc_glb_rst2, gpio0, NoConfig); | ||
| 884 | impl_cc_gate!(GPIO1, mrcc_glb_cc2, mrcc_glb_rst2, gpio1, NoConfig); | ||
| 885 | impl_cc_gate!(GPIO2, mrcc_glb_cc2, mrcc_glb_rst2, gpio2, NoConfig); | ||
| 880 | impl_cc_gate!(GPIO3, mrcc_glb_cc2, mrcc_glb_rst2, gpio3, NoConfig); | 886 | impl_cc_gate!(GPIO3, mrcc_glb_cc2, mrcc_glb_rst2, gpio3, NoConfig); |
| 887 | impl_cc_gate!(GPIO4, mrcc_glb_cc2, mrcc_glb_rst2, gpio4, NoConfig); | ||
| 881 | 888 | ||
| 882 | // These peripherals DO have meaningful configuration, and could fail if the system | 889 | // These peripherals DO have meaningful configuration, and could fail if the system |
| 883 | // clocks do not match their needs. | 890 | // clocks do not match their needs. |
