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  gpio_t pin;
73  uint8_t chan;
74 } dac_conf_t;
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 #endif /* PERIPH_CPU_H */
81 
ADC resolution: 12 bit.
ADC resolution: 14 bit (not supported)
ADC resolution: 10 bit.
ADC resolution: 16 bit (not supported)
ADC resolution: 8 bit.
ADC resolution: 6 bit.
CPU specific DAC configuration.
CPU specific ADC configuration.