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 * Copyright (C) 2015 Hamburg University of Applied Sciences
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
21#ifndef PERIPH_L1_PERIPH_CPU_H
22#define PERIPH_L1_PERIPH_CPU_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#ifndef DOXYGEN
29
34#define STM32_BOOTLOADER_ADDR (0x1FF00000)
35
39#define STM32_OPTION_BYTES ((uint32_t*) 0x1FF80000)
40#define GET_RDP(x) (x & 0xFF)
41
46#define HAVE_ADC_RES_T
47typedef enum {
48 ADC_RES_6BIT = (ADC_CR1_RES_0 | ADC_CR1_RES_1),
49 ADC_RES_8BIT = (ADC_CR1_RES_1),
50 ADC_RES_10BIT = (ADC_CR1_RES_0),
51 ADC_RES_12BIT = (0x00),
52 ADC_RES_14BIT = (0xfe),
53 ADC_RES_16BIT = (0xff)
54} adc_res_t;
56#endif /* ndef DOXYGEN */
57
62#define EEPROM_START_ADDR (0x08080000)
63#if defined(CPU_MODEL_STM32L152RE)
64#define EEPROM_SIZE (16384UL) /* 16kB */
65#elif defined(CPU_MODEL_STM32L151RC)
66#define EEPROM_SIZE (8192U) /* 8kB */
67#elif defined(CPU_MODEL_STM32L151CB) || defined(CPU_MODEL_STM32L151CB_A)
68#define EEPROM_SIZE (4096U) /* 4kB */
69#endif
72#ifdef __cplusplus
73}
74#endif
75
76#endif /* PERIPH_L1_PERIPH_CPU_H */
adc_res_t
Possible ADC resolution settings.
Definition adc.h:93
@ ADC_RES_16BIT
ADC resolution: 16 bit.
Definition adc.h:99
@ ADC_RES_8BIT
ADC resolution: 8 bit.
Definition adc.h:95
@ ADC_RES_14BIT
ADC resolution: 14 bit.
Definition adc.h:98
@ ADC_RES_6BIT
ADC resolution: 6 bit.
Definition adc.h:94
@ ADC_RES_10BIT
ADC resolution: 10 bit.
Definition adc.h:96
@ ADC_RES_12BIT
ADC resolution: 12 bit.
Definition adc.h:97