Loading...
Searching...
No Matches
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
32extern "C" {
33#endif
34
39static 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)
60static 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 */
#define LED1_PIN
TX LED yellow.
Definition board.h:34
#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:46
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
Common clock configuration for the nRF52 based boards.
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:337
SPI_t * dev
pointer to the used SPI device
Definition periph_cpu.h:338
Board specific definitions for the Zigduino board.