pwm_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Otto-von-Guericke-Universität Magdeburg
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 
29 #define SAUL_PWM_NO_RGB
35 {
36 #ifdef LED0_PIN
37  {
38  .name = "LED 1",
39  .channel = { PWM_DEV(0), 0, SAUL_PWM_INVERTED },
40  },
41 #endif
42 #ifdef LED1_PIN
43  {
44  .name = "LED 2",
45  .channel = { PWM_DEV(0), 1, SAUL_PWM_INVERTED },
46  },
47 #endif
48 #ifdef LED2_PIN
49  {
50  .name = "LED 3",
51  .channel = { PWM_DEV(0), 2, SAUL_PWM_INVERTED },
52  },
53 #endif
54 #ifdef LED3_PIN
55  {
56  .name = "LED 4",
57  .channel = { PWM_DEV(0), 3, SAUL_PWM_INVERTED },
58  },
59 #endif
60 };
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 
66 #endif /* PWM_PARAMS_H */
static const saul_pwm_dimmer_params_t saul_pwm_dimmer_params[]
LED configuration.
Definition: pwm_params.h:34
#define PWM_DEV(x)
Default PWM access macro.
Definition: pwm.h:78
Parameter definitions for mapping peripherals directly to SAUL.
@ SAUL_PWM_INVERTED
Physical values are inverted from average voltage levels (ie.
Definition: periph.h:83
PWM channels mapped to dimmer-style registration entries.
Definition: periph.h:141
const char * name
Name of the device connected to this channel.
Definition: periph.h:142