The friendly Operating System for the Internet of Things
saml21/include/periph_cpu.h File Reference

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

Detailed Description

#include "periph_cpu_common.h"
+ Include dependency graph for saml21/include/periph_cpu.h:

Go to the source code of this file.

#define GPIO_MODE(pr, ie, pe)   (pr | (ie << 1) | (pe << 2))
 Generate GPIO mode bitfields. More...
 
#define PM_NUM_MODES   (3)
 
enum  { PA = 0, PB = 1 }
 Available ports on the SAML21 for convenient access. More...
 

Macro Definition Documentation

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

We use 3 bit to determine the pin functions:

  • bit 0: PU or PU
  • bit 1: input enable
  • bit 2: pull enable

Definition at line 44 of file saml21/include/periph_cpu.h.

Enumeration Type Documentation

anonymous enum
Enumerator
PA 

port A

PB 

port B

Definition at line 31 of file saml21/include/periph_cpu.h.