Skip to content

Commit eed06fb

Browse files
authored
Merge pull request #168 from AdinAck/fix-temp-example
Fix ADC Example Temperature Conversion
2 parents b782375 + 97696ff commit eed06fb

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10-
### Added
11-
12-
- PWM complementary output capability for TIM1 with new example to demonstrate
13-
1410
### Changed
1511

1612
- Updated the `cast` dependency from 0.2 to 0.3
@@ -19,10 +15,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1915

2016
- Provide getters to serial status flags idle/txe/rxne/tc.
2117
- Provide ability to reset timer UIF interrupt flag
18+
- PWM complementary output capability for TIM1 with new example to demonstrate
2219

2320
### Fixed
2421

2522
- Wrong mode when using PWM channel 2 of a two-channel timer
23+
- `adc_values` example conversion error
2624

2725
## [v0.18.0] - 2021-11-14
2826

examples/adc_values.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fn SysTick() {
7979
if let Some(ref mut shared) = SHARED.borrow(cs).borrow_mut().deref_mut() {
8080
// Read temperature data from internal sensor using ADC
8181
let t = hal::adc::VTemp::read(&mut shared.adc, None);
82-
writeln!(shared.tx, "Temperature {}.{}C\r", t / 100, t % 100).ok();
82+
writeln!(shared.tx, "Temperature {}.{}C\r", t / 10, t % 10).ok();
8383

8484
// Read volatage reference data from internal sensor using ADC
8585
let t = hal::adc::VRef::read_vdda(&mut shared.adc);

0 commit comments

Comments
 (0)