samd21/include/periph_cpu.h

CPU specific definitions for internal peripheral handling.

CPU specific definitions for internal peripheral handling

SPI_HWCS( x)

Override SPI hardware chip select macro.

1
(UINT_MAX - 1)

As of now, we do not support HW CS, so we always set it to a fixed value

HAVE_ADC_RES_T

Override the ADC resolution configuration.

enum adc_res_t
ADC_RES_7BIT =             (0 << 4)
ADC resolution: 7 bit.
ADC_RES_9BIT =             (1 << 4)
ADC resolution: 9 bit.
ADC_RES_11BIT
ADC resolution: 11 bit.
ADC_RES_6BIT =             (0xa00)
not supported by hardware
ADC_RES_8BIT =             (0xb00)
not supported by hardware
ADC_RES_10BIT =             (2 << 4)
ADC resolution: 10 bit.
ADC_RES_12BIT =             (3 << 4)
ADC resolution: 12 bit.
ADC_RES_14BIT =             (0xc00)
not supported by hardware
ADC_RES_16BIT =             (0xd00)
not supported by hardware
const int8_t exti_config()

Mapping of pins to EXTI lines, -1 means not EXTI possible.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
= {























}
int _sercom_id(SercomUsart * sercom)

Return the numeric id of a SERCOM device derived from its address.

Parameters

sercom:SERCOM device

Return values

  • numeric id of the given SERCOM device
struct pwm_conf_chan_t

PWM channel configuration data structure.

gpio.h::gpio_t pin

GPIO pin.

sam0_common/include/periph_cpu_common.h::gpio_mux_t mux

pin function multiplex value

uint8_t chan

TCC channel to use.

struct pwm_conf_t

PWM configuration.

PWM device configuration data structure.

PWM configuration options.

PWM device configuration.

Each device supports up to 4 channels. If you want to use less than 4 channels, just set the unused pins to GPIO_UNDEF.

Note

define unused pins only from right to left, so the defined channels always start with channel 0 to x and the undefined ones are from x+1 to PWM_CHANNELS.

mini_timer_t * dev

Timer used.

gpio.h::gpio_t pin_ch()

Output Pins.

atmega_common/include/periph_cpu_common.h::timer_div_t div

Timer divider mask.

TIMER_TypeDef * dev

TIMER device used.

CMU_Clock_TypeDef cmu

the device CMU channel

cc2538.h::IRQn_Type irq

the devices base IRQ channel

uint8_t channels

the number of available channels

const pwm_chan_conf_t * channel

pointer to first channel config

NRF_PWM_Type * dev

PWM device descriptor.

uint32_t pin()

PWM out pins.

Tcc * dev

TCC device to use.

pwm_conf_chan_t chan()

channel configuration

TIM_TypeDef * dev

Timer used.

uint32_t rcc_mask

bit in clock enable register

pwm_chan_t chan()

channel mapping, set to {GPIO_UNDEF, 0} if not used

stm32_common/include/periph_cpu_common.h::gpio_af_t af

alternate function used

uint8_t bus

APB bus.