diff options
| author | Frederik <[email protected]> | 2022-02-11 17:48:32 +0100 |
|---|---|---|
| committer | Frederik <[email protected]> | 2022-02-11 17:48:32 +0100 |
| commit | e4f240823dc684bc0cad9692a796b7df3dd0774a (patch) | |
| tree | c1fba50e01f4660b5f71dfe20f82f14a81c5ba9f | |
| parent | 7a3d28ad0082ca62e806add32c8c0c52a3705b15 (diff) | |
adc cleanup retval
| -rw-r--r-- | embassy-stm32/src/adc/v2.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/embassy-stm32/src/adc/v2.rs b/embassy-stm32/src/adc/v2.rs index e5a1ddc67..f70170a6a 100644 --- a/embassy-stm32/src/adc/v2.rs +++ b/embassy-stm32/src/adc/v2.rs | |||
| @@ -51,8 +51,7 @@ pub struct Vref; | |||
| 51 | impl<T: Instance> AdcPin<T> for Vref {} | 51 | impl<T: Instance> AdcPin<T> for Vref {} |
| 52 | impl<T: Instance> super::sealed::AdcPin<T> for Vref { | 52 | impl<T: Instance> super::sealed::AdcPin<T> for Vref { |
| 53 | fn channel(&self) -> u8 { | 53 | fn channel(&self) -> u8 { |
| 54 | let val = 17; | 54 | 17 |
| 55 | val | ||
| 56 | } | 55 | } |
| 57 | } | 56 | } |
| 58 | 57 | ||
| @@ -60,8 +59,7 @@ pub struct Temperature; | |||
| 60 | impl<T: Instance> AdcPin<T> for Temperature {} | 59 | impl<T: Instance> AdcPin<T> for Temperature {} |
| 61 | impl<T: Instance> super::sealed::AdcPin<T> for Temperature { | 60 | impl<T: Instance> super::sealed::AdcPin<T> for Temperature { |
| 62 | fn channel(&self) -> u8 { | 61 | fn channel(&self) -> u8 { |
| 63 | let val = 16; | 62 | 16 |
| 64 | val | ||
| 65 | } | 63 | } |
| 66 | } | 64 | } |
| 67 | 65 | ||
| @@ -69,8 +67,7 @@ pub struct Vbat; | |||
| 69 | impl<T: Instance> AdcPin<T> for Vbat {} | 67 | impl<T: Instance> AdcPin<T> for Vbat {} |
| 70 | impl<T: Instance> super::sealed::AdcPin<T> for Vbat { | 68 | impl<T: Instance> super::sealed::AdcPin<T> for Vbat { |
| 71 | fn channel(&self) -> u8 { | 69 | fn channel(&self) -> u8 { |
| 72 | let val = 18; | 70 | 18 |
| 73 | val | ||
| 74 | } | 71 | } |
| 75 | } | 72 | } |
| 76 | 73 | ||
