diff --git a/examples/rtic_frame_serial_dma.rs b/examples/rtic_frame_serial_dma.rs index 04742658..51970ab0 100644 --- a/examples/rtic_frame_serial_dma.rs +++ b/examples/rtic_frame_serial_dma.rs @@ -24,8 +24,14 @@ use heapless::{ use panic_halt as _; use rtic::app; use stm32l4xx_hal as hal; -use stm32l4xx_hal::dma::{RxDma, TxDma}; -use stm32l4xx_hal::serial::{Rx, Tx}; +use stm32l4xx_hal::{ + dma::{RxDma, TxDma}, + gpio::{self, Alternate, PushPull}, + serial::{Rx, Tx}, +}; + +type TxPin = gpio::PA2>; +type RxPin = gpio::PA3>; // The pool gives out `Box`s that can hold 8 bytes pool!( @@ -36,8 +42,10 @@ pool!( #[app(device = stm32l4xx_hal::stm32, peripherals = true)] const APP: () = { struct Resources { - frame_reader: FrameReader, RxDma, dma::dma1::C6>, 8>, - frame_sender: FrameSender, TxDma, dma::dma1::C7>, 8>, + frame_reader: + FrameReader, RxDma, dma::dma1::C6>, 8>, + frame_sender: + FrameSender, TxDma, dma::dma1::C7>, 8>, } #[init] diff --git a/examples/serial_echo_rtic.rs b/examples/serial_echo_rtic.rs index e2a81027..e3f39169 100644 --- a/examples/serial_echo_rtic.rs +++ b/examples/serial_echo_rtic.rs @@ -7,16 +7,20 @@ use heapless::{consts::U8, spsc}; use nb::block; use rtt_target::{rprint, rprintln}; use stm32l4xx_hal::{ + gpio::{self, Alternate, PushPull}, pac::{self, USART2}, prelude::*, serial::{self, Config, Serial}, }; +type TxPin = gpio::PA2>; +type RxPin = gpio::PA3>; + #[rtic::app(device = stm32l4xx_hal::pac)] const APP: () = { struct Resources { - rx: serial::Rx, - tx: serial::Tx, + rx: serial::Rx, + tx: serial::Tx, rx_prod: spsc::Producer<'static, u8, U8>, rx_cons: spsc::Consumer<'static, u8, U8>,