Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions boards/atsame54_xpro/src/devices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ hal::bsp_peripherals!(
);

/// UART pads for the extension 1 connection
pub type Ext1UartPads = uart::Pads<Ext1UartSercom, Ext1UartRx, Ext1UartTx>;
pub type Ext1UartPads = uart::Pads<Ext1UartRx, Ext1UartTx>;

/// Extension 1 UART device
pub type Ext1Uart = uart::Uart<uart::Config<Ext1UartPads>, uart::Duplex>;
Expand All @@ -55,7 +55,7 @@ pub fn ext1_uart(

/// UART pads for the extension 1 connection with flow control
pub type Ext1FlowControlUartPads =
uart::Pads<Ext1UartSercom, Ext1UartRx, Ext1UartTx, Ext1UartRts, Ext1UartCts>;
uart::Pads<Ext1UartRx, Ext1UartTx, Ext1UartRts, Ext1UartCts>;

/// Extension 1 UART device with flow control
pub type Ext1FlowControlUart = uart::Uart<uart::Config<Ext1FlowControlUartPads>, uart::Duplex>;
Expand Down Expand Up @@ -85,7 +85,7 @@ pub fn ext1_flow_control_uart(
}

/// UART pads for the extension 3 connection
pub type Ext3UartPads = uart::Pads<Ext3UartSercom, Ext3UartRx, Ext3UartTx>;
pub type Ext3UartPads = uart::Pads<Ext3UartRx, Ext3UartTx>;

/// Extension 3 UART device
pub type Ext3Uart = uart::Uart<uart::Config<Ext3UartPads>, uart::Duplex>;
Expand All @@ -108,7 +108,7 @@ pub fn ext3_uart(
}

/// UART pads for the EDBG connection
pub type EdbgUartPads = uart::Pads<EdbgUartSercom, EdbgUartRx, EdbgUartTx>;
pub type EdbgUartPads = uart::Pads<EdbgUartRx, EdbgUartTx>;

/// EDBG connection UART device
pub type EdbgUart = uart::Uart<uart::Config<EdbgUartPads>, uart::Duplex>;
Expand All @@ -131,7 +131,7 @@ pub fn edbg_uart(
}

/// I2C pads for the extension 1 connection
pub type Ext1I2cPads = i2c::Pads<Ext1I2cSercom, Ext1I2cSda, Ext1I2cScl>;
pub type Ext1I2cPads = i2c::Pads<Ext1I2cSda, Ext1I2cScl>;

/// Extension 1 I2C device
pub type Ext1I2c = i2c::I2c<i2c::Config<Ext1I2cPads>>;
Expand All @@ -155,7 +155,7 @@ pub fn ext1_i2c(
}

/// SPI pads for the extension 1 connection
pub type Ext1SpiPads = spi::Pads<Ext1SpiSercom, Ext1SpiMiso, Ext1SpiMosi, Ext1SpiSck>;
pub type Ext1SpiPads = spi::Pads<Ext1SpiMiso, Ext1SpiMosi, Ext1SpiSck>;

/// Extension 1 SPI device
pub type Ext1Spi = spi::Spi<spi::Config<Ext1SpiPads>, spi::Duplex>;
Expand All @@ -182,7 +182,7 @@ pub fn ext1_spi(
}

/// UART pads for the extension 2 connection
pub type Ext2UartPads = uart::Pads<Ext2UartSercom, Ext2UartRx, Ext2UartTx>;
pub type Ext2UartPads = uart::Pads<Ext2UartRx, Ext2UartTx>;

/// Extension 2 UART device
pub type Ext2Uart = uart::Uart<uart::Config<Ext2UartPads>, uart::Duplex>;
Expand All @@ -205,7 +205,7 @@ pub fn ext2_uart(
}

/// SPI pads for the extension 2 connection
pub type Ext2SpiPads = spi::Pads<Ext2SpiSercom, Ext2SpiMiso, Ext2SpiMosi, Ext2SpiSck>;
pub type Ext2SpiPads = spi::Pads<Ext2SpiMiso, Ext2SpiMosi, Ext2SpiSck>;

/// Extension 1 SPI device
pub type Ext2Spi = spi::Spi<spi::Config<Ext2SpiPads>, spi::Duplex>;
Expand All @@ -232,7 +232,7 @@ pub fn ext2_spi(
}

/// SPI pads for the extension 3 connection
pub type Ext3SpiPads = spi::Pads<Ext3SpiSercom, Ext3SpiMiso, Ext3SpiMosi, Ext3SpiSck>;
pub type Ext3SpiPads = spi::Pads<Ext3SpiMiso, Ext3SpiMosi, Ext3SpiSck>;

/// Extension 3 SPI device
pub type Ext3Spi = spi::Spi<spi::Config<Ext3SpiPads>, spi::Duplex>;
Expand All @@ -259,7 +259,7 @@ pub fn ext3_spi(
}

/// SPI pads for the DGI connection
pub type DgiSpiPads = spi::Pads<DgiSpiSercom, DgiSpiMiso, DgiSpiMosi, DgiSpiSck>;
pub type DgiSpiPads = spi::Pads<DgiSpiMiso, DgiSpiMosi, DgiSpiSck>;

/// DGI SPI device
pub type DgiSpi = spi::Spi<spi::Config<DgiSpiPads>, spi::Duplex>;
Expand All @@ -286,7 +286,7 @@ pub fn dgi_spi(
}

/// I2C pads for the extension 2 connection
pub type Ext2I2cPads = i2c::Pads<Ext2I2cSercom, Ext2I2cSda, Ext2I2cScl>;
pub type Ext2I2cPads = i2c::Pads<Ext2I2cSda, Ext2I2cScl>;

/// Extension 2 I2C device
pub type Ext2I2c = i2c::I2c<i2c::Config<Ext2I2cPads>>;
Expand All @@ -310,7 +310,7 @@ pub fn ext2_i2c(
}

/// I2C pads for the extension 3 connection
pub type Ext3I2cPads = i2c::Pads<Ext3I2cSercom, Ext3I2cSda, Ext3I2cScl>;
pub type Ext3I2cPads = i2c::Pads<Ext3I2cSda, Ext3I2cScl>;

/// Extension 3 I2C device
pub type Ext3I2c = i2c::I2c<i2c::Config<Ext3I2cPads>>;
Expand All @@ -334,7 +334,7 @@ pub fn ext3_i2c(
}

/// I2C pads for the DGI connection
pub type DgiI2cPads = i2c::Pads<DgiI2cSercom, Ext3I2cSda, Ext3I2cScl>;
pub type DgiI2cPads = i2c::Pads<Ext3I2cSda, Ext3I2cScl>;

/// DGI I2C device
pub type DgiI2c = i2c::I2c<i2c::Config<DgiI2cPads>>;
Expand Down
4 changes: 2 additions & 2 deletions boards/feather_m0/examples/async_i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use defmt_rtt as _;
use panic_probe as _;

use bsp::hal;
use bsp::pac;
use bsp::{pac, Scl, Sda};
use feather_m0 as bsp;
use hal::ehal_async::i2c::I2c;
use hal::{
Expand Down Expand Up @@ -37,7 +37,7 @@ async fn main(_s: embassy_executor::Spawner) {
let pins = bsp::Pins::new(peripherals.port);

// Take SDA and SCL
let (sda, scl) = (pins.sda, pins.scl);
let (sda, scl): (Sda, Scl) = (pins.sda.into(), pins.scl.into());
let i2c_sercom = bsp::periph_alias!(peripherals.i2c_sercom);

// Initialize DMA Controller
Expand Down
4 changes: 2 additions & 2 deletions boards/feather_m0/examples/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use feather_m0 as bsp;

use bsp::entry;
use bsp::hal;
use bsp::pac;
use bsp::{pac, Scl, Sda};

use cortex_m::asm;
use pac::Peripherals;
Expand Down Expand Up @@ -43,7 +43,7 @@ fn main() -> ! {
let pins = bsp::Pins::new(peripherals.port);

// Take SDA and SCL
let (sda, scl) = (pins.sda, pins.scl);
let (sda, scl): (Sda, Scl) = (pins.sda.into(), pins.scl.into());

// Setup DMA channels for later use
let mut dmac = DmaController::init(dmac, &mut pm);
Expand Down
6 changes: 3 additions & 3 deletions boards/feather_m0/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ pub use pins::*;
/// SPI pads for the labelled SPI peripheral
///
/// You can use these pads with other, user-defined [`spi::Config`]urations.
pub type SpiPads = spi::Pads<SpiSercom, Miso, Mosi, Sclk>;
pub type SpiPads = spi::Pads<Miso, Mosi, Sclk>;

/// SPI master for the labelled SPI peripheral
///
Expand Down Expand Up @@ -305,7 +305,7 @@ pub fn spi_master(
/// I2C pads for the labelled I2C peripheral
///
/// You can use these pads with other, user-defined [`i2c::Config`]urations.
pub type I2cPads = i2c::Pads<I2cSercom, Sda, Scl>;
pub type I2cPads = i2c::Pads<Sda, Scl>;

/// I2C master for the labelled I2C peripheral
///
Expand Down Expand Up @@ -333,7 +333,7 @@ pub fn i2c_master(
}

/// UART pads for the labelled RX & TX pins
pub type UartPads = uart::Pads<UartSercom, UartRx, UartTx>;
pub type UartPads = uart::Pads<UartRx, UartTx>;

/// UART device for the labelled RX & TX pins
pub type Uart = uart::Uart<uart::Config<UartPads>, uart::Duplex>;
Expand Down
2 changes: 1 addition & 1 deletion boards/feather_m4/examples/clocking_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ mod app {

use atsamd_hal::sercom::uart;

let pads = uart::Pads::default().rx(pins.pa05).tx(pins.pa04);
let pads = uart::Pads::default().rx(pins.pa05.into()).tx(pins.pa04.into());
// In the future, the `Uart` will take ownership of the `Pclk` and will
// take an `ApbClk` instead of `&MCLK`
let mut uart = uart::Config::new(&mclk, device.sercom0, pads, pclk_sercom0.freq())
Expand Down
4 changes: 2 additions & 2 deletions boards/feather_m4/examples/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use feather_m4 as bsp;

use bsp::hal;
use bsp::pac;
use bsp::{entry, periph_alias};
use bsp::{entry, periph_alias, Scl, Sda};

use cortex_m::asm;
use pac::Peripherals;
Expand Down Expand Up @@ -44,7 +44,7 @@ fn main() -> ! {
let pins = bsp::Pins::new(peripherals.port);

// Take SDA and SCL
let (sda, scl) = (pins.sda, pins.scl);
let (sda, scl): (Sda, Scl) = (pins.sda.into(), pins.scl.into());

// Setup DMA channels for later use
let mut dmac = DmaController::init(dmac, &mut peripherals.pm);
Expand Down
6 changes: 3 additions & 3 deletions boards/feather_m4/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ hal::bsp_pins!(
/// SPI pads for the labelled SPI peripheral
///
/// You can use these pads with other, user-defined [`spi::Config`]urations.
pub type SpiPads = spi::Pads<SpiSercom, Miso, Mosi, Sclk>;
pub type SpiPads = spi::Pads<Miso, Mosi, Sclk>;

/// SPI master for the labelled SPI peripheral
///
Expand Down Expand Up @@ -202,7 +202,7 @@ pub fn spi_master(
/// I2C pads for the labelled I2C peripheral
///
/// You can use these pads with other, user-defined [`i2c::Config`]urations.
pub type I2cPads = i2c::Pads<I2cSercom, Sda, Scl>;
pub type I2cPads = i2c::Pads<Sda, Scl>;

/// I2C master for the labelled I2C peripheral
///
Expand Down Expand Up @@ -232,7 +232,7 @@ pub fn i2c_master(
}

/// UART pads for the labelled RX & TX pins
pub type UartPads = uart::Pads<UartSercom, UartRx, UartTx>;
pub type UartPads = uart::Pads<UartRx, UartTx>;

/// UART device for the labelled RX & TX pins
pub type Uart = uart::Uart<uart::Config<UartPads>, uart::Duplex>;
Expand Down
4 changes: 2 additions & 2 deletions boards/metro_m0/examples/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use metro_m0 as bsp;

use bsp::entry;
use bsp::hal;
use bsp::pac;
use bsp::{pac, Scl, Sda};

use cortex_m::asm;
use pac::Peripherals;
Expand Down Expand Up @@ -43,7 +43,7 @@ fn main() -> ! {
let pins = bsp::Pins::new(peripherals.port);

// Take SDA and SCL
let (sda, scl) = (pins.sda, pins.scl);
let (sda, scl): (Sda, Scl) = (pins.sda.into(), pins.scl.into());

// Setup DMA channels for later use
let mut dmac = DmaController::init(dmac, &mut pm);
Expand Down
8 changes: 4 additions & 4 deletions boards/metro_m0/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ pub use pins::*;
/// SPI pads for the labelled SPI peripheral
///
/// You can use these pads with other, user-defined [`spi::Config`]urations.
pub type SpiPads = spi::Pads<Sercom4, Miso, Mosi, Sclk>;
pub type SpiPads = spi::Pads<Miso, Mosi, Sclk>;

/// SPI master for the labelled SPI peripheral
///
Expand Down Expand Up @@ -236,7 +236,7 @@ pub fn spi_master(
}

/// SPI pads for the flash chip
pub type FlashPads = spi::Pads<Sercom5, FlashMiso, FlashMosi, FlashSclk>;
pub type FlashPads = spi::Pads<FlashMiso, FlashMosi, FlashSclk>;

/// SPI master for the labelled SPI peripheral
///
Expand Down Expand Up @@ -273,7 +273,7 @@ pub fn flash_spi_master(
/// I2C pads for the labelled I2C peripheral
///
/// You can use these pads with other, user-defined [`i2c::Config`]urations.
pub type I2cPads = i2c::Pads<Sercom3, Sda, Scl>;
pub type I2cPads = i2c::Pads<Sda, Scl>;

/// I2C master for the labelled I2C peripheral
///
Expand Down Expand Up @@ -301,7 +301,7 @@ pub fn i2c_master(
}

/// UART pads
pub type UartPads = uart::Pads<Sercom0, UartRx, UartTx>;
pub type UartPads = uart::Pads<UartRx, UartTx>;

/// UART device for the labelled RX & TX pins
pub type Uart = uart::Uart<uart::Config<UartPads>, uart::Duplex>;
Expand Down
4 changes: 2 additions & 2 deletions boards/metro_m4/examples/async_i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use defmt_rtt as _;
use panic_probe as _;

use bsp::hal;
use bsp::pac;
use bsp::{pac, Scl, Sda};
use hal::ehal_async::i2c::I2c;
use hal::fugit::Hertz;
use hal::fugit::MillisDuration;
Expand Down Expand Up @@ -47,7 +47,7 @@ async fn main(_s: embassy_executor::Spawner) {
let pins = bsp::Pins::new(peripherals.port);

// Take SDA and SCL
let (sda, scl) = (pins.sda, pins.scl);
let (sda, scl): (Sda, Scl) = (pins.sda.into(), pins.scl.into());
let i2c_sercom = bsp::periph_alias!(peripherals.i2c_sercom);

// Initialize DMA Controller
Expand Down
4 changes: 2 additions & 2 deletions boards/metro_m4/examples/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use panic_semihosting as _;
use metro_m4 as bsp;

use bsp::hal;
use bsp::pac;
use bsp::{entry, periph_alias};
use bsp::{pac, Scl, Sda};

use cortex_m::asm;
use pac::Peripherals;
Expand Down Expand Up @@ -44,7 +44,7 @@ fn main() -> ! {
let pins = bsp::Pins::new(peripherals.port);

// Take SDA and SCL
let (sda, scl) = (pins.sda, pins.scl);
let (sda, scl): (Sda, Scl) = (pins.sda.into(), pins.scl.into());

// Setup DMA channels for later use
let mut dmac = DmaController::init(dmac, &mut peripherals.pm);
Expand Down
6 changes: 3 additions & 3 deletions boards/metro_m4/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ hal::bsp_pins!(
/// SPI pads for the labelled SPI peripheral
///
/// You can use these pads with other, user-defined [`spi::Config`]urations.
pub type SpiPads = spi::Pads<SpiSercom, Miso, Mosi, Sclk>;
pub type SpiPads = spi::Pads<Miso, Mosi, Sclk>;

/// SPI master for the labelled SPI peripheral
///
Expand Down Expand Up @@ -296,7 +296,7 @@ pub fn qspi_master(
/// I2C pads for the labelled I2C peripheral
///
/// You can use these pads with other, user-defined [`i2c::Config`]urations.
pub type I2cPads = i2c::Pads<I2cSercom, Sda, Scl>;
pub type I2cPads = i2c::Pads<Sda, Scl>;

/// I2C master for the labelled I2C peripheral
///
Expand Down Expand Up @@ -326,7 +326,7 @@ pub fn i2c_master(
}

/// UART Pads for the labelled UART peripheral
pub type UartPads = uart::Pads<UartSercom, UartRx, UartTx>;
pub type UartPads = uart::Pads<UartRx, UartTx>;

/// UART device for the labelled RX & TX pins
pub type Uart = uart::Uart<uart::Config<UartPads>, uart::Duplex>;
Expand Down
Loading
Loading