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
9#pragma once
10
20
21#include "board.h"
22#include "io1_xplained.h"
24#include "saul_reg.h"
25#include "saul/periph.h"
26#include "periph/gpio.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
36#ifndef IO1_XPLAINED_PARAM_ADDR
37#define IO1_XPLAINED_PARAM_ADDR (0x07)
38#endif
39
40#ifndef IO1_XPLAINED_PARAMS
41#define IO1_XPLAINED_PARAMS { .addr = IO1_XPLAINED_PARAM_ADDR }
42#endif
43#ifndef IO1_XPLAINED_SAUL_INFO
44#define IO1_XPLAINED_SAUL_INFO {{ .name = "Temperature (IO1 Xplained)" }, \
45 { .name = "LED (IO1 Xplained)" }, \
46 { .name = "GPIO1 (IO1 Xplained)" }, \
47 { .name = "GPIO2 (IO1 Xplained)" }}
48#endif
50
55{
56 IO1_XPLAINED_PARAMS
57};
58
63{
64 IO1_XPLAINED_SAUL_INFO
65};
66
67#ifdef MODULE_SAUL_GPIO
71saul_gpio_params_t io1_xplained_saul_gpios[] =
72{
73 {
74 .pin = IO1_LED_PIN,
75 .mode = GPIO_OUT,
76 .flags = SAUL_GPIO_INVERTED,
77 },
78 {
79 .pin = IO1_GPIO1_PIN,
80 .mode = GPIO_OUT,
81 },
82 {
83 .pin = IO1_GPIO2_PIN,
84 .mode = GPIO_OUT
85 }
86};
87#endif
88
89#ifdef __cplusplus
90}
91#endif
92
@ 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:42
SAUL registry interface definition.
Device initialization parameters.
Direct mapped GPIO configuration values.
Definition periph.h:50
Additional data to collect for each entry.
Definition saul_reg.h:48