diff options
| author | Henk Oordt <[email protected]> | 2024-01-08 13:56:21 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-01-08 13:56:21 +0100 |
| commit | 45b76455257c9b8f213b23f1164e71d8ad94446a (patch) | |
| tree | 86a6ad2d090b8a95eec04b0c5c86f40113c777d3 | |
| parent | 49ee0564ed715edfc1c86c8cced57fd488f5c52a (diff) | |
Make adc::Resolution::to_max_count const
| -rw-r--r-- | embassy-stm32/src/adc/resolution.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-stm32/src/adc/resolution.rs b/embassy-stm32/src/adc/resolution.rs index 64c25a776..9513e1df7 100644 --- a/embassy-stm32/src/adc/resolution.rs +++ b/embassy-stm32/src/adc/resolution.rs | |||
| @@ -56,7 +56,7 @@ impl Resolution { | |||
| 56 | /// Get the maximum reading value for this resolution. | 56 | /// Get the maximum reading value for this resolution. |
| 57 | /// | 57 | /// |
| 58 | /// This is `2**n - 1`. | 58 | /// This is `2**n - 1`. |
| 59 | pub fn to_max_count(&self) -> u32 { | 59 | pub const fn to_max_count(&self) -> u32 { |
| 60 | match self { | 60 | match self { |
| 61 | #[cfg(adc_v4)] | 61 | #[cfg(adc_v4)] |
| 62 | Resolution::SixteenBit => (1 << 16) - 1, | 62 | Resolution::SixteenBit => (1 << 16) - 1, |
