Loading...
Searching...
No Matches
gpio_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 SKF AB
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "saul/periph.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
29{
30 /* These LEDs are marked on the board silkscreen with "LED3" for the red LED,
31 * and "LED4" for the RGB LED, hence the names for the SAUL actuators don't
32 * match the LEDx_PIN macros in board.h */
33 /* LED1 and LED2 on the board are wired to the target CPU reset pin, and the
34 * power supply line and are not software controllable */
35 {
36 .name = "LED3",
37 .pin = LED0_PIN,
38 .mode = GPIO_OUT,
40 },
41 {
42 .name = "LED4_R",
43 .pin = LED1_PIN,
44 .mode = GPIO_OUT,
46 },
47 {
48 .name = "LED4_G",
49 .pin = LED2_PIN,
50 .mode = GPIO_OUT,
52 },
53 {
54 .name = "LED4_B",
55 .pin = LED3_PIN,
56 .mode = GPIO_OUT,
58 },
59 {
60 .name = "SW3",
61 .pin = BTN0_PIN,
62 .mode = BTN0_MODE,
63 .flags = (SAUL_GPIO_INVERTED),
64 },
65 {
66 .name = "SW4",
67 .pin = BTN1_PIN,
68 .mode = BTN1_MODE,
69 .flags = (SAUL_GPIO_INVERTED),
70 },
71};
72
73#ifdef __cplusplus
74}
75#endif
76
static const saul_gpio_params_t saul_gpio_params[]
LED configuration.
Definition gpio_params.h:29
#define BTN1_MODE
Button B mode.
Definition board.h:44
#define BTN1_PIN
Button B pin.
Definition board.h:43
#define LED2_PIN
RX LED yellow.
Definition board.h:32
@ GPIO_OUT
select GPIO MASK as output
Definition periph_cpu.h:161
Board specific definitions for the FRDM-KW41Z.
Parameter definitions for mapping peripherals directly to SAUL.
@ SAUL_GPIO_INIT_CLEAR
set pin inactive after init
Definition periph.h:43
@ SAUL_GPIO_INVERTED
pin is used as inverted
Definition periph.h:42
Direct mapped GPIO configuration values.
Definition periph.h:50