Loading...
Searching...
No Matches
io1_xplained_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 Inria
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 IO1_XPLAINED_PARAMS_H
20#define IO1_XPLAINED_PARAMS_H
21
22#include "board.h"
23#include "io1_xplained.h"
25#include "saul_reg.h"
26#include "saul/periph.h"
27#include "periph/gpio.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
37#ifndef IO1_XPLAINED_PARAM_ADDR
38#define IO1_XPLAINED_PARAM_ADDR (0x07)
39#endif
40
41#ifndef IO1_XPLAINED_PARAMS
42#define IO1_XPLAINED_PARAMS { .addr = IO1_XPLAINED_PARAM_ADDR }
43#endif
44#ifndef IO1_XPLAINED_SAUL_INFO
45#define IO1_XPLAINED_SAUL_INFO {{ .name = "Temperature (IO1 Xplained)" }, \
46 { .name = "LED (IO1 Xplained)" }, \
47 { .name = "GPIO1 (IO1 Xplained)" }, \
48 { .name = "GPIO2 (IO1 Xplained)" }}
49#endif
56{
57 IO1_XPLAINED_PARAMS
58};
59
64{
65 IO1_XPLAINED_SAUL_INFO
66};
67
68#ifdef MODULE_SAUL_GPIO
72saul_gpio_params_t io1_xplained_saul_gpios[] =
73{
74 {
75 .pin = IO1_LED_PIN,
76 .mode = GPIO_OUT,
77 .flags = SAUL_GPIO_INVERTED,
78 },
79 {
80 .pin = IO1_GPIO1_PIN,
81 .mode = GPIO_OUT,
82 },
83 {
84 .pin = IO1_GPIO2_PIN,
85 .mode = GPIO_OUT
86 }
87};
88#endif
89
90#ifdef __cplusplus
91}
92#endif
93
94#endif /* IO1_XPLAINED_PARAMS_H */
@ GPIO_OUT
select GPIO MASK as output
Definition periph_cpu.h:165
Low-level GPIO peripheral driver interface definitions.
Device driver interface for the Atmel IO1 Xplained extension.
Internal addresses, constants for the IO1 Xplained extension.
static const io1_xplained_params_t io1_xplained_params[]
Configure IO1 Xplained extension.
saul_reg_info_t io1_xplained_saul_info[][4]
Allocate and configure entries to the SAUL registry.
Parameter definitions for mapping peripherals directly to SAUL.
@ SAUL_GPIO_INVERTED
pin is used as inverted
Definition periph.h:43
SAUL registry interface definition.
Device initialization parameters.
Direct mapped GPIO configuration values.
Definition periph.h:51
gpio_t pin
GPIO pin to initialize and expose.
Definition periph.h:53
Additional data to collect for each entry.
Definition saul_reg.h:49