Macro atsame54_xpro::pin_alias

source ·
macro_rules! pin_alias {
    ($pins:ident . pa02) => { ... };
    ($pins:ident . pa03) => { ... };
    ($pins:ident . pa04) => { ... };
    ($pins:ident . pa05) => { ... };
    ($pins:ident . pa06) => { ... };
    ($pins:ident . pa07) => { ... };
    ($pins:ident . pa08) => { ... };
    ($pins:ident . pa09) => { ... };
    ($pins:ident . pa10) => { ... };
    ($pins:ident . pa11) => { ... };
    ($pins:ident . pa12) => { ... };
    ($pins:ident . pa13) => { ... };
    ($pins:ident . pa14) => { ... };
    ($pins:ident . pa15) => { ... };
    ($pins:ident . pa16) => { ... };
    ($pins:ident . pa17) => { ... };
    ($pins:ident . pa18) => { ... };
    ($pins:ident . pa19) => { ... };
    ($pins:ident . pa20) => { ... };
    ($pins:ident . pa21) => { ... };
    ($pins:ident . pa22) => { ... };
    ($pins:ident . pa23) => { ... };
    ($pins:ident . pa24) => { ... };
    ($pins:ident . pa25) => { ... };
    ($pins:ident . pa27) => { ... };
    ($pins:ident . pa30) => { ... };
    ($pins:ident . pa31) => { ... };
    ($pins:ident . pb00) => { ... };
    ($pins:ident . pb01) => { ... };
    ($pins:ident . pb02) => { ... };
    ($pins:ident . pb04) => { ... };
    ($pins:ident . pb05) => { ... };
    ($pins:ident . pb06) => { ... };
    ($pins:ident . pb07) => { ... };
    ($pins:ident . pb08) => { ... };
    ($pins:ident . pb09) => { ... };
    ($pins:ident . pb10) => { ... };
    ($pins:ident . pb11) => { ... };
    ($pins:ident . pb12) => { ... };
    ($pins:ident . pb13) => { ... };
    ($pins:ident . pb14) => { ... };
    ($pins:ident . pb15) => { ... };
    ($pins:ident . pb16) => { ... };
    ($pins:ident . pb17) => { ... };
    ($pins:ident . pb18) => { ... };
    ($pins:ident . pb19) => { ... };
    ($pins:ident . pb20) => { ... };
    ($pins:ident . pb21) => { ... };
    ($pins:ident . pb22) => { ... };
    ($pins:ident . pb23) => { ... };
    ($pins:ident . pb24) => { ... };
    ($pins:ident . pb25) => { ... };
    ($pins:ident . pb26) => { ... };
    ($pins:ident . pb27) => { ... };
    ($pins:ident . pb28) => { ... };
    ($pins:ident . pb29) => { ... };
    ($pins:ident . pb30) => { ... };
    ($pins:ident . pb31) => { ... };
    ($pins:ident . pc01) => { ... };
    ($pins:ident . pc02) => { ... };
    ($pins:ident . pc03) => { ... };
    ($pins:ident . pc04) => { ... };
    ($pins:ident . pc05) => { ... };
    ($pins:ident . pc06) => { ... };
    ($pins:ident . pc07) => { ... };
    ($pins:ident . pc10) => { ... };
    ($pins:ident . pc11) => { ... };
    ($pins:ident . pc12) => { ... };
    ($pins:ident . pc13) => { ... };
    ($pins:ident . pc14) => { ... };
    ($pins:ident . pc16) => { ... };
    ($pins:ident . pc17) => { ... };
    ($pins:ident . pc18) => { ... };
    ($pins:ident . pc20) => { ... };
    ($pins:ident . pc21) => { ... };
    ($pins:ident . pc22) => { ... };
    ($pins:ident . pc23) => { ... };
    ($pins:ident . pc30) => { ... };
    ($pins:ident . pc31) => { ... };
    ($pins:ident . pd00) => { ... };
    ($pins:ident . pd01) => { ... };
    ($pins:ident . pd08) => { ... };
    ($pins:ident . pd09) => { ... };
    ($pins:ident . pd10) => { ... };
    ($pins:ident . pd11) => { ... };
    ($pins:ident . pd12) => { ... };
    ($pins:ident . pd20) => { ... };
    ($pins:ident . pd21) => { ... };
    ($pins:ident . adc_dac_header) => { ... };
    ($pins:ident . adc0_analog0) => { ... };
    ($pins:ident . ext2_adc_minus) => { ... };
    ($pins:ident . adc0_analog1) => { ... };
    ($pins:ident . adc0_analog4) => { ... };
    ($pins:ident . ext1_uart_tx) => { ... };
    ($pins:ident . adc0_analog5) => { ... };
    ($pins:ident . ext1_uart_rx) => { ... };
    ($pins:ident . adc0_analog6) => { ... };
    ($pins:ident . ext1_gpio1_in) => { ... };
    ($pins:ident . ext1_gpio1_out) => { ... };
    ($pins:ident . ext1_uart_rts) => { ... };
    ($pins:ident . ext1_gpio2_in) => { ... };
    ($pins:ident . ext1_gpio2_out) => { ... };
    ($pins:ident . adc0_analog7) => { ... };
    ($pins:ident . ext1_uart_cts) => { ... };
    ($pins:ident . qspi_data0) => { ... };
    ($pins:ident . qspi_data1) => { ... };
    ($pins:ident . qspi_data2) => { ... };
    ($pins:ident . qspi_data3) => { ... };
    ($pins:ident . pcc_vsync) => { ... };
    ($pins:ident . eth_rxd1) => { ... };
    ($pins:ident . pcc_hsync) => { ... };
    ($pins:ident . eth_rxd0) => { ... };
    ($pins:ident . pcc_pclk) => { ... };
    ($pins:ident . eth_ref_clk) => { ... };
    ($pins:ident . pcc_xclk) => { ... };
    ($pins:ident . eth_rxer) => { ... };
    ($pins:ident . qt_button) => { ... };
    ($pins:ident . pcc_dout00) => { ... };
    ($pins:ident . pcc_dout01) => { ... };
    ($pins:ident . eth_txen) => { ... };
    ($pins:ident . pcc_dout02) => { ... };
    ($pins:ident . eth_txd0) => { ... };
    ($pins:ident . pcc_dout03) => { ... };
    ($pins:ident . eth_txd1) => { ... };
    ($pins:ident . sd_cmd) => { ... };
    ($pins:ident . i2s_fs0) => { ... };
    ($pins:ident . pcc_dout04) => { ... };
    ($pins:ident . sd_clk) => { ... };
    ($pins:ident . i2s_sdo) => { ... };
    ($pins:ident . pcc_dout05) => { ... };
    ($pins:ident . ext1_i2c_sda) => { ... };
    ($pins:ident . i2s_sdi) => { ... };
    ($pins:ident . pcc_dout06) => { ... };
    ($pins:ident . ext1_i2c_scl) => { ... };
    ($pins:ident . i2s_fs1) => { ... };
    ($pins:ident . pcc_dout07) => { ... };
    ($pins:ident . usb_dm) => { ... };
    ($pins:ident . usb_dp) => { ... };
    ($pins:ident . ext1_spi_cs_b) => { ... };
    ($pins:ident . swclk) => { ... };
    ($pins:ident . swdio) => { ... };
    ($pins:ident . ext2_adc_plus) => { ... };
    ($pins:ident . ext2_gpio1_in) => { ... };
    ($pins:ident . ext2_gpio1_out) => { ... };
    ($pins:ident . ext2_spi_cs_b) => { ... };
    ($pins:ident . ext1_adc_plus) => { ... };
    ($pins:ident . adc1_analog6) => { ... };
    ($pins:ident . ext1_adc_minus) => { ... };
    ($pins:ident . adc1_analog7) => { ... };
    ($pins:ident . ext2_gpio2_in) => { ... };
    ($pins:ident . ext2_gpio2_out) => { ... };
    ($pins:ident . adc1_analog8) => { ... };
    ($pins:ident . ext1_irq_gpio_in) => { ... };
    ($pins:ident . ext1_irq_gpio_out) => { ... };
    ($pins:ident . adc1_analog9) => { ... };
    ($pins:ident . adc0_analog2) => { ... };
    ($pins:ident . adc1_analog0) => { ... };
    ($pins:ident . ext1_pwm_plus) => { ... };
    ($pins:ident . adc0_analog3) => { ... };
    ($pins:ident . adc1_analog1) => { ... };
    ($pins:ident . ext1_pwm_minus) => { ... };
    ($pins:ident . qspi_sck) => { ... };
    ($pins:ident . qspi_scs) => { ... };
    ($pins:ident . ata6561_tx) => { ... };
    ($pins:ident . ata6561_rx) => { ... };
    ($pins:ident . ext2_pwm_plus) => { ... };
    ($pins:ident . pcc_dout08) => { ... };
    ($pins:ident . ext2_pwm_minus) => { ... };
    ($pins:ident . pcc_dout09) => { ... };
    ($pins:ident . ext2_uart_tx) => { ... };
    ($pins:ident . ext2_uart_rx) => { ... };
    ($pins:ident . sd_data0) => { ... };
    ($pins:ident . sd_data1) => { ... };
    ($pins:ident . sd_data2) => { ... };
    ($pins:ident . sd_data3) => { ... };
    ($pins:ident . xosc1_x_in) => { ... };
    ($pins:ident . xosc1_clock) => { ... };
    ($pins:ident . xosc1_x_out) => { ... };
    ($pins:ident . edbg_uart_rx) => { ... };
    ($pins:ident . edbg_uart_tx) => { ... };
    ($pins:ident . ext1_spi_sck) => { ... };
    ($pins:ident . ext1_spi_mosi) => { ... };
    ($pins:ident . ext1_spi_cs_a) => { ... };
    ($pins:ident . ext1_spi_miso) => { ... };
    ($pins:ident . swo) => { ... };
    ($pins:ident . button) => { ... };
    ($pins:ident . ext3_gpio1_in) => { ... };
    ($pins:ident . ext3_gpio1_out) => { ... };
    ($pins:ident . ext3_adc_plus) => { ... };
    ($pins:ident . adc1_analog4) => { ... };
    ($pins:ident . ext3_adc_minus) => { ... };
    ($pins:ident . adc1_analog5) => { ... };
    ($pins:ident . ext2_spi_mosi) => { ... };
    ($pins:ident . ext3_spi_mosi) => { ... };
    ($pins:ident . dgi_spi_mosi) => { ... };
    ($pins:ident . ext2_spi_sck) => { ... };
    ($pins:ident . ext3_spi_sck) => { ... };
    ($pins:ident . dgi_spi_sck) => { ... };
    ($pins:ident . ext2_spi_cs_a) => { ... };
    ($pins:ident . ext2_spi_miso) => { ... };
    ($pins:ident . ext3_spi_miso) => { ... };
    ($pins:ident . dgi_spi_miso) => { ... };
    ($pins:ident . ext3_gpio2_in) => { ... };
    ($pins:ident . ext3_gpio2_out) => { ... };
    ($pins:ident . pcc_pwdn) => { ... };
    ($pins:ident . eth_mdc) => { ... };
    ($pins:ident . pcc_reset) => { ... };
    ($pins:ident . eth_gmdio) => { ... };
    ($pins:ident . ata6561_standby) => { ... };
    ($pins:ident . ext3_spi_cs_a) => { ... };
    ($pins:ident . pdec_phase_a) => { ... };
    ($pins:ident . edbg_gpio0_in) => { ... };
    ($pins:ident . edbg_gpio0_out) => { ... };
    ($pins:ident . pdec_phase_b) => { ... };
    ($pins:ident . edbg_gpio1_in) => { ... };
    ($pins:ident . edbg_gpio1_out) => { ... };
    ($pins:ident . led) => { ... };
    ($pins:ident . pdec_index) => { ... };
    ($pins:ident . edbg_gpio2_in) => { ... };
    ($pins:ident . edbg_gpio2_out) => { ... };
    ($pins:ident . eth_crs_dv) => { ... };
    ($pins:ident . eth_reset) => { ... };
    ($pins:ident . ext3_uart_tx) => { ... };
    ($pins:ident . ext3_uart_rx) => { ... };
    ($pins:ident . ext3_irq_gpio_in) => { ... };
    ($pins:ident . ext3_irq_gpio_out) => { ... };
    ($pins:ident . ext3_spi_cs_b) => { ... };
    ($pins:ident . ext2_irq_gpio_in) => { ... };
    ($pins:ident . ext2_irq_gpio_out) => { ... };
    ($pins:ident . adc1_analog14) => { ... };
    ($pins:ident . dgi_spi_cs) => { ... };
    ($pins:ident . adc1_analog15) => { ... };
    ($pins:ident . ext2_i2c_sda) => { ... };
    ($pins:ident . ext3_i2c_sda) => { ... };
    ($pins:ident . dgi_i2c_sda) => { ... };
    ($pins:ident . ext2_i2c_scl) => { ... };
    ($pins:ident . ext3_i2c_scl) => { ... };
    ($pins:ident . dgi_i2c_scl) => { ... };
    ($pins:ident . ext3_pwm_plus) => { ... };
    ($pins:ident . ext3_pwm_minus) => { ... };
    ($pins:ident . eth_interrupt) => { ... };
    ($pins:ident . sd_cd) => { ... };
    ($pins:ident . sd_wp) => { ... };
}
Expand description

Refer to fields of the Pins struct by alternate names

This macro can be used to access fields of the Pins struct by alternate names. See the Pins documentation for a list of the availabe pin aliases.

For example. suppose spi_mosi were an alternate name for the serial_out pin of the Pins struct. You could use the pin_alias! macro to access it like this:

let mut peripherals = pac::Peripherals::take().unwrap();
let pins = bsp::Pins::new(peripherals.PORT);
// Replace this
let mosi = pins.serial_out;
// With this
let mosi = pin_alias!(pins.spi_mosi);