Loading...
Searching...
No Matches
io1_xplained_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Inria
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "io1_xplained.h"
21#include "saul_reg.h"
22#include "saul/periph.h"
23#include "periph/gpio.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33#ifndef IO1_XPLAINED_PARAM_ADDR
34#define IO1_XPLAINED_PARAM_ADDR (0x07)
35#endif
36
37#ifndef IO1_XPLAINED_PARAMS
38#define IO1_XPLAINED_PARAMS { .addr = IO1_XPLAINED_PARAM_ADDR }
39#endif
40#ifndef IO1_XPLAINED_SAUL_INFO
41#define IO1_XPLAINED_SAUL_INFO {{ .name = "Temperature (IO1 Xplained)" }, \
42 { .name = "LED (IO1 Xplained)" }, \
43 { .name = "GPIO1 (IO1 Xplained)" }, \
44 { .name = "GPIO2 (IO1 Xplained)" }}
45#endif
47
52{
53 IO1_XPLAINED_PARAMS
54};
55
60{
61 IO1_XPLAINED_SAUL_INFO
62};
63
64#ifdef MODULE_SAUL_GPIO
68saul_gpio_params_t io1_xplained_saul_gpios[] =
69{
70 {
71 .pin = IO1_LED_PIN,
72 .mode = GPIO_OUT,
73 .flags = SAUL_GPIO_INVERTED,
74 },
75 {
76 .pin = IO1_GPIO1_PIN,
77 .mode = GPIO_OUT,
78 },
79 {
80 .pin = IO1_GPIO2_PIN,
81 .mode = GPIO_OUT
82 }
83};
84#endif
85
86#ifdef __cplusplus
87}
88#endif
89
@ GPIO_OUT
select GPIO MASK as output
Definition periph_cpu.h:161
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:39
SAUL registry interface definition.
Device initialization parameters.
Direct mapped GPIO configuration values.
Definition periph.h:47
Additional data to collect for each entry.
Definition saul_reg.h:48