periph_cpu.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2015-2016 Freie Universität Berlin
3  * SPDX-FileCopyrightText: 2015 Hamburg University of Applied Sciences
4  * SPDX-License-Identifier: LGPL-2.1-only
5  */
6 
7 #pragma once
8 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 #ifndef DOXYGEN
25 
30 #define STM32_BOOTLOADER_ADDR (0x1FF00000)
31 
35 #define STM32_OPTION_BYTES ((uint32_t*) 0x1FF80000)
36 #define GET_RDP(x) (x & 0xFF)
37 
42 #define HAVE_ADC_RES_T
43 typedef enum {
44  ADC_RES_6BIT = (ADC_CR1_RES),
45  ADC_RES_8BIT = (ADC_CR1_RES_1),
46  ADC_RES_10BIT = (ADC_CR1_RES_0),
47  ADC_RES_12BIT = (0x00),
48  ADC_RES_14BIT = (0xfe),
49  ADC_RES_16BIT = (0xff)
50 } adc_res_t;
52 #endif /* ndef DOXYGEN */
53 
58 #define EEPROM_START_ADDR (0x08080000)
59 #if defined(CPU_MODEL_STM32L152RE)
60 #define EEPROM_SIZE (16384UL) /* 16kB */
61 #elif defined(CPU_MODEL_STM32L151RC)
62 #define EEPROM_SIZE (8192U) /* 8kB */
63 #elif defined(CPU_MODEL_STM32L151CB) || defined(CPU_MODEL_STM32L151CB_A)
64 #define EEPROM_SIZE (4096U) /* 4kB */
65 #endif
68 #ifdef __cplusplus
69 }
70 #endif
71 
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