Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
periph_cpu.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2015-2016 Freie Universität Berlin
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
18
#ifdef __cplusplus
19
extern
"C"
{
20
#endif
21
25
#if defined(CPU_LINE_STM32F401xE) || defined(CPU_LINE_STM32F410Rx) \
26
|| defined(CPU_LINE_STM32F411xE) || defined(CPU_LINE_STM32F412Zx) \
27
|| defined(CPU_LINE_STM32F413xx) || defined(CPU_LINE_STM32F423xx)
28
#define ADC_DEVS (1U)
29
#elif defined(CPU_LINE_STM32F405xx) || defined(CPU_LINE_STM32F407xx) \
30
|| defined(CPU_LINE_STM32F415xx) || defined(CPU_LINE_STM32F429xx) \
31
|| defined(CPU_LINE_STM32F439xx) || defined(CPU_LINE_STM32F437xx) \
32
|| defined(CPU_LINE_STM32F446xx) || defined(CPU_LINE_STM32F469xx)
33
#define ADC_DEVS (3U)
34
#endif
35
36
#ifndef DOXYGEN
37
42
#if defined(CPU_LINE_STM32F423xx)
43
#define STM32_BOOTLOADER_ADDR (0x1FF00000)
44
#else
45
#define STM32_BOOTLOADER_ADDR (0x1FFF0000)
46
#endif
47
51
#define STM32_OPTION_BYTES ((uint32_t*) 0x1FFFC000)
52
#define GET_RDP(x) ((x & 0xFF00) >> 8)
53
58
#define HAVE_ADC_RES_T
59
typedef
enum
{
60
ADC_RES_6BIT
= (ADC_CR1_RES),
61
ADC_RES_8BIT
= (ADC_CR1_RES_1),
62
ADC_RES_10BIT
= (ADC_CR1_RES_0),
63
ADC_RES_12BIT
= (0x00),
64
ADC_RES_14BIT
= (0xfe),
65
ADC_RES_16BIT
= (0xff)
66
}
adc_res_t
;
73
#define VBAT_ADC_RES ADC_RES_12BIT
74
#define VBAT_ADC_MAX 4095
77
#endif
/* ndef DOXYGEN */
78
79
#ifdef __cplusplus
80
}
81
#endif
82
adc_res_t
adc_res_t
Possible ADC resolution settings.
Definition:
adc.h:92
ADC_RES_16BIT
@ ADC_RES_16BIT
ADC resolution: 16 bit.
Definition:
adc.h:98
ADC_RES_8BIT
@ ADC_RES_8BIT
ADC resolution: 8 bit.
Definition:
adc.h:94
ADC_RES_14BIT
@ ADC_RES_14BIT
ADC resolution: 14 bit.
Definition:
adc.h:97
ADC_RES_6BIT
@ ADC_RES_6BIT
ADC resolution: 6 bit.
Definition:
adc.h:93
ADC_RES_10BIT
@ ADC_RES_10BIT
ADC resolution: 10 bit.
Definition:
adc.h:95
ADC_RES_12BIT
@ ADC_RES_12BIT
ADC resolution: 12 bit.
Definition:
adc.h:96
Generated on Thu Oct 2 2025 12:06:47 by
1.9.1