pwm_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Christian Amsüss <chrysn@fsfe.org>
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 
19 #ifndef PWM_PARAMS_H
20 #define PWM_PARAMS_H
21 
22 #include "board.h"
23 #include "saul/periph.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 {
34  {
35  .name = "LD 1",
36  .channel = { PWM_DEV(0), 0, SAUL_PWM_INVERTED },
37  }
38 };
39 
40 static const saul_pwm_rgb_params_t saul_pwm_rgb_params[] =
41 {
42  {
43  .name = "LD 2",
44  .channels = {
45  { PWM_DEV(0), 1, SAUL_PWM_INVERTED },
46  { PWM_DEV(0), 2, SAUL_PWM_INVERTED },
47  { PWM_DEV(0), 3, SAUL_PWM_INVERTED }
48  }
49  }
50 };
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 #endif /* PWM_PARAMS_H */
57 
saul_pwm_dimmer_params_t::name
const char * name
Name of the device connected to this channel.
Definition: periph.h:142
saul_pwm_rgb_params_t::name
const char * name
Name of the device connected to these channels.
Definition: periph.h:169
periph.h
Parameter definitions for mapping peripherals directly to SAUL.
PWM_DEV
#define PWM_DEV(x)
Default PWM access macro.
Definition: pwm.h:78
board.h
Board specific configuration for the nRF52840-Dongle.
SAUL_PWM_INVERTED
@ SAUL_PWM_INVERTED
Physical values are inverted from average voltage levels (ie.
Definition: periph.h:83
saul_pwm_rgb_params_t
PWM channels mapped to RGB LED registration entries.
Definition: periph.h:168
saul_pwm_dimmer_params_t
PWM channels mapped to dimmer-style registration entries.
Definition: periph.h:141
saul_pwm_dimmer_params
static const saul_pwm_dimmer_params_t saul_pwm_dimmer_params[]
The single LED exposed via SAUL.
Definition: pwm_params.h:32