aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAaron Tsui <[email protected]>2022-12-20 14:59:49 +0800
committerAaron Tsui <[email protected]>2022-12-20 14:59:49 +0800
commit5ae91ed3b64a086b15a949477a5762a3876307c5 (patch)
tree74bfb11444e88d9721e24fb47d32840a8d6baf55 /examples
parent849a0e174fa1601236050afb72290174675c585f (diff)
cargo fmt
Diffstat (limited to 'examples')
-rw-r--r--examples/rp/src/bin/adc.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/rp/src/bin/adc.rs b/examples/rp/src/bin/adc.rs
index 25e5126b4..4202fd394 100644
--- a/examples/rp/src/bin/adc.rs
+++ b/examples/rp/src/bin/adc.rs
@@ -34,5 +34,5 @@ async fn main(_spawner: Spawner) {
34 34
35fn convert_to_celsius(raw_temp: u16) -> f32 { 35fn convert_to_celsius(raw_temp: u16) -> f32 {
36 // According to chapter 4.9.5. Temperature Sensor in RP2040 datasheet 36 // According to chapter 4.9.5. Temperature Sensor in RP2040 datasheet
37 27.0 - (raw_temp as f32 * 3.3 / 4096.0 -0.706)/0.001721 as f32 37 27.0 - (raw_temp as f32 * 3.3 / 4096.0 - 0.706) / 0.001721 as f32
38} \ No newline at end of file 38}