Skip to content

Commit

Permalink
Merge pull request #168 from AdinAck/fix-temp-example
Browse files Browse the repository at this point in the history
Fix ADC Example Temperature Conversion
  • Loading branch information
therealprof authored Sep 30, 2023
2 parents b782375 + 97696ff commit eed06fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Added

- PWM complementary output capability for TIM1 with new example to demonstrate

### Changed

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

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

### Fixed

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

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

Expand Down
2 changes: 1 addition & 1 deletion examples/adc_values.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fn SysTick() {
if let Some(ref mut shared) = SHARED.borrow(cs).borrow_mut().deref_mut() {
// Read temperature data from internal sensor using ADC
let t = hal::adc::VTemp::read(&mut shared.adc, None);
writeln!(shared.tx, "Temperature {}.{}C\r", t / 100, t % 100).ok();
writeln!(shared.tx, "Temperature {}.{}C\r", t / 10, t % 10).ok();

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

0 comments on commit eed06fb

Please sign in to comment.