stm32f2/include/periph_cpu.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Engineering-Spirit
3  * Copyright (C) 2016 OTA keys S.A.
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 
21 #ifndef PERIPH_CPU_H
22 #define PERIPH_CPU_H
23 
24 #include "periph_cpu_common.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
33 #define CPUID_ADDR (0x1fff7a10)
34 
38 enum {
39  PORT_A = 0,
40  PORT_B = 1,
41  PORT_C = 2,
42  PORT_D = 3,
43  PORT_E = 4,
44  PORT_F = 5,
45  PORT_G = 6,
46  PORT_H = 7,
47  PORT_I = 8
48 };
49 
53 #define ADC_DEVS (2U)
54 
58 typedef struct {
59  gpio_t pin;
60  uint8_t dev;
61  uint8_t chan;
62 } adc_conf_t;
63 
68 #define HAVE_ADC_RES_T
69 typedef enum {
70  ADC_RES_6BIT = 0x03000000,
71  ADC_RES_8BIT = 0x02000000,
72  ADC_RES_10BIT = 0x01000000,
73  ADC_RES_12BIT = 0x00000000,
76 } adc_res_t;
79 #ifdef __cplusplus
80 }
81 #endif
82 
83 #endif /* PERIPH_CPU_H */
84 
ADC resolution: 12 bit.
ADC resolution: 14 bit (not supported)
ADC resolution: 10 bit.
gpio_t adc_conf_t
ADC configuration wrapper.
ADC resolution: 16 bit (not supported)
ADC resolution: 8 bit.
ADC resolution: 6 bit.