Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
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_F0_PERIPH_CPU_H
20
#define PERIPH_F0_PERIPH_CPU_H
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
26
#ifndef DOXYGEN
27
32
#if defined(CPU_LINE_STM32F030x4) || defined(CPU_LINE_STM32F030x6) || \
33
defined(CPU_LINE_STM32F030x8) || defined(CPU_LINE_STM32F031x6) || \
34
defined(CPU_LINE_STM32F051x8)
35
#define STM32_BOOTLOADER_ADDR (0x1FFFEC00)
36
#elif defined(CPU_LINE_STM32F072xB) || defined(CPU_LINE_STM32F070xB)
37
#define STM32_BOOTLOADER_ADDR (0x1FFFC800)
38
#elif defined(CPU_LINE_STM32F030xC) || defined(CPU_LINE_STM32F091xC)
39
#define STM32_BOOTLOADER_ADDR (0x1FFFD800)
40
#elif defined(CPU_LINE_STM32F042x6)
41
#define STM32_BOOTLOADER_ADDR (0x1FFFC400)
42
#endif
43
47
#define STM32_OPTION_BYTES ((uint32_t*) 0x1FFFF800)
48
#define GET_RDP(x) (x & 0xFF)
49
54
#define HAVE_ADC_RES_T
55
typedef
enum
{
56
ADC_RES_6BIT
= (0x3 << 3),
57
ADC_RES_8BIT
= (0x2 << 3),
58
ADC_RES_10BIT
= (0x1 << 3),
59
ADC_RES_12BIT
= (0x0 << 3),
60
ADC_RES_14BIT
= (0xfe),
61
ADC_RES_16BIT
= (0xff)
62
}
adc_res_t
;
69
#define VBAT_ADC_RES ADC_RES_12BIT
70
#define VBAT_ADC_MAX 4095
73
#endif
/* ndef DOXYGEN */
74
75
#ifdef __cplusplus
76
}
77
#endif
78
79
#endif
/* PERIPH_F0_PERIPH_CPU_H */
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_14BIT
@ ADC_RES_14BIT
ADC resolution: 14 bit.
Definition
adc.h:98
ADC_RES_6BIT
@ ADC_RES_6BIT
ADC resolution: 6 bit.
Definition
adc.h:94
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
Generated on Sat Nov 23 2024 01:58:06 by
1.9.8