nrf/gpio: remove generics.

This commit is contained in:
Dario Nieuwenhuis 2024-01-22 21:19:18 +01:00
parent 3387ee7238
commit 2bc5e9523d
9 changed files with 86 additions and 89 deletions

View file

@ -21,10 +21,7 @@ bind_interrupts!(struct Irqs {
RNG => embassy_nrf::rng::InterruptHandler<peripherals::RNG>;
});
type MyDriver = Enc28j60<
ExclusiveDevice<Spim<'static, peripherals::SPI3>, Output<'static, peripherals::P0_15>, Delay>,
Output<'static, peripherals::P0_13>,
>;
type MyDriver = Enc28j60<ExclusiveDevice<Spim<'static, peripherals::SPI3>, Output<'static>, Delay>, Output<'static>>;
#[embassy_executor::task]
async fn net_task(stack: &'static Stack<MyDriver>) -> ! {

View file

@ -6,7 +6,7 @@ teleprobe_meta::timeout!(120);
use defmt::{info, unwrap};
use embassy_executor::Spawner;
use embassy_net::{Config, Stack, StackResources};
use embassy_nrf::gpio::{AnyPin, Input, Level, Output, OutputDrive, Pin, Pull};
use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull};
use embassy_nrf::rng::Rng;
use embassy_nrf::spim::{self, Spim};
use embassy_nrf::{bind_interrupts, peripherals};
@ -28,9 +28,9 @@ const WIFI_PASSWORD: &str = "V8YxhKt5CdIAJFud";
async fn wifi_task(
runner: hosted::Runner<
'static,
ExclusiveDevice<Spim<'static, peripherals::SPI3>, Output<'static, peripherals::P0_31>, Delay>,
Input<'static, AnyPin>,
Output<'static, peripherals::P1_05>,
ExclusiveDevice<Spim<'static, peripherals::SPI3>, Output<'static>, Delay>,
Input<'static>,
Output<'static>,
>,
) -> ! {
runner.run().await
@ -53,8 +53,8 @@ async fn main(spawner: Spawner) {
let sck = p.P0_29;
let mosi = p.P0_30;
let cs = Output::new(p.P0_31, Level::High, OutputDrive::HighDrive);
let handshake = Input::new(p.P1_01.degrade(), Pull::Up);
let ready = Input::new(p.P1_04.degrade(), Pull::None);
let handshake = Input::new(p.P1_01, Pull::Up);
let ready = Input::new(p.P1_04, Pull::None);
let reset = Output::new(p.P1_05, Level::Low, OutputDrive::Standard);
let mut config = spim::Config::default();