periph.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Freie Universit├Ąt Berlin
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 SAUL_PERIPH_H
20 #define SAUL_PERIPH_H
21 
22 #if MODULE_SAUL_GPIO || DOXYGEN
23 #include "periph/gpio.h"
24 #endif /* MODULE_SAUL_GPIO */
25 
26 #if MODULE_SAUL_ADC || DOXYGEN
27 #include "periph/adc.h"
28 #endif /* MODULE_SAUL_ADC */
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #if MODULE_SAUL_GPIO || DOXYGEN
35 
38 typedef enum {
39  SAUL_GPIO_INVERTED = (1 << 0),
40  SAUL_GPIO_INIT_CLEAR = (1 << 1),
41  SAUL_GPIO_INIT_SET = (1 << 2),
43 
47 typedef struct {
48  const char *name;
49  gpio_t pin;
53 #endif /* MODULE_SAUL_GPIO */
54 
55 #if MODULE_SAUL_ADC || DOXYGEN
56 
59 typedef struct {
60  const char *name;
64 #endif /* MODULE_SAUL_ADC */
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif /* SAUL_PERIPH_H */
71 
pin is used as inverted
Definition: periph.h:39
Low-level GPIO peripheral driver interface definitions.
saul_gpio_flags_t flags
Configuration flags.
Definition: periph.h:51
set pin active after init
Definition: periph.h:41
unsigned int adc_t
Define default ADC type identifier.
Definition: adc.h:59
const char * name
name of the device connected to this pin
Definition: periph.h:60
adc_t line
ADC line to initialize and expose.
Definition: periph.h:61
set pin inactive after init
Definition: periph.h:40
Low-level ADC peripheral driver interface definitions.
adc_res_t res
ADC resolution.
Definition: periph.h:62
Direct mapped GPIO configuration values.
Definition: periph.h:47
const char * name
name of the device connected to this pin
Definition: periph.h:48
gpio_mode_t mode
pin mode to use
Definition: periph.h:50
gpio_t pin
GPIO pin to initialize and expose.
Definition: periph.h:49
saul_gpio_flags_t
SAUL GPIO configuration flags.
Definition: periph.h:38
Direct mapped ADC configuration values.
Definition: periph.h:59