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
22
#ifndef DOXYGEN
23
28
#if defined(CPU_LINE_STM32F030x4) || defined(CPU_LINE_STM32F030x6) || \
29
defined(CPU_LINE_STM32F030x8) || defined(CPU_LINE_STM32F031x6) || \
30
defined(CPU_LINE_STM32F051x8)
31
#define STM32_BOOTLOADER_ADDR (0x1FFFEC00)
32
#elif defined(CPU_LINE_STM32F072xB) || defined(CPU_LINE_STM32F070xB)
33
#define STM32_BOOTLOADER_ADDR (0x1FFFC800)
34
#elif defined(CPU_LINE_STM32F030xC) || defined(CPU_LINE_STM32F091xC)
35
#define STM32_BOOTLOADER_ADDR (0x1FFFD800)
36
#elif defined(CPU_LINE_STM32F042x6)
37
#define STM32_BOOTLOADER_ADDR (0x1FFFC400)
38
#endif
39
43
#define STM32_OPTION_BYTES ((uint32_t*) 0x1FFFF800)
44
#define GET_RDP(x) (x & 0xFF)
45
50
#define HAVE_ADC_RES_T
51
typedef
enum
{
52
ADC_RES_6BIT
= (ADC_CFGR1_RES),
53
ADC_RES_8BIT
= (ADC_CFGR1_RES_1),
54
ADC_RES_10BIT
= (ADC_CFGR1_RES_0),
55
ADC_RES_12BIT
= (0x00),
56
ADC_RES_14BIT
= (0xfe),
57
ADC_RES_16BIT
= (0xff)
58
}
adc_res_t
;
65
#define VBAT_ADC_RES ADC_RES_12BIT
66
#define VBAT_ADC_MAX 4095
69
#endif
/* ndef DOXYGEN */
70
71
#ifdef __cplusplus
72
}
73
#endif
74
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