libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
flash_common_f.c
Go to the documentation of this file.
1/** @addtogroup flash_file
2 *
3 */
4
5/*
6 * This file is part of the libopencm3 project.
7 *
8 * This library is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this library. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22/**@{*/
23
26
27
28void flash_unlock(void)
29{
30 /* Authorize the FPEC access. */
33}
34
35void flash_lock(void)
36{
38}
39
40/* The bit number for EOP moves sometimes, but it's always a write 1 to clear */
42{
44}
45
46/**@}*/
#define FLASH_SR
#define FLASH_KEYR
#define FLASH_CR
#define FLASH_CR_LOCK
#define FLASH_KEYR_KEY2
#define FLASH_SR_EOP
#define FLASH_KEYR_KEY1
void flash_unlock(void)
Unlock the Flash Program and Erase Controller This enables write access to the Flash memory.
void flash_clear_eop_flag(void)
Clear the End of OPeration flag.
void flash_lock(void)
Lock the Flash Program and Erase Controller Used to prevent spurious writes to FLASH.