samd21/include/periph_cpu.h File Reference

CPU specific definitions for internal peripheral handling. More...

Detailed Description

#include <limits.h>
#include "periph_cpu_common.h"
+ Include dependency graph for samd21/include/periph_cpu.h:

Go to the source code of this file.

Data Structures

struct  pwm_conf_chan_t
 PWM channel configuration data structure. More...
struct  pwm_conf_t
 PWM configuration structure. More...
struct  uart_conf_t
 UART device configuration. More...
#define GPIO_MODE(pr, ie, pe)   (pr | (ie << 1) | (pe << 2))
 Generate GPIO mode bitfields. More...
#define SPI_HWCS(x)   (UINT_MAX - 1)
 Override SPI hardware chip select macro. More...
enum  { PA = 0, PB = 1, PC = 2 }
 Available ports on the SAMD21. More...
static int _sercom_id (SercomUsart *sercom)
 Return the numeric id of a SERCOM device derived from its address. More...

Macro Definition Documentation

#define GPIO_MODE (   pr,
)    (pr | (ie << 1) | (pe << 2))

We use 3 bit to determine the pin functions:

  • bit 0: PD(0) or PU(1)
  • bit 1: input enable
  • bit 2: pull enable

Definition at line 47 of file samd21/include/periph_cpu.h.

#define SPI_HWCS (   x)    (UINT_MAX - 1)

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

Definition at line 54 of file samd21/include/periph_cpu.h.

Enumeration Type Documentation

anonymous enum

port A


port B


port C

Definition at line 33 of file samd21/include/periph_cpu.h.

Function Documentation

static int _sercom_id ( SercomUsart *  sercom)
[in]sercomSERCOM device
numeric id of the given SERCOM device

Definition at line 109 of file samd21/include/periph_cpu.h.