periph_cpu.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2016 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 PERIPH_F4_PERIPH_CPU_H
20 #define PERIPH_F4_PERIPH_CPU_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
29 #if defined(CPU_LINE_STM32F401xE) || defined(CPU_LINE_STM32F410Rx) \
30  || defined(CPU_LINE_STM32F411xE) || defined(CPU_LINE_STM32F412Zx) \
31  || defined(CPU_LINE_STM32F413xx) || defined(CPU_LINE_STM32F423xx)
32 #define ADC_DEVS (1U)
33 #elif defined(CPU_LINE_STM32F405xx) || defined(CPU_LINE_STM32F407xx) \
34  || defined(CPU_LINE_STM32F415xx) || defined(CPU_LINE_STM32F429xx) \
35  || defined(CPU_LINE_STM32F437xx) || defined(CPU_LINE_STM32F446xx)
36 #define ADC_DEVS (3U)
37 #endif
38 
39 #ifndef DOXYGEN
40 
45 #if defined(CPU_LINE_STM32F423xx)
46 #define STM32_BOOTLOADER_ADDR (0x1FF00000)
47 #else
48 #define STM32_BOOTLOADER_ADDR (0x1FFF0000)
49 #endif
50 
55 #define HAVE_ADC_RES_T
56 typedef enum {
57  ADC_RES_6BIT = 0x03000000,
58  ADC_RES_8BIT = 0x02000000,
59  ADC_RES_10BIT = 0x01000000,
60  ADC_RES_12BIT = 0x00000000,
61  ADC_RES_14BIT = 1,
62  ADC_RES_16BIT = 2
63 } adc_res_t;
65 #endif /* ndef DOXYGEN */
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 #endif /* PERIPH_F4_PERIPH_CPU_H */
72 
ADC_RES_6BIT
@ ADC_RES_6BIT
ADC resolution: 6 bit.
Definition: adc.h:94
ADC_RES_14BIT
@ ADC_RES_14BIT
ADC resolution: 14 bit.
Definition: adc.h:98
adc_res_t
adc_res_t
Possible ADC resolution settings.
Definition: adc.h:93
ADC_RES_16BIT
@ ADC_RES_16BIT
ADC resolution: 16 bit.
Definition: adc.h:99
ADC_RES_8BIT
@ ADC_RES_8BIT
ADC resolution: 8 bit.
Definition: adc.h:95
ADC_RES_10BIT
@ ADC_RES_10BIT
ADC resolution: 10 bit.
Definition: adc.h:96
ADC_RES_12BIT
@ ADC_RES_12BIT
ADC resolution: 12 bit.
Definition: adc.h:97