fixed rust-analyzer trying to check the top workspace without cross-compiling.
This commit is contained in:
parent
b894d424aa
commit
6f6660fd6a
3 changed files with 15 additions and 1 deletions
11
.cargo/config.toml
Normal file
11
.cargo/config.toml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
|
||||||
|
rustflags = [
|
||||||
|
"-C", "link-arg=-Tlink.x",
|
||||||
|
"-C", "link-arg=-Tdefmt.x",
|
||||||
|
]
|
||||||
|
|
||||||
|
[build]
|
||||||
|
target = "thumbv7em-none-eabihf"
|
||||||
|
|
||||||
|
[env]
|
||||||
|
DEFMT_LOG = "debug"
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"rust-analyzer.check.allTargets": false
|
||||||
|
}
|
|
@ -58,7 +58,7 @@ async fn temp_task(mut temp: Temp<'static>) {
|
||||||
let value: u16 = temp.read().await.to_num();
|
let value: u16 = temp.read().await.to_num();
|
||||||
info!("{} C", value);
|
info!("{} C", value);
|
||||||
let delay = Duration::from_millis(delay_ms);
|
let delay = Duration::from_millis(delay_ms);
|
||||||
if let Some(v) = SIGNAL.wait().with_timeout(delay).await.ok() {
|
if let Ok(v) = SIGNAL.wait().with_timeout(delay).await {
|
||||||
delay_ms = match v {
|
delay_ms = match v {
|
||||||
Button::A => max(INTERVAL_MS, delay_ms.saturating_sub(INTERVAL_MS)),
|
Button::A => max(INTERVAL_MS, delay_ms.saturating_sub(INTERVAL_MS)),
|
||||||
Button::B => delay_ms + INTERVAL_MS,
|
Button::B => delay_ms + INTERVAL_MS,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue