stm32/usart: expose all functionality as inherent methods.
This commit is contained in:
@ -9,7 +9,6 @@ use embassy::executor::Spawner;
|
||||
use embassy_stm32::dma::NoDma;
|
||||
use embassy_stm32::usart::{Config, Uart};
|
||||
use embassy_stm32::Peripherals;
|
||||
use embedded_hal::blocking::serial::Write;
|
||||
use example_common::*;
|
||||
|
||||
#[embassy::main(config = "config()")]
|
||||
@ -42,10 +41,10 @@ async fn main(_spawner: Spawner, p: Peripherals) {
|
||||
// This is because we aren't sending+receiving at the same time.
|
||||
|
||||
let data = [0xC0, 0xDE];
|
||||
usart.bwrite_all(&data).unwrap();
|
||||
usart.blocking_write(&data).unwrap();
|
||||
|
||||
let mut buf = [0; 2];
|
||||
usart.read_blocking(&mut buf).unwrap();
|
||||
usart.blocking_read(&mut buf).unwrap();
|
||||
assert_eq!(buf, data);
|
||||
|
||||
info!("Test OK");
|
||||
|
@ -8,7 +8,6 @@ use defmt::assert_eq;
|
||||
use embassy::executor::Spawner;
|
||||
use embassy_stm32::usart::{Config, Uart};
|
||||
use embassy_stm32::Peripherals;
|
||||
use embassy_traits::uart::{Read, Write};
|
||||
use example_common::*;
|
||||
|
||||
#[embassy::main(config = "config()")]
|
||||
|
12
tests/stm32/teleprobe.sh
Executable file
12
tests/stm32/teleprobe.sh
Executable file
@ -0,0 +1,12 @@
|
||||
echo Running target=$1 elf=$2
|
||||
STATUSCODE=$(
|
||||
curl \
|
||||
-sS \
|
||||
--output /dev/stderr \
|
||||
--write-out "%{http_code}" \
|
||||
-H "Authorization: Bearer $TELEPROBE_TOKEN" \
|
||||
https://teleprobe.embassy.dev/targets/$1/run --data-binary @$2
|
||||
)
|
||||
echo
|
||||
echo HTTP Status code: $STATUSCODE
|
||||
test "$STATUSCODE" -eq 200
|
Reference in New Issue
Block a user