libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
flash.h
Go to the documentation of this file.
1/** @defgroup flash_defines Flash Defines
2 *
3 * @brief <b>Defined Constants and Types for the SWM050 Flash API</b>
4 *
5 * @ingroup SWM050_defines
6 *
7 * LGPL License Terms @ref lgpl_license
8 */
9/*
10 * This file is part of the libopencm3 project.
11 *
12 * Copyright (C) 2019 Caleb Szalacinski <contact@skiboy.net>
13 *
14 * This library is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public License
25 * along with this library. If not, see <http://www.gnu.org/licenses/>.
26 */
27/**@{*/
28#ifndef LIBOPENCM3_FLASH_H
29#define LIBOPENCM3_FLASH_H
30
32
34
35uint32_t flash_write(uint32_t *dest, uint32_t *src, uint8_t cnt);
36uint32_t flash_read(uint32_t *src, uint32_t *dest, uint8_t cnt);
37uint32_t flash_erase(void);
38
40
41#endif
42/**@}*/
#define END_DECLS
Definition: common.h:34
#define BEGIN_DECLS
Definition: common.h:33
uint32_t flash_write(uint32_t *dest, uint32_t *src, uint8_t cnt)
Write to the user flash.
Definition: flash.c:55
uint32_t flash_read(uint32_t *src, uint32_t *dest, uint8_t cnt)
Read from the user flash.
Definition: flash.c:79
uint32_t flash_erase(void)
Erase the user flash.
Definition: flash.c:93