33typedef uint32_t gpio_t;
35#define GPIO_UNDEF (0xffffffff)
37#define GPIO_PIN(x, y) (((uint32_t)PIOA + (x << 9)) | y)
44#define PERIPH_SPI_NEEDS_INIT_CS
45#define PERIPH_SPI_NEEDS_TRANSFER_BYTE
46#define PERIPH_SPI_NEEDS_TRANSFER_REG
47#define PERIPH_SPI_NEEDS_TRANSFER_REGS
53#define CPUID_LEN (16U)
58#define TIMER_MAX_VAL (0xffffffff)
68#define TIMER_CHANNEL_NUMOF (1)
74#define RTT_MAX_VALUE (0xffffffff)
75#define RTT_CLOCK_FREQUENCY (CHIP_FREQ_XTAL_32K)
76#define RTT_MIN_FREQUENCY (1)
77#define RTT_MAX_FREQUENCY (RTT_CLOCK_FREQUENCY)
88#define GPIO_MODE(io, pu, od) (io | (pu << 1) | (od << 2))
97#define ADC_NUMOF (16U)
110#define DAC_NUMOF (2U)
113#define HAVE_GPIO_MODE_T
123#define HAVE_GPIO_FLANK_T
154#define HAVE_SPI_MODE_T
167#define HAVE_SPI_CLK_T
183#define HAVE_ADC_RES_T
@ GPIO_OUT
select GPIO MASK as output
@ GPIO_IN
select GPIO MASK as input
@ SPI_CLK_10MHZ
drive the SPI bus with 10MHz
@ SPI_CLK_5MHZ
drive the SPI bus with 5MHz
@ SPI_CLK_400KHZ
drive the SPI bus with 400KHz
@ SPI_CLK_1MHZ
drive the SPI bus with 1MHz
@ SPI_CLK_100KHZ
drive the SPI bus with 100KHz
void gpio_init_mux(gpio_t pin, uint8_t over, uint8_t sel, uint8_t func)
Configure an alternate function for the given pin.
#define GPIO_MODE(x, y)
Internal macro for combining pin mode (x) and pull-up/down (y).
adc_res_t
Possible ADC resolution settings.
@ ADC_RES_16BIT
ADC resolution: 16 bit.
@ ADC_RES_8BIT
ADC resolution: 8 bit.
@ ADC_RES_14BIT
ADC resolution: 14 bit.
@ ADC_RES_6BIT
ADC resolution: 6 bit.
@ ADC_RES_10BIT
ADC resolution: 10 bit.
@ ADC_RES_12BIT
ADC resolution: 12 bit.
spi_mode_t
Support SPI modes.
@ SPI_MODE_0
CPOL=0, CPHA=0.
@ SPI_MODE_2
CPOL=1, CPHA=0.
@ SPI_MODE_1
CPOL=0, CPHA=1.
@ SPI_MODE_3
CPOL=1, CPHA=1.
gpio_mode_t
Available pin modes.
gpio_mux_t
Available MUX values for configuring a pin's alternate function.
gpio_mux_t
GPIO mux configuration.
@ GPIO_MUX_A
alternate function A
@ GPIO_MUX_B
alternate function B
PWM channel configuration.
uint8_t hwchan
the HW channel used for a logical channel
SPI device configuration.
gpio_mux_t mux
pin MUX setting
uint8_t id
corresponding ID of that module
Spi * dev
SPI module to use.
gpio_t clk
pin mapped to the CLK line
Timer device configuration.
uint8_t id_ch0
ID of the timer's first channel.
UART device configuration.
uint8_t pmc_id
bit in the PMC register of the device
Uart * dev
U(S)ART device used.