stm32l4/include/periph_cpu.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 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 
20 #ifndef PERIPH_CPU_H
21 #define PERIPH_CPU_H
22 
23 #include "periph_cpu_common.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
32 #define CPUID_ADDR (0x1fff7590)
33 
37 enum {
38  PORT_A = 0,
39  PORT_B = 1,
40  PORT_C = 2,
41  PORT_D = 3,
42  PORT_E = 4,
43  PORT_F = 5,
44  PORT_G = 6,
45  PORT_H = 7,
46 };
47 
48 #ifndef DOXYGEN
49 
53 #define HAVE_ADC_RES_T
54 typedef enum {
55  ADC_RES_6BIT = (0x3 << 3),
56  ADC_RES_8BIT = (0x2 << 3),
57  ADC_RES_10BIT = (0x1 << 3),
58  ADC_RES_12BIT = (0x0 << 3),
59  ADC_RES_14BIT = (0xfe),
60  ADC_RES_16BIT = (0xff)
61 } adc_res_t;
63 #endif /* ndef DOXYGEN */
64 
68 typedef struct {
69  gpio_t pin;
70  uint8_t chan;
71 } adc_conf_t;
72 
73 #ifdef __cplusplus
74 }
75 #endif
76 
77 #endif /* PERIPH_CPU_H */
78 
ADC resolution: 12 bit.
not supported by hardware
ADC resolution: 10 bit.
gpio_t adc_conf_t
ADC configuration wrapper.
not supported by hardware
not supported by hardware
not supported by hardware