[−][src]Macro hifive1::pins
Returns tuple of pins for given gpio object mapped accordingly
Mappings
none
— Returns()
for empty pin if needed in tuplespi0_<x>
— SPI pins where<x>
is one of (sck
,mosi
,miso
,ss0
,ss2
,ss3
)i2c0_<x>
— I2C pins where<x>
is one of (sda
,scl
)uart0_<x>
— UART pins where<x>
is one of (tx
,rx
)dig#
— Digital/physical pins on the board where#
is from range 0..19led_<x>
- Internal LED light pins<x>
is one of (red
,green
,blue
)
Example
let (mosi, miso, sck, cs) = pins!(gpio, (spi0_mosi, spi0_miso, spi0_sck, spi0_ss0)); // (gpio.pin3, gpio.pin4, gpio.pin5, gpio.pin2)