Fix examples broken by the macro fix.
This commit is contained in:
parent
e7a19a9725
commit
b2c6dc45e3
10 changed files with 10 additions and 14 deletions
|
@ -15,7 +15,7 @@ const ADDRESS: u8 = 0x5F;
|
||||||
const WHOAMI: u8 = 0x0F;
|
const WHOAMI: u8 = 0x0F;
|
||||||
|
|
||||||
#[embassy_executor::main]
|
#[embassy_executor::main]
|
||||||
async fn main(_spawner: Spawner) -> ! {
|
async fn main(_spawner: Spawner) {
|
||||||
info!("Hello world!");
|
info!("Hello world!");
|
||||||
let p = embassy_stm32::init(Default::default());
|
let p = embassy_stm32::init(Default::default());
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ use {defmt_rtt as _, panic_probe as _};
|
||||||
const ALLOW_WRITES: bool = false;
|
const ALLOW_WRITES: bool = false;
|
||||||
|
|
||||||
#[embassy_executor::main]
|
#[embassy_executor::main]
|
||||||
async fn main(_spawner: Spawner) -> ! {
|
async fn main(_spawner: Spawner) {
|
||||||
let mut config = Config::default();
|
let mut config = Config::default();
|
||||||
config.rcc.sys_ck = Some(mhz(48));
|
config.rcc.sys_ck = Some(mhz(48));
|
||||||
config.rcc.pll48 = true;
|
config.rcc.pll48 = true;
|
||||||
|
@ -75,6 +75,4 @@ async fn main(_spawner: Spawner) -> ! {
|
||||||
|
|
||||||
sdmmc.read_block(block_idx, &mut block).await.unwrap();
|
sdmmc.read_block(block_idx, &mut block).await.unwrap();
|
||||||
info!("Read: {=[u8]:X}...{=[u8]:X}", block[..8], block[512 - 8..]);
|
info!("Read: {=[u8]:X}...{=[u8]:X}", block[..8], block[512 - 8..]);
|
||||||
|
|
||||||
loop {}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ async fn main(spawner: Spawner) -> ! {
|
||||||
let r = socket.write_all(&buf).await;
|
let r = socket.write_all(&buf).await;
|
||||||
if let Err(e) = r {
|
if let Err(e) = r {
|
||||||
info!("write error: {:?}", e);
|
info!("write error: {:?}", e);
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
Timer::after(Duration::from_secs(1)).await;
|
Timer::after(Duration::from_secs(1)).await;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ use embassy_stm32::{interrupt, Config};
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
|
||||||
#[embassy_executor::main]
|
#[embassy_executor::main]
|
||||||
async fn main(_spawner: Spawner) -> ! {
|
async fn main(_spawner: Spawner) {
|
||||||
let mut config = Config::default();
|
let mut config = Config::default();
|
||||||
config.rcc.sys_ck = Some(mhz(200));
|
config.rcc.sys_ck = Some(mhz(200));
|
||||||
config.rcc.pll48 = true;
|
config.rcc.pll48 = true;
|
||||||
|
@ -41,6 +41,4 @@ async fn main(_spawner: Spawner) -> ! {
|
||||||
let card = unwrap!(sdmmc.card());
|
let card = unwrap!(sdmmc.card());
|
||||||
|
|
||||||
info!("Card: {:#?}", Debug2Format(card));
|
info!("Card: {:#?}", Debug2Format(card));
|
||||||
|
|
||||||
loop {}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ async fn main(spawner: Spawner) -> ! {
|
||||||
let r = socket.write_all(b"Hello\n").await;
|
let r = socket.write_all(b"Hello\n").await;
|
||||||
if let Err(e) = r {
|
if let Err(e) = r {
|
||||||
info!("write error: {:?}", e);
|
info!("write error: {:?}", e);
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
Timer::after(Duration::from_secs(1)).await;
|
Timer::after(Duration::from_secs(1)).await;
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ async fn main(spawner: Spawner) -> ! {
|
||||||
let r = connection.write_all(b"Hello\n").await;
|
let r = connection.write_all(b"Hello\n").await;
|
||||||
if let Err(e) = r {
|
if let Err(e) = r {
|
||||||
info!("write error: {:?}", e);
|
info!("write error: {:?}", e);
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
Timer::after(Duration::from_secs(1)).await;
|
Timer::after(Duration::from_secs(1)).await;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ const ADDRESS: u8 = 0x5F;
|
||||||
const WHOAMI: u8 = 0x0F;
|
const WHOAMI: u8 = 0x0F;
|
||||||
|
|
||||||
#[embassy_executor::main]
|
#[embassy_executor::main]
|
||||||
async fn main(_spawner: Spawner) -> ! {
|
async fn main(_spawner: Spawner) {
|
||||||
info!("Hello world!");
|
info!("Hello world!");
|
||||||
let p = embassy_stm32::init(Default::default());
|
let p = embassy_stm32::init(Default::default());
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ const ADDRESS: u8 = 0x5F;
|
||||||
const WHOAMI: u8 = 0x0F;
|
const WHOAMI: u8 = 0x0F;
|
||||||
|
|
||||||
#[embassy_executor::main]
|
#[embassy_executor::main]
|
||||||
async fn main(_spawner: Spawner) -> ! {
|
async fn main(_spawner: Spawner) {
|
||||||
let p = embassy_stm32::init(Default::default());
|
let p = embassy_stm32::init(Default::default());
|
||||||
let irq = interrupt::take!(I2C2_EV);
|
let irq = interrupt::take!(I2C2_EV);
|
||||||
let mut i2c = I2c::new(
|
let mut i2c = I2c::new(
|
||||||
|
|
|
@ -16,7 +16,7 @@ const ADDRESS: u8 = 0x5F;
|
||||||
const WHOAMI: u8 = 0x0F;
|
const WHOAMI: u8 = 0x0F;
|
||||||
|
|
||||||
#[embassy_executor::main]
|
#[embassy_executor::main]
|
||||||
async fn main(_spawner: Spawner) -> ! {
|
async fn main(_spawner: Spawner) {
|
||||||
let p = embassy_stm32::init(Default::default());
|
let p = embassy_stm32::init(Default::default());
|
||||||
let irq = interrupt::take!(I2C2_EV);
|
let irq = interrupt::take!(I2C2_EV);
|
||||||
let i2c = I2c::new(
|
let i2c = I2c::new(
|
||||||
|
|
|
@ -13,7 +13,7 @@ const ADDRESS: u8 = 0x5F;
|
||||||
const WHOAMI: u8 = 0x0F;
|
const WHOAMI: u8 = 0x0F;
|
||||||
|
|
||||||
#[embassy_executor::main]
|
#[embassy_executor::main]
|
||||||
async fn main(_spawner: Spawner) -> ! {
|
async fn main(_spawner: Spawner) {
|
||||||
let p = embassy_stm32::init(Default::default());
|
let p = embassy_stm32::init(Default::default());
|
||||||
let irq = interrupt::take!(I2C2_EV);
|
let irq = interrupt::take!(I2C2_EV);
|
||||||
let mut i2c = I2c::new(
|
let mut i2c = I2c::new(
|
||||||
|
|
Loading…
Reference in a new issue