periph_conf_common.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2018 Freie Universität Berlin
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 
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 pwm_conf_t pwm_config[] = {
40  /* Beware: Keep pwm_params.h in sync with the definitions here */
41  { NRF_PWM0, {
42  /* configure LED0 as PWM */
43 #ifdef LED0_PIN
44  LED0_PIN,
45 #else
46  GPIO_UNDEF,
47 #endif
48  /* configure LED1 as PWM */
49 #ifdef LED1_PIN
50  LED1_PIN,
51 #else
52  GPIO_UNDEF,
53 #endif
54  /* configure LED2 as PWM */
55 #ifdef LED2_PIN
56  LED2_PIN,
57 #else
58  GPIO_UNDEF,
59 #endif
60  /* configure LED3 as PWM */
61 #ifdef LED3_PIN
62  LED3_PIN,
63 #else
64  GPIO_UNDEF,
65 #endif
66  } },
67 };
68 #define PWM_NUMOF ARRAY_SIZE(pwm_config)
71 #ifdef __cplusplus
72 }
73 #endif
74 
#define LED2_PIN
RX LED yellow.
Definition: board.h:35
#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.
PWM device configuration.