periph_conf_common.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2018 Inria
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
19 #include "periph_cpu.h"
20 #include "cfg_clock_32_1.h"
21 #include "cfg_i2c_default.h"
22 #include "cfg_rtt_default.h"
23 #include "cfg_timer_default.h"
24 
25 #include "board.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 static const spi_conf_t spi_config[] = {
36  {
37  .dev = NRF_SPIM0,
38  .sclk = GPIO_PIN(1, 15),
39  .mosi = GPIO_PIN(1, 13),
40  .miso = GPIO_PIN(1, 14),
41  }
42 };
43 
44 #define SPI_NUMOF ARRAY_SIZE(spi_config)
56 static const pwm_conf_t pwm_config[] = {
57  { NRF_PWM0, { LED0_PIN, LED1_PIN, LED2_PIN, GPIO_UNDEF } }
58 };
59 #define PWM_NUMOF ARRAY_SIZE(pwm_config)
60 
63 #ifdef __cplusplus
64 }
65 #endif
66 
#define LED2_PIN
RX LED yellow.
Definition: board.h:32
#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.