periph_conf_common.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Inria
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
22 #include "periph_cpu.h"
23 #include "cfg_clock_32_1.h"
24 #include "cfg_i2c_default.h"
25 #include "cfg_rtt_default.h"
26 #include "cfg_timer_default.h"
27 
28 #include "board.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
38 static const spi_conf_t spi_config[] = {
39  {
40  .dev = NRF_SPIM0,
41  .sclk = GPIO_PIN(1, 15),
42  .mosi = GPIO_PIN(1, 13),
43  .miso = GPIO_PIN(1, 14),
44  }
45 };
46 
47 #define SPI_NUMOF ARRAY_SIZE(spi_config)
59 static const pwm_conf_t pwm_config[] = {
60  { NRF_PWM0, { LED0_PIN, LED1_PIN, LED2_PIN, GPIO_UNDEF } }
61 };
62 #define PWM_NUMOF ARRAY_SIZE(pwm_config)
63 
66 #ifdef __cplusplus
67 }
68 #endif
69 
#define LED2_PIN
RX LED yellow.
Definition: board.h:35
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:45
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
Common clock configuration for the nRF52 based boards.
static const pwm_config_t pwm_config[]
GPIOs used as channels for the according PWM device.
static const spi_conf_t spi_config[]
Static array with configuration for declared SPI devices.
PWM device configuration.
SPI device configuration.
Definition: periph_cpu.h:336
SPI_t * dev
pointer to the used SPI device
Definition: periph_cpu.h:337
Board specific definitions for the Zigduino board.