stm32l0/include/periph_cpu.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2017 Freie Universit├Ąt Berlin
3  * 2017 Inria
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
22 #ifndef PERIPH_CPU_H
23 #define PERIPH_CPU_H
24 
25 #include "periph_cpu_common.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
34 enum {
35  PORT_A = 0,
36  PORT_B = 1,
37  PORT_C = 2,
38  PORT_D = 3,
39  PORT_E = 4,
40  PORT_H = 7,
41 };
42 
43 #ifndef DOXYGEN
44 
48 #define HAVE_ADC_RES_T
49 typedef enum {
50  ADC_RES_6BIT = (0x3 << 3),
51  ADC_RES_8BIT = (0x2 << 3),
52  ADC_RES_10BIT = (0x1 << 3),
53  ADC_RES_12BIT = (0x0 << 3),
54  ADC_RES_14BIT = (0xfe),
55  ADC_RES_16BIT = (0xff)
56 } adc_res_t;
58 #endif /* ndef DOXYGEN */
59 
63 typedef struct {
64  gpio_t pin;
65  uint8_t chan;
66 } adc_conf_t;
67 
71 typedef struct {
72  I2C_TypeDef *dev;
73  gpio_t scl;
74  gpio_t sda;
77  uint8_t ev_irqn;
78 } i2c_conf_t;
79 
80 #ifdef __cplusplus
81 }
82 #endif
83 
84 #endif /* PERIPH_CPU_H */
85 
I2C configuration options.
ADC resolution: 12 bit.
gpio_t scl
scl pin number
gpio_af_t
Available MUX values for configuring a pin&#39;s alternate function.
gpio_mode_t pin_mode
with or without pull resistor
not supported by hardware
ADC resolution: 10 bit.
gpio_t adc_conf_t
ADC configuration wrapper.
not supported by hardware
I2C_TypeDef * dev
i2c device
not supported by hardware
not supported by hardware
gpio_t sda
sda pin number
uint8_t ev_irqn
event IRQ
gpio_af_t af
I2C alternate function value.