Loading...
Searching...
No Matches
periph_cpu.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015-2017 Freie Universität Berlin
3 * 2017 Inria
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
22#ifndef PERIPH_L0_PERIPH_CPU_H
23#define PERIPH_L0_PERIPH_CPU_H
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#ifndef DOXYGEN
30
35#define STM32_BOOTLOADER_ADDR (0x1FF00000)
36
41#define HAVE_ADC_RES_T
42typedef enum {
43 ADC_RES_6BIT = (0x3 << 3),
44 ADC_RES_8BIT = (0x2 << 3),
45 ADC_RES_10BIT = (0x1 << 3),
46 ADC_RES_12BIT = (0x0 << 3),
47 ADC_RES_14BIT = (0xfe),
48 ADC_RES_16BIT = (0xff)
49} adc_res_t;
51#endif /* ndef DOXYGEN */
52
58#define EEPROM_START_ADDR (0x08080000)
59#if defined(CPU_LINE_STM32L073xx) || defined(CPU_LINE_STM32L072xx)
60#define EEPROM_SIZE (6144U) /* 6kB */
61#elif defined(CPU_LINE_STM32L053xx) || defined(CPU_LINE_STM32L052xx)
62#define EEPROM_SIZE (2048U) /* 2kB */
63#elif defined(CPU_LINE_STM32L031xx)
64#define EEPROM_SIZE (1024U) /* 1kB */
65#elif defined(CPU_LINE_STM32L010xB) || defined(CPU_LINE_STM32L011x3) || \
66 defined(CPU_LINE_STM32L011x4) || defined(CPU_LINE_STM32L021x4) || \
67 defined(CPU_MODEL_STM32L011K4)
68#define EEPROM_SIZE (512U) /* 512B */
69#elif defined(CPU_LINE_STM32L010x6) || defined(CPU_LINE_STM32L010x8)
70#define EEPROM_SIZE (256U) /* 256B */
71#elif defined(CPU_LINE_STM32L010x4)
72#define EEPROM_SIZE (128U) /* 128B */
73#endif
76#ifdef __cplusplus
77}
78#endif
79
80#endif /* PERIPH_L0_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