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 
20 #ifndef PERIPH_CONF_COMMON_H
21 #define PERIPH_CONF_COMMON_H
22 
23 #include "periph_cpu.h"
24 #include "cfg_clock_32_1.h"
25 #include "cfg_i2c_default.h"
26 #include "cfg_rtt_default.h"
27 #include "cfg_timer_default.h"
28 
29 #include "board.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
39 static const spi_conf_t spi_config[] = {
40  {
41  .dev = NRF_SPIM0,
42  .sclk = GPIO_PIN(1,15),
43  .mosi = GPIO_PIN(1,13),
44  .miso = GPIO_PIN(1,14),
45  }
46 };
47 
48 #define SPI_NUMOF ARRAY_SIZE(spi_config)
49 
60 static const pwm_conf_t pwm_config[] = {
61  { NRF_PWM0, { LED0_PIN, LED1_PIN, LED2_PIN, GPIO_UNDEF } }
62 };
63 #define PWM_NUMOF ARRAY_SIZE(pwm_config)
64 
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 #endif /* PERIPH_CONF_COMMON_H */
board.h
Common board specific configuration for the Particle Mesh.
cfg_clock_32_1.h
Common clock configuration for the nRF52 based boards.
pwm_conf_t
PWM device configuration.
Definition: periph_cpu_common.h:153
GPIO_UNDEF
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
Definition: periph_cpu_common.h:52
spi_config
static const spi_conf_t spi_config[]
Static array with configuration for declared SPI devices.
Definition: periph_conf_common.h:178
GPIO_PIN
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35
spi_conf_t::dev
SPI_Type * dev
SPI device to use.
Definition: periph_cpu.h:465
spi_conf_t
SPI configuration structure type.
Definition: periph_cpu.h:273