periph_cpu.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2017 Freie Universität Berlin
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 #ifndef DOXYGEN
24 
29 #define STM32_BOOTLOADER_ADDR (0x1FF00000)
30 
34 #define STM32_OPTION_BYTES ((uint32_t*) 0x1FFF0000)
35 #define GET_RDP(x) ((x & 0xFF00) >> 8)
36 
40 #define ADC_DEVS (3U)
41 
46 #define HAVE_ADC_RES_T
47 typedef enum {
48  ADC_RES_6BIT = (ADC_CR1_RES),
49  ADC_RES_8BIT = (ADC_CR1_RES_1),
50  ADC_RES_10BIT = (ADC_CR1_RES_0),
51  ADC_RES_12BIT = (0x00),
52  ADC_RES_14BIT = (0xfe),
53  ADC_RES_16BIT = (0xff)
54 } adc_res_t;
61 #define VBAT_ADC_RES ADC_RES_12BIT
62 #define VBAT_ADC_MAX 4095
65 #endif /* ndef DOXYGEN */
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
adc_res_t
Possible ADC resolution settings.
Definition: adc.h:92
@ ADC_RES_16BIT
ADC resolution: 16 bit.
Definition: adc.h:98
@ ADC_RES_8BIT
ADC resolution: 8 bit.
Definition: adc.h:94
@ ADC_RES_14BIT
ADC resolution: 14 bit.
Definition: adc.h:97
@ ADC_RES_6BIT
ADC resolution: 6 bit.
Definition: adc.h:93
@ ADC_RES_10BIT
ADC resolution: 10 bit.
Definition: adc.h:95
@ ADC_RES_12BIT
ADC resolution: 12 bit.
Definition: adc.h:96