[]Struct sodaq_one::Pins

pub struct Pins {
    pub port: Port,
    pub d0: Pa2<Input<Floating>>,
    pub d1: Pa3<Input<Floating>>,
    pub d2: Pb8<Input<Floating>>,
    pub d3: Pb9<Input<Floating>>,
    pub accel_int1: Pa21<Input<Floating>>,
    pub accel_int2: Pa20<Input<Floating>>,
    pub d6: Pa6<Input<Floating>>,
    pub d7: Pa7<Input<Floating>>,
    pub d8: Pa8<Input<Floating>>,
    pub d9: Pa9<Input<Floating>>,
    pub d10: Pa10<Input<Floating>>,
    pub d11: Pa11<Input<Floating>>,
    pub d12: Pb2<Input<Floating>>,
    pub d13: Pb3<Input<Floating>>,
    pub led_red: Pa15<Input<Floating>>,
    pub led_green: Pb10<Input<Floating>>,
    pub led_blue: Pb11<Input<Floating>>,
    pub gps_timepulse: Pa14<Input<Floating>>,
    pub gps_enable: Pa18<Input<Floating>>,
    pub button: Pa16<Input<Floating>>,
    pub enable_pin_io: Pb22<Input<Floating>>,
    pub switch_sense: Pa17<Input<Floating>>,
    pub bat_volt: Pa5<Input<Floating>>,
    pub usb_dm: Pa24<Input<Floating>>,
    pub usb_dp: Pa25<Input<Floating>>,
    pub serial1_rx: Pa13<Input<Floating>>,
    pub serial1_tx: Pa12<Input<Floating>>,
    pub i2c_sda: Pa22<Input<Floating>>,
    pub i2c_scl: Pa23<Input<Floating>>,
    pub lora_reset: Pa4<Input<Floating>>,
    pub mag_int: Pa19<Input<Floating>>,
}

Maps the pins to their arduino names and the numbers printed on the board.

Fields

port: Port

Opaque port reference

d0: Pa2<Input<Floating>>

D0/A0/DAC, EXTERNAL_INT_2 Can act as a true analog output as it has a DAC (which is not currently supported by this hal) as well as input.

d1: Pa3<Input<Floating>>

D1/A1/AREF, EXTERNAL_INT_3

d2: Pb8<Input<Floating>>

D2/A2, TC4/WO[0], PWM4_CH0, TC4_CH0, EXTERNAL_INT_8

d3: Pb9<Input<Floating>>

D3/A3, TC4/WO[1], PWM4_CH1, TC4_CH1, EXTERNAL_INT_9

accel_int1: Pa21<Input<Floating>>

D4, ACCEL_INT1, EXTERNAL_INT_5

accel_int2: Pa20<Input<Floating>>

D5, ACCEL_INT2, EXTERNAL_INT_4

d6: Pa6<Input<Floating>>

D6/A6 PWM1_CH0, TCC1_CH0, EXTERNAL_INT_6

d7: Pa7<Input<Floating>>

D7/A7, PWM1_CH1, TCC1_CH1, EXTERNAL_INT_7, SPI_SCK (if ENABLE_BASE_SPI)

d8: Pa8<Input<Floating>>

D8/A8, PWM0_CH0, TCC0_CH0, EXTERNAL_INT_NMI, SPI_MISO

d9: Pa9<Input<Floating>>

D9/A9, PWM0_CH1, TCC0_CH1, EXTERNAL_INT_9, SPI_SS

d10: Pa10<Input<Floating>>

D10/A10, PWM0_CH2, TCC0_CH2, EXTERNAL_INT_10, SPI_MOSI

d11: Pa11<Input<Floating>>

D11/A11, PWM0_CH3, TCC0_CH3, EXTERNAL_INT_11, SPI_SCK (if not ENABLE_BASE_SPI)

d12: Pb2<Input<Floating>>

D12/A12, SERIAL_TX, EXTERNAL_INT_2

d13: Pb3<Input<Floating>>

D13/A13, SERIAL_RX, EXTERNAL_INT_3

led_red: Pa15<Input<Floating>>

D14, OUTPUT red LED, set to low to turn LED on, to high to turn it off. PWM3_CH1, TC3_CH1

led_green: Pb10<Input<Floating>>

D15, OUTPUT green LED, set to low to turn LED on, to high to turn it off. PWM5_CH0, TC5_CH0

led_blue: Pb11<Input<Floating>>

D16, OUTPUT blue LED, set to low to turn LED on, to high to turn it off. PWM5_CH1, TC5_CH1,

gps_timepulse: Pa14<Input<Floating>>

D17, INPUT, GPS Timepulse, EXTERNAL_INT_14 this pin will turn to high every second synchronized to GPS time signal.

gps_enable: Pa18<Input<Floating>>

D18, OUTPUT, GPS Enable set this pin to high to turn the GPS module on, set it to low to conserve energy.

button: Pa16<Input<Floating>>

D19, INPUT, User Button, EXTERNAL_INT_0 this pin is high by default, pulled to low when button is pressed.

enable_pin_io: Pb22<Input<Floating>>

D22, OUTPUT, Power Enable, when running on battery and without USB connected, the regulator that suplies power has to enabled manually, this can be done to set this pin to high to enabe power.

switch_sense: Pa17<Input<Floating>>

D23, INPUT, EXTERNAL_INT_1

bat_volt: Pa5<Input<Floating>>

Analog, INPUT, battery voltage

usb_dm: Pa24<Input<Floating>>

The USB D- pad

usb_dp: Pa25<Input<Floating>>

The USB D+ pad

serial1_rx: Pa13<Input<Floating>>

SERIAL1_RX, EXTERNAL_INT_13

serial1_tx: Pa12<Input<Floating>>

SERIAL1_TX, EXTERNAL_INT_12

i2c_sda: Pa22<Input<Floating>>

The I2C data line

i2c_scl: Pa23<Input<Floating>>

The I2C clock line

lora_reset: Pa4<Input<Floating>>

LoRa RESET

mag_int: Pa19<Input<Floating>>

MAG_INT

Methods

impl Pins

pub fn new(port: PORT) -> Self

Auto Trait Implementations

impl Send for Pins

impl Sync for Pins

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]