pwm_params.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2021 Otto-von-Guericke-Universität Magdeburg
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
18 #include "board.h"
19 #include "saul/periph.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 #define SAUL_PWM_NO_RGB
31 {
32 #ifdef LED0_PIN
33  {
34  .name = "LED 1",
35  .channel = { PWM_DEV(0), 0, SAUL_PWM_INVERTED },
36  },
37 #endif
38 #ifdef LED1_PIN
39  {
40  .name = "LED 2",
41  .channel = { PWM_DEV(0), 1, SAUL_PWM_INVERTED },
42  },
43 #endif
44 #ifdef LED2_PIN
45  {
46  .name = "LED 3",
47  .channel = { PWM_DEV(0), 2, SAUL_PWM_INVERTED },
48  },
49 #endif
50 #ifdef LED3_PIN
51  {
52  .name = "LED 4",
53  .channel = { PWM_DEV(0), 3, SAUL_PWM_INVERTED },
54  },
55 #endif
56 };
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
static const saul_pwm_dimmer_params_t saul_pwm_dimmer_params[]
LED configuration.
Definition: pwm_params.h:30
#define PWM_DEV(x)
Default PWM access macro.
Definition: pwm.h:77
Parameter definitions for mapping peripherals directly to SAUL.
@ SAUL_PWM_INVERTED
Physical values are inverted from average voltage levels (ie.
Definition: periph.h:82
PWM channels mapped to dimmer-style registration entries.
Definition: periph.h:140
const char * name
Name of the device connected to this channel.
Definition: periph.h:141