Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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
9
#pragma once
10
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
28
#if defined(ADC4)
29
#define ADC_DEVS (4U)
30
#elif defined(ADC3)
31
#define ADC_DEVS (3U)
32
#elif defined(ADC2)
33
#define ADC_DEVS (2U)
34
#elif defined(ADC1)
35
#define ADC_DEVS (1U)
36
#endif
37
41
#define ADC_T_ADCVREG_STUP_US (10)
42
43
#ifndef DOXYGEN
44
49
#define STM32_BOOTLOADER_ADDR (0x1FFFD800)
50
54
#define STM32_OPTION_BYTES ((uint32_t*) 0x1FFFF800)
55
#define GET_RDP(x) (x & 0xFF)
56
61
#define HAVE_ADC_RES_T
62
typedef
enum
{
63
ADC_RES_6BIT
= (ADC_CFGR_RES),
64
ADC_RES_8BIT
= (ADC_CFGR_RES_1),
65
ADC_RES_10BIT
= (ADC_CFGR_RES_0),
66
ADC_RES_12BIT
= (0x00),
67
ADC_RES_14BIT
= (0xfe),
68
ADC_RES_16BIT
= (0xff)
69
}
adc_res_t
;
76
#define VBAT_ADC_RES ADC_RES_12BIT
77
#define VBAT_ADC_MAX 4095
80
#endif
/* ndef DOXYGEN */
81
82
#ifdef __cplusplus
83
}
84
#endif
85
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 Fri Jun 20 2025 21:02:35 by
1.9.1