diff options
| author | James Munns <[email protected]> | 2025-11-25 18:08:13 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-25 18:08:13 +0100 |
| commit | 05bf2d0438fe8c41d0fe26b85106ff73a6e273e9 (patch) | |
| tree | 8a2969ac89735154f8090d629d9c37814a25190a /src/clocks | |
| parent | 7ee5cb570f0c0daeb2e6a9d5120fd96ee885025f (diff) | |
Wire up Lpuart pins (#43)
Allow the HAL lpuart driver to correctly configure pins as requested on init.
Diffstat (limited to 'src/clocks')
| -rw-r--r-- | src/clocks/config.rs | 5 | ||||
| -rw-r--r-- | src/clocks/mod.rs | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/clocks/config.rs b/src/clocks/config.rs index a517afcca..0563b8917 100644 --- a/src/clocks/config.rs +++ b/src/clocks/config.rs | |||
| @@ -21,6 +21,11 @@ impl Div8 { | |||
| 21 | Self(n) | 21 | Self(n) |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | /// Divide by one, or no division | ||
| 25 | pub const fn no_div() -> Self { | ||
| 26 | Self(0) | ||
| 27 | } | ||
| 28 | |||
| 24 | /// Store a specific divisor value that will divide the source | 29 | /// Store a specific divisor value that will divide the source |
| 25 | /// by `n`. e.g. `Div8::from_divisor(1)` will divide the source | 30 | /// by `n`. e.g. `Div8::from_divisor(1)` will divide the source |
| 26 | /// by 1, and `Div8::from_divisor(256)` will divide the source | 31 | /// by 1, and `Div8::from_divisor(256)` will divide the source |
diff --git a/src/clocks/mod.rs b/src/clocks/mod.rs index 948355079..cd6318c4b 100644 --- a/src/clocks/mod.rs +++ b/src/clocks/mod.rs | |||
| @@ -928,6 +928,11 @@ pub(crate) mod gate { | |||
| 928 | #[cfg(not(feature = "time"))] | 928 | #[cfg(not(feature = "time"))] |
| 929 | impl_cc_gate!(OSTIMER0, mrcc_glb_cc1, mrcc_glb_rst1, ostimer0, OsTimerConfig); | 929 | impl_cc_gate!(OSTIMER0, mrcc_glb_cc1, mrcc_glb_rst1, ostimer0, OsTimerConfig); |
| 930 | 930 | ||
| 931 | impl_cc_gate!(LPUART0, mrcc_glb_cc0, mrcc_glb_rst0, lpuart0, LpuartConfig); | ||
| 932 | impl_cc_gate!(LPUART1, mrcc_glb_cc0, mrcc_glb_rst0, lpuart1, LpuartConfig); | ||
| 931 | impl_cc_gate!(LPUART2, mrcc_glb_cc0, mrcc_glb_rst0, lpuart2, LpuartConfig); | 933 | impl_cc_gate!(LPUART2, mrcc_glb_cc0, mrcc_glb_rst0, lpuart2, LpuartConfig); |
| 934 | impl_cc_gate!(LPUART3, mrcc_glb_cc0, mrcc_glb_rst0, lpuart3, LpuartConfig); | ||
| 935 | impl_cc_gate!(LPUART4, mrcc_glb_cc0, mrcc_glb_rst0, lpuart4, LpuartConfig); | ||
| 936 | impl_cc_gate!(LPUART5, mrcc_glb_cc1, mrcc_glb_rst1, lpuart5, LpuartConfig); | ||
| 932 | impl_cc_gate!(ADC1, mrcc_glb_cc1, mrcc_glb_rst1, adc1, AdcConfig); | 937 | impl_cc_gate!(ADC1, mrcc_glb_cc1, mrcc_glb_rst1, adc1, AdcConfig); |
| 933 | } | 938 | } |
