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"
24 #include "io1_xplained_internals.h"
25 #include "saul_reg.h"
26 #include "saul/periph.h"
27 #include "periph/gpio.h"
28 
29 #ifdef __cplusplus
30 extern "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
50 
56 {
57  IO1_XPLAINED_PARAMS
58 };
59 
64 {
65  IO1_XPLAINED_SAUL_INFO
66 };
67 
68 #ifdef MODULE_SAUL_GPIO
69 
72 saul_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 */
95 
io1_xplained.h
Device driver interface for the Atmel IO1 Xplained extension.
io1_xplained_params
static const io1_xplained_params_t io1_xplained_params[]
Configure IO1 Xplained extension.
Definition: io1_xplained_params.h:55
saul_gpio_params_t::pin
gpio_t pin
GPIO pin to initialize and expose.
Definition: periph.h:53
io1_xplained_saul_info
saul_reg_info_t io1_xplained_saul_info[][4]
Allocate and configure entries to the SAUL registry.
Definition: io1_xplained_params.h:63
io1_xplained_params_t
Device initialization parameters.
Definition: io1_xplained.h:69
periph.h
Parameter definitions for mapping peripherals directly to SAUL.
GPIO_OUT
@ GPIO_OUT
configure as output in push-pull mode
Definition: gpio.h:122
saul_reg_info_t
Additional data to collect for each entry.
Definition: saul_reg.h:49
saul_reg.h
SAUL registry interface definition.
gpio.h
Low-level GPIO peripheral driver interface definitions.
saul_gpio_params_t
Direct mapped GPIO configuration values.
Definition: periph.h:51
SAUL_GPIO_INVERTED
@ SAUL_GPIO_INVERTED
pin is used as inverted
Definition: periph.h:43
io1_xplained_internals.h
Internal addresses, constants for the IO1 Xplained extension.