28 #if !defined(CPUID_LEN) || defined(DOXYGEN) 
   29 #  define CPUID_LEN           (4U) 
   35 #if !defined(PM_NUM_MODES) || defined(DOXYGEN) 
   36 #  define PM_NUM_MODES        (1U) 
   42 #define PROVIDES_PM_LAYERED_OFF 
   45 #if defined(MODULE_PERIPH_GPIO_LINUX) || defined(DOXYGEN) 
   46 #  include <linux/gpio.h> 
   56 #  define GPIO_PORT_SHIFT     (24) 
   61 #  define GPIO_PIN(port, pin) (gpio_t)((port << GPIO_PORT_SHIFT) | pin) 
   66 #  define HAVE_GPIO_MODE_T 
   70 #  if !defined(GPIOHANDLE_REQUEST_PULL_DOWN) || defined(DOXYGEN) 
   71 #    define GPIOHANDLE_REQUEST_PULL_DOWN    (0xFF) 
   76 #  if !defined(GPIOHANDLE_REQUEST_PULL_UP) || defined(DOXYGEN) 
   77 #   define GPIOHANDLE_REQUEST_PULL_UP      (0xFF) 
   89     GPIO_IN    = GPIOHANDLE_REQUEST_INPUT,
 
   92     GPIO_OUT   = GPIOHANDLE_REQUEST_OUTPUT,
 
   93     GPIO_OD    = GPIOHANDLE_REQUEST_OPEN_DRAIN,
 
  100 #  define HAVE_GPIO_FLANK_T 
  112 #elif defined(MODULE_PERIPH_GPIO_MOCK) 
  123     void (*cb)(
void *arg);  
 
  127 #  define GPIO_UNDEF          0 
  129 #  if !defined(GPIO_PORT_MAX) || defined(DOXYGEN) 
  130 #    define GPIO_PORT_MAX       (16) 
  133 #  if !defined(GPIO_PIN_MAX) || defined(DOXYGEN) 
  134 #    define GPIO_PIN_MAX        (32) 
  140 extern gpio_mock_t gpio_mock[GPIO_PORT_MAX][GPIO_PIN_MAX];
 
  146 typedef gpio_mock_t* 
gpio_t;
 
  152 #  define GPIO_PIN(port, pin) \ 
  153     (((port >= 0) && (pin >= 0) && (port < GPIO_PORT_MAX) && (pin < GPIO_PIN_MAX)) \ 
  154      ? &gpio_mock[port][pin] \ 
  162 #define PERIPH_TIMER_PROVIDES_SET 
  169 #define PROVIDES_PM_OFF 
  170 #define PROVIDES_PM_SET_LOWEST 
  178 #if defined(MODULE_PERIPH_SPIDEV_LINUX) || defined(DOXYGEN) 
  187 #  define PERIPH_SPI_NEEDS_TRANSFER_BYTE 
  191 #  define PERIPH_SPI_NEEDS_TRANSFER_REG 
  195 #  define PERIPH_SPI_NEEDS_TRANSFER_REGS 
  201 #    define HAVE_SPI_CLK_T 
  222 #if !defined(EEPROM_SIZE) || defined(DOXYGEN) 
  223 #  define EEPROM_SIZE             (1024U)   
  226 #ifdef MODULE_PERIPH_CAN 
@ GPIO_OUT
select GPIO MASK as output
 
@ GPIO_IN
select GPIO MASK as input
 
Peripheral MCU configuration for the Zigduino board.
 
Implementation of simulated CAN controller driver using SocketCAN on Linux.
 
gpio_mode_t
Available pin modes.
 
#define GPIOHANDLE_REQUEST_PULL_UP
Pull-up.
 
#define GPIOHANDLE_REQUEST_PULL_DOWN
Pull-down.
 
unsigned int gpio_t
GPIO type identifier.
 
@ GPIO_FALLING
emit interrupt on falling flank
 
@ GPIO_RISING
emit interrupt on rising flank
 
@ GPIO_BOTH
emit interrupt on both flanks
 
@ GPIO_OD
configure as output in open-drain mode without pull resistor
 
@ GPIO_IN_PU
configure as input with pull-up resistor
 
@ GPIO_OD_PU
configure as output in open-drain mode with pull resistor enabled
 
@ GPIO_IN_PD
configure as input with pull-down resistor
 
@ 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