Skip to content

Commit

Permalink
Rework how pin capabilities are declared (#2400)
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani authored Oct 24, 2024
1 parent a7d8b20 commit 19b08ef
Show file tree
Hide file tree
Showing 8 changed files with 239 additions and 241 deletions.
42 changes: 20 additions & 22 deletions esp-hal/src/gpio/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -966,33 +966,29 @@ fn on_pin_irq(pin_nr: u8) {
#[doc(hidden)]
#[macro_export]
macro_rules! if_output_pin {
(InputOutputAnalog, { $($then:tt)* } else { $($else:tt)* } ) => { $($then)* };
(InputOutputAnalogTouch, { $($then:tt)* } else { $($else:tt)* } ) => { $($then)* };
(InputOutput, { $($then:tt)* } else { $($else:tt)* } ) => { $($then)* };
($other:ident, { $($then:tt)* } else { $($else:tt)* } ) => { $($else)* };
// Base case: not an Output pin, substitute the else branch
({ $($then:tt)* } else { $($else:tt)* }) => { $($else)* };

// First is an Output pin, skip checking and substitute the then branch
(Output $(, $other:ident)* { $($then:tt)* } else { $($else:tt)* }) => { $($then)* };

// First is not an Output pin, check the rest
($not:ident $(, $other:ident)* { $($then:tt)* } else { $($else:tt)* }) => {
$crate::if_output_pin!($($other),* { $($then)* } else { $($else)* })
};
}
pub(crate) use if_output_pin;

#[doc(hidden)]
#[macro_export]
macro_rules! io_types {
(InputOnly, $gpionum:literal) => {
impl $crate::gpio::InputPin for GpioPin<$gpionum> {}
};
(InputOnlyAnalog, $gpionum:literal) => {
impl $crate::gpio::InputPin for GpioPin<$gpionum> {}
};
(InputOutput, $gpionum:literal) => {
macro_rules! io_type {
(Input, $gpionum:literal) => {
impl $crate::gpio::InputPin for GpioPin<$gpionum> {}
impl $crate::gpio::OutputPin for GpioPin<$gpionum> {}
};
(InputOutputAnalog, $gpionum:literal) => {
impl $crate::gpio::InputPin for GpioPin<$gpionum> {}
(Output, $gpionum:literal) => {
impl $crate::gpio::OutputPin for GpioPin<$gpionum> {}
};
(InputOutputAnalogTouch, $gpionum:literal) => {
impl $crate::gpio::InputPin for GpioPin<$gpionum> {}
impl $crate::gpio::OutputPin for GpioPin<$gpionum> {}
($other:ident, $gpionum:literal) => {
// TODO
};
}

Expand All @@ -1001,7 +997,7 @@ macro_rules! io_types {
macro_rules! gpio {
(
$(
($gpionum:literal, $bank:literal, $type:ident
($gpionum:literal, $bank:literal, [$($type:tt),*]
$(
( $( $af_input_num:literal => $af_input_signal:ident )* )
( $( $af_output_num:literal => $af_output_signal:ident )* )
Expand Down Expand Up @@ -1034,7 +1030,9 @@ macro_rules! gpio {
}

$(
$crate::io_types!($type, $gpionum);
$(
$crate::io_type!($type, $gpionum);
)*

impl $crate::gpio::Pin for GpioPin<$gpionum> {
fn number(&self) -> u8 {
Expand Down Expand Up @@ -1106,7 +1104,7 @@ macro_rules! gpio {
($this:expr, $inner:ident, $code:tt) => {
match $this {
$(
AnyPinInner::[<Gpio $gpionum >]($inner) => if_output_pin!($type, {
AnyPinInner::[<Gpio $gpionum >]($inner) => $crate::if_output_pin!($($type),* {
$code
} else {{
let _ = $inner;
Expand Down
72 changes: 36 additions & 36 deletions esp-hal/src/soc/esp32/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,42 +528,42 @@ pub enum OutputSignal {
}

crate::gpio::gpio! {
(0, 0, InputOutputAnalogTouch (5 => EMAC_TX_CLK) (1 => CLK_OUT1))
(1, 0, InputOutput (5 => EMAC_RXD2) (0 => U0TXD 1 => CLK_OUT3))
(2, 0, InputOutputAnalogTouch (1 => HSPIWP 3 => HS2_DATA0 4 => SD_DATA0) (3 => HS2_DATA0 4 => SD_DATA0))
(3, 0, InputOutput (0 => U0RXD) (1 => CLK_OUT2))
(4, 0, InputOutputAnalogTouch (1 => HSPIHD 3 => HS2_DATA1 4 => SD_DATA1 5 => EMAC_TX_ER) (3 => HS2_DATA1 4 => SD_DATA1))
(5, 0, InputOutput (1 => VSPICS0 3 => HS1_DATA6 5 => EMAC_RX_CLK) (3 => HS1_DATA6))
(6, 0, InputOutput (4 => U1CTS) (0 => SD_CLK 1 => SPICLK 3 => HS1_CLK))
(7, 0, InputOutput (0 => SD_DATA0 1 => SPIQ 3 => HS1_DATA0) (0 => SD_DATA0 1 => SPIQ 3 => HS1_DATA0 4 => U2RTS))
(8, 0, InputOutput (0 => SD_DATA1 1 => SPID 3 => HS1_DATA1 4 => U2CTS) (0 => SD_DATA1 1 => SPID 3 => HS1_DATA1))
(9, 0, InputOutput (0 => SD_DATA2 1 => SPIHD 3 => HS1_DATA2 4 => U1RXD) (0 => SD_DATA2 1 => SPIHD 3 => HS1_DATA2))
(10, 0, InputOutput ( 0 => SD_DATA3 1 => SPIWP 3 => HS1_DATA3) (0 => SD_DATA3 1 => SPIWP 3 => HS1_DATA3 4 => U1TXD))
(11, 0, InputOutput ( 1 => SPICS0) (0 => SD_CMD 1 => SPICS0 3 => HS1_CMD 4 => U1RTS))
(12, 0, InputOutputAnalogTouch (0 => MTDI 1 => HSPIQ 3 => HS2_DATA2 4 => SD_DATA2) (1 => HSPIQ 3 => HS2_DATA2 4 => SD_DATA2 5 => EMAC_TXD3))
(13, 0, InputOutputAnalogTouch (0 => MTCK 1 => HSPID 3 => HS2_DATA3 4 => SD_DATA3) (1 => HSPID 3 => HS2_DATA3 4 => SD_DATA3 5 => EMAC_RX_ER))
(14, 0, InputOutputAnalogTouch (0 => MTMS 1 => HSPICLK) (1 => HSPICLK 3 => HS2_CLK 4 => SD_CLK 5 => EMAC_TXD2))
(15, 0, InputOutputAnalogTouch (1 => HSPICS0 5 => EMAC_RXD3) (0 => MTDO 1 => HSPICS0 3 => HS2_CMD 4 => SD_CMD))
(16, 0, InputOutput (3 => HS1_DATA4 4 => U2RXD) (3 => HS1_DATA4 5 => EMAC_CLK_OUT))
(17, 0, InputOutput (3 => HS1_DATA5) (3 => HS1_DATA5 4 => U2TXD 5 => EMAC_CLK_180))
(18, 0, InputOutput (1 => VSPICLK 3 => HS1_DATA7) (1 => VSPICLK 3 => HS1_DATA7))
(19, 0, InputOutput (1 => VSPIQ 3 => U0CTS) (1 => VSPIQ 5 => EMAC_TXD0))
(20, 0, InputOutput)
(21, 0, InputOutput (1 => VSPIHD) (1 => VSPIHD 5 => EMAC_TX_EN))
(22, 0, InputOutput (1 => VSPIWP) (1 => VSPIWP 3 => U0RTS 5 => EMAC_TXD1))
(23, 0, InputOutput (1 => VSPID) (1 => VSPID 3 => HS1_STROBE))
(24, 0, InputOutput)
(25, 0, InputOutputAnalog (5 => EMAC_RXD0) ())
(26, 0, InputOutputAnalog (5 => EMAC_RXD1) ())
(27, 0, InputOutputAnalogTouch (5 => EMAC_RX_DV) ())
(32, 1, InputOutputAnalogTouch)
(33, 1, InputOutputAnalogTouch)
(34, 1, InputOnlyAnalog)
(35, 1, InputOnlyAnalog)
(36, 1, InputOnlyAnalog)
(37, 1, InputOnlyAnalog)
(38, 1, InputOnlyAnalog)
(39, 1, InputOnlyAnalog)
(0, 0, [Input, Output, Analog, RtcIo, Touch] (5 => EMAC_TX_CLK) (1 => CLK_OUT1))
(1, 0, [Input, Output] (5 => EMAC_RXD2) (0 => U0TXD 1 => CLK_OUT3))
(2, 0, [Input, Output, Analog, RtcIo, Touch] (1 => HSPIWP 3 => HS2_DATA0 4 => SD_DATA0) (3 => HS2_DATA0 4 => SD_DATA0))
(3, 0, [Input, Output] (0 => U0RXD) (1 => CLK_OUT2))
(4, 0, [Input, Output, Analog, RtcIo, Touch] (1 => HSPIHD 3 => HS2_DATA1 4 => SD_DATA1 5 => EMAC_TX_ER) (3 => HS2_DATA1 4 => SD_DATA1))
(5, 0, [Input, Output] (1 => VSPICS0 3 => HS1_DATA6 5 => EMAC_RX_CLK) (3 => HS1_DATA6))
(6, 0, [Input, Output] (4 => U1CTS) (0 => SD_CLK 1 => SPICLK 3 => HS1_CLK))
(7, 0, [Input, Output] (0 => SD_DATA0 1 => SPIQ 3 => HS1_DATA0) (0 => SD_DATA0 1 => SPIQ 3 => HS1_DATA0 4 => U2RTS))
(8, 0, [Input, Output] (0 => SD_DATA1 1 => SPID 3 => HS1_DATA1 4 => U2CTS) (0 => SD_DATA1 1 => SPID 3 => HS1_DATA1))
(9, 0, [Input, Output] (0 => SD_DATA2 1 => SPIHD 3 => HS1_DATA2 4 => U1RXD) (0 => SD_DATA2 1 => SPIHD 3 => HS1_DATA2))
(10, 0, [Input, Output] ( 0 => SD_DATA3 1 => SPIWP 3 => HS1_DATA3) (0 => SD_DATA3 1 => SPIWP 3 => HS1_DATA3 4 => U1TXD))
(11, 0, [Input, Output] ( 1 => SPICS0) (0 => SD_CMD 1 => SPICS0 3 => HS1_CMD 4 => U1RTS))
(12, 0, [Input, Output, Analog, RtcIo, Touch] (0 => MTDI 1 => HSPIQ 3 => HS2_DATA2 4 => SD_DATA2) (1 => HSPIQ 3 => HS2_DATA2 4 => SD_DATA2 5 => EMAC_TXD3))
(13, 0, [Input, Output, Analog, RtcIo, Touch] (0 => MTCK 1 => HSPID 3 => HS2_DATA3 4 => SD_DATA3) (1 => HSPID 3 => HS2_DATA3 4 => SD_DATA3 5 => EMAC_RX_ER))
(14, 0, [Input, Output, Analog, RtcIo, Touch] (0 => MTMS 1 => HSPICLK) (1 => HSPICLK 3 => HS2_CLK 4 => SD_CLK 5 => EMAC_TXD2))
(15, 0, [Input, Output, Analog, RtcIo, Touch] (1 => HSPICS0 5 => EMAC_RXD3) (0 => MTDO 1 => HSPICS0 3 => HS2_CMD 4 => SD_CMD))
(16, 0, [Input, Output] (3 => HS1_DATA4 4 => U2RXD) (3 => HS1_DATA4 5 => EMAC_CLK_OUT))
(17, 0, [Input, Output] (3 => HS1_DATA5) (3 => HS1_DATA5 4 => U2TXD 5 => EMAC_CLK_180))
(18, 0, [Input, Output] (1 => VSPICLK 3 => HS1_DATA7) (1 => VSPICLK 3 => HS1_DATA7))
(19, 0, [Input, Output] (1 => VSPIQ 3 => U0CTS) (1 => VSPIQ 5 => EMAC_TXD0))
(20, 0, [Input, Output])
(21, 0, [Input, Output] (1 => VSPIHD) (1 => VSPIHD 5 => EMAC_TX_EN))
(22, 0, [Input, Output] (1 => VSPIWP) (1 => VSPIWP 3 => U0RTS 5 => EMAC_TXD1))
(23, 0, [Input, Output] (1 => VSPID) (1 => VSPID 3 => HS1_STROBE))
(24, 0, [Input, Output])
(25, 0, [Input, Output, Analog, RtcIo] (5 => EMAC_RXD0) ())
(26, 0, [Input, Output, Analog, RtcIo] (5 => EMAC_RXD1) ())
(27, 0, [Input, Output, Analog, RtcIo, Touch] (5 => EMAC_RX_DV) ())
(32, 1, [Input, Output, Analog, RtcIo, Touch])
(33, 1, [Input, Output, Analog, RtcIo, Touch])
(34, 1, [Input, Analog, RtcIoInput])
(35, 1, [Input, Analog, RtcIoInput])
(36, 1, [Input, Analog, RtcIoInput])
(37, 1, [Input, Analog, RtcIoInput])
(38, 1, [Input, Analog, RtcIoInput])
(39, 1, [Input, Analog, RtcIoInput])
}

crate::gpio::analog! {
Expand Down
28 changes: 14 additions & 14 deletions esp-hal/src/soc/esp32c2/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,20 +172,20 @@ pub enum OutputSignal {
}

crate::gpio::gpio! {
(0, 0, InputOutputAnalog)
(1, 0, InputOutputAnalog)
(2, 0, InputOutputAnalog (2 => FSPIQ) (2 => FSPIQ))
(3, 0, InputOutputAnalog)
(4, 0, InputOutputAnalog (2 => FSPIHD) (2 => FSPIHD))
(5, 0, InputOutput (2 => FSPIWP) (2 => FSPIWP))
(6, 0, InputOutput (2 => FSPICLK) (2 => FSPICLK_MUX))
(7, 0, InputOutput (2 => FSPID) (2 => FSPID))
(8, 0, InputOutput)
(9, 0, InputOutput)
(10, 0, InputOutput (2 => FSPICS0) (2 => FSPICS0))
(18, 0, InputOutput)
(19, 0, InputOutput)
(20, 0, InputOutput (0 => U0RXD) ())
(0, 0, [Input, Output, Analog, RtcIo])
(1, 0, [Input, Output, Analog, RtcIo])
(2, 0, [Input, Output, Analog, RtcIo] (2 => FSPIQ) (2 => FSPIQ))
(3, 0, [Input, Output, Analog, RtcIo])
(4, 0, [Input, Output, Analog, RtcIo] (2 => FSPIHD) (2 => FSPIHD))
(5, 0, [Input, Output, Analog, RtcIo] (2 => FSPIWP) (2 => FSPIWP))
(6, 0, [Input, Output] (2 => FSPICLK) (2 => FSPICLK_MUX))
(7, 0, [Input, Output] (2 => FSPID) (2 => FSPID))
(8, 0, [Input, Output])
(9, 0, [Input, Output])
(10, 0, [Input, Output] (2 => FSPICS0) (2 => FSPICS0))
(18, 0, [Input, Output])
(19, 0, [Input, Output])
(20, 0, [Input, Output] (0 => U0RXD) ())
}

crate::gpio::rtc_pins! {
Expand Down
44 changes: 22 additions & 22 deletions esp-hal/src/soc/esp32c3/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,28 +199,28 @@ pub enum OutputSignal {
}

crate::gpio::gpio! {
(0, 0, InputOutputAnalog)
(1, 0, InputOutputAnalog)
(2, 0, InputOutputAnalog (2 => FSPIQ) (2 => FSPIQ))
(3, 0, InputOutputAnalog)
(4, 0, InputOutputAnalog (2 => FSPIHD) (0 => USB_JTAG_TMS 2 => FSPIHD))
(5, 0, InputOutputAnalog (2 => FSPIWP) (0 => USB_JTAG_TDI 2 => FSPIWP))
(6, 0, InputOutput (2 => FSPICLK) (0 => USB_JTAG_TCK 2 => FSPICLK_MUX))
(7, 0, InputOutput (2 => FSPID) (0 => USB_JTAG_TDO 2 => FSPID))
(8, 0, InputOutput)
(9, 0, InputOutput)
(10, 0, InputOutput (2 => FSPICS0) (2 => FSPICS0))
(11, 0, InputOutput)
(12, 0, InputOutput (0 => SPIHD) (0 => SPIHD))
(13, 0, InputOutput (0 => SPIWP) (0 => SPIWP))
(14, 0, InputOutput () (0 => SPICS0))
(15, 0, InputOutput () (0 => SPICLK_MUX))
(16, 0, InputOutput (0 => SPID) (0 => SPID))
(17, 0, InputOutput (0 => SPIQ) (0 => SPIQ))
(18, 0, InputOutput)
(19, 0, InputOutput)
(20, 0, InputOutput (0 => U0RXD) ())
(21, 0, InputOutput () (0 => U0TXD))
(0, 0, [Input, Output, Analog, RtcIo])
(1, 0, [Input, Output, Analog, RtcIo])
(2, 0, [Input, Output, Analog, RtcIo] (2 => FSPIQ) (2 => FSPIQ))
(3, 0, [Input, Output, Analog, RtcIo])
(4, 0, [Input, Output, Analog, RtcIo] (2 => FSPIHD) (0 => USB_JTAG_TMS 2 => FSPIHD))
(5, 0, [Input, Output, Analog, RtcIo] (2 => FSPIWP) (0 => USB_JTAG_TDI 2 => FSPIWP))
(6, 0, [Input, Output] (2 => FSPICLK) (0 => USB_JTAG_TCK 2 => FSPICLK_MUX))
(7, 0, [Input, Output] (2 => FSPID) (0 => USB_JTAG_TDO 2 => FSPID))
(8, 0, [Input, Output])
(9, 0, [Input, Output])
(10, 0, [Input, Output] (2 => FSPICS0) (2 => FSPICS0))
(11, 0, [Input, Output])
(12, 0, [Input, Output] (0 => SPIHD) (0 => SPIHD))
(13, 0, [Input, Output] (0 => SPIWP) (0 => SPIWP))
(14, 0, [Input, Output] () (0 => SPICS0))
(15, 0, [Input, Output] () (0 => SPICLK_MUX))
(16, 0, [Input, Output] (0 => SPID) (0 => SPID))
(17, 0, [Input, Output] (0 => SPIQ) (0 => SPIQ))
(18, 0, [Input, Output])
(19, 0, [Input, Output])
(20, 0, [Input, Output] (0 => U0RXD) ())
(21, 0, [Input, Output] () (0 => U0TXD))
}

// RTC pins 0 through 5 (inclusive) support GPIO wakeup
Expand Down
62 changes: 31 additions & 31 deletions esp-hal/src/soc/esp32c6/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,37 +285,37 @@ pub enum OutputSignal {
}

crate::gpio::gpio! {
(0, 0, InputOutputAnalog)
(1, 0, InputOutputAnalog)
(2, 0, InputOutputAnalog (2 => FSPIQ) (2 => FSPIQ))
(3, 0, InputOutputAnalog)
(4, 0, InputOutputAnalog (2 => FSPIHD) (0 => USB_JTAG_TMS 2 => FSPIHD))
(5, 0, InputOutputAnalog (2 => FSPIWP) (0 => USB_JTAG_TDI 2 => FSPIWP))
(6, 0, InputOutputAnalog (2 => FSPICLK) (0 => USB_JTAG_TCK 2 => FSPICLK_MUX))
(7, 0, InputOutputAnalog (2 => FSPID) (0 => USB_JTAG_TDO 2 => FSPID))
(8, 0, InputOutput)
(9, 0, InputOutput)
(10, 0, InputOutput)
(11, 0, InputOutput)
(12, 0, InputOutput)
(13, 0, InputOutput)
(14, 0, InputOutput)
(15, 0, InputOutput)
(16, 0, InputOutput (0 => U0RXD) (2 => FSPICS0))
(17, 0, InputOutput () (0 => U0TXD 2 => FSPICS1))
(18, 0, InputOutput () (2 => FSPICS2)) // 0 => SDIO_CMD but there are no signals since it's a fixed pin
(19, 0, InputOutput () (2 => FSPICS3)) // 0 => SDIO_CLK but there are no signals since it's a fixed pin
(20, 0, InputOutput () (2 => FSPICS4)) // 0 => SDIO_DATA0 but there are no signals since it's a fixed pin
(21, 0, InputOutput () (2 => FSPICS5)) // 0 => SDIO_DATA1 but there are no signals since it's a fixed pin
(22, 0, InputOutput () ()) // 0 => SDIO_DATA2 but there are no signals since it's a fixed pin
(23, 0, InputOutput () ()) // 0 => SDIO_DATA3 but there are no signals since it's a fixed pin
(24, 0, InputOutput () (0 => SPICS0))
(25, 0, InputOutput (0 => SPIQ) (0 => SPIQ))
(26, 0, InputOutput (0 => SPIWP) (0 => SPIWP))
(27, 0, InputOutput)
(28, 0, InputOutput (0 => SPIHD) (0 => SPIHD))
(29, 0, InputOutput () (0 => SPICLK_MUX))
(30, 0, InputOutput (0 => SPID) (0 => SPID))
(0, 0, [Input, Output, Analog, RtcIo])
(1, 0, [Input, Output, Analog, RtcIo])
(2, 0, [Input, Output, Analog, RtcIo] (2 => FSPIQ) (2 => FSPIQ))
(3, 0, [Input, Output, Analog, RtcIo])
(4, 0, [Input, Output, Analog, RtcIo] (2 => FSPIHD) (0 => USB_JTAG_TMS 2 => FSPIHD))
(5, 0, [Input, Output, Analog, RtcIo] (2 => FSPIWP) (0 => USB_JTAG_TDI 2 => FSPIWP))
(6, 0, [Input, Output, Analog, RtcIo] (2 => FSPICLK) (0 => USB_JTAG_TCK 2 => FSPICLK_MUX))
(7, 0, [Input, Output, Analog, RtcIo] (2 => FSPID) (0 => USB_JTAG_TDO 2 => FSPID))
(8, 0, [Input, Output])
(9, 0, [Input, Output])
(10, 0, [Input, Output])
(11, 0, [Input, Output])
(12, 0, [Input, Output])
(13, 0, [Input, Output])
(14, 0, [Input, Output])
(15, 0, [Input, Output])
(16, 0, [Input, Output] (0 => U0RXD) (2 => FSPICS0))
(17, 0, [Input, Output] () (0 => U0TXD 2 => FSPICS1))
(18, 0, [Input, Output] () (2 => FSPICS2)) // 0 => SDIO_CMD but there are no signals since it's a fixed pin
(19, 0, [Input, Output] () (2 => FSPICS3)) // 0 => SDIO_CLK but there are no signals since it's a fixed pin
(20, 0, [Input, Output] () (2 => FSPICS4)) // 0 => SDIO_DATA0 but there are no signals since it's a fixed pin
(21, 0, [Input, Output] () (2 => FSPICS5)) // 0 => SDIO_DATA1 but there are no signals since it's a fixed pin
(22, 0, [Input, Output] () ()) // 0 => SDIO_DATA2 but there are no signals since it's a fixed pin
(23, 0, [Input, Output] () ()) // 0 => SDIO_DATA3 but there are no signals since it's a fixed pin
(24, 0, [Input, Output] () (0 => SPICS0))
(25, 0, [Input, Output] (0 => SPIQ) (0 => SPIQ))
(26, 0, [Input, Output] (0 => SPIWP) (0 => SPIWP))
(27, 0, [Input, Output])
(28, 0, [Input, Output] (0 => SPIHD) (0 => SPIHD))
(29, 0, [Input, Output] () (0 => SPICLK_MUX))
(30, 0, [Input, Output] (0 => SPID) (0 => SPID))
}

crate::gpio::analog! {
Expand Down
56 changes: 28 additions & 28 deletions esp-hal/src/soc/esp32h2/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,34 +250,34 @@ pub enum OutputSignal {
}

crate::gpio::gpio! {
(0, 0, InputOutputAnalog (2 => FSPIQ) (2 => FSPIQ))
(1, 0, InputOutputAnalog (2 => FSPICS0) (2 => FSPICS0))
(2, 0, InputOutputAnalog (2 => FSPIWP) (2 => FSPIWP))
(3, 0, InputOutputAnalog (2 => FSPIHD) (2 => FSPIHD))
(4, 0, InputOutputAnalog (2 => FSPICLK) (2 => FSPICLK_MUX))
(5, 0, InputOutputAnalog (2 => FSPID) (2 => FSPID))
(6, 0, InputOutput)
(7, 0, InputOutput)
(8, 0, InputOutput)
(9, 0, InputOutput)
(10, 0, InputOutput)
(11, 0, InputOutput)
(12, 0, InputOutput)
(13, 0, InputOutput)
(14, 0, InputOutput)
(15, 0, InputOutput () (0 => SPICS0))
(16, 0, InputOutput (0 => SPIQ) (0 => SPIQ))
(17, 0, InputOutput (0 => SPIWP) (0 => SPIWP))
(18, 0, InputOutput (0 => SPIHD) (0 => SPIHD))
(19, 0, InputOutput () (0 => SPICLK))
(20, 0, InputOutput (0 => SPID) (0 => SPID))
(21, 0, InputOutput)
(22, 0, InputOutput)
(23, 0, InputOutput () (2 => FSPICS1))
(24, 0, InputOutput () (2 => FSPICS2))
(25, 0, InputOutput () (2 => FSPICS3))
(26, 0, InputOutput () (2 => FSPICS4))
(27, 0, InputOutput () (2 => FSPICS5))
(0, 0, [Input, Output, Analog] (2 => FSPIQ) (2 => FSPIQ))
(1, 0, [Input, Output, Analog] (2 => FSPICS0) (2 => FSPICS0))
(2, 0, [Input, Output, Analog] (2 => FSPIWP) (2 => FSPIWP))
(3, 0, [Input, Output, Analog] (2 => FSPIHD) (2 => FSPIHD))
(4, 0, [Input, Output, Analog] (2 => FSPICLK) (2 => FSPICLK_MUX))
(5, 0, [Input, Output, Analog] (2 => FSPID) (2 => FSPID))
(6, 0, [Input, Output])
(7, 0, [Input, Output])
(8, 0, [Input, Output])
(9, 0, [Input, Output])
(10, 0, [Input, Output])
(11, 0, [Input, Output])
(12, 0, [Input, Output])
(13, 0, [Input, Output])
(14, 0, [Input, Output])
(15, 0, [Input, Output] () (0 => SPICS0))
(16, 0, [Input, Output] (0 => SPIQ) (0 => SPIQ))
(17, 0, [Input, Output] (0 => SPIWP) (0 => SPIWP))
(18, 0, [Input, Output] (0 => SPIHD) (0 => SPIHD))
(19, 0, [Input, Output] () (0 => SPICLK))
(20, 0, [Input, Output] (0 => SPID) (0 => SPID))
(21, 0, [Input, Output])
(22, 0, [Input, Output])
(23, 0, [Input, Output] () (2 => FSPICS1))
(24, 0, [Input, Output] () (2 => FSPICS2))
(25, 0, [Input, Output] () (2 => FSPICS3))
(26, 0, [Input, Output] () (2 => FSPICS4))
(27, 0, [Input, Output] () (2 => FSPICS5))
}

crate::gpio::analog! {
Expand Down
Loading

0 comments on commit 19b08ef

Please sign in to comment.