commit
						8800d29ce2
					
				| @ -34,7 +34,7 @@ impl AdcPin<ADC1> for Temperature {} | |||||||
| impl super::sealed::AdcPin<ADC1> for Temperature { | impl super::sealed::AdcPin<ADC1> for Temperature { | ||||||
|     fn channel(&self) -> u8 { |     fn channel(&self) -> u8 { | ||||||
|         cfg_if::cfg_if! { |         cfg_if::cfg_if! { | ||||||
|             if #[cfg(any(stm32f40, stm32f41))] { |             if #[cfg(any(stm32f2, stm32f40, stm32f41))] { | ||||||
|                 16 |                 16 | ||||||
|             } else { |             } else { | ||||||
|                 18 |                 18 | ||||||
| @ -67,7 +67,11 @@ enum Prescaler { | |||||||
| 
 | 
 | ||||||
| impl Prescaler { | impl Prescaler { | ||||||
|     fn from_pclk2(freq: Hertz) -> Self { |     fn from_pclk2(freq: Hertz) -> Self { | ||||||
|  |         // Datasheet for F2 specifies min frequency 0.6 MHz, and max 30 MHz (with VDDA 2.4-3.6V).
 | ||||||
|  |         #[cfg(stm32f2)] | ||||||
|  |         const MAX_FREQUENCY: Hertz = Hertz(30_000_000); | ||||||
|         // Datasheet for both F4 and F7 specifies min frequency 0.6 MHz, typ freq. 30 MHz and max 36 MHz.
 |         // Datasheet for both F4 and F7 specifies min frequency 0.6 MHz, typ freq. 30 MHz and max 36 MHz.
 | ||||||
|  |         #[cfg(not(stm32f2))] | ||||||
|         const MAX_FREQUENCY: Hertz = Hertz(36_000_000); |         const MAX_FREQUENCY: Hertz = Hertz(36_000_000); | ||||||
|         let raw_div = freq.0 / MAX_FREQUENCY.0; |         let raw_div = freq.0 / MAX_FREQUENCY.0; | ||||||
|         match raw_div { |         match raw_div { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user