libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
flash_common_idcache.h
Go to the documentation of this file.
1/** @addtogroup flash_defines
2 */
3/*
4 * This file is part of the libopencm3 project.
5 *
6 * This library is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this library. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
23
24/**@{*/
25
26/** @addtogroup flash_acr_values
27 * @{
28 */
29#define FLASH_ACR_DCRST (1 << 12)
30#define FLASH_ACR_ICRST (1 << 11)
31#define FLASH_ACR_DCEN (1 << 10)
32#define FLASH_ACR_ICEN (1 << 9)
33/**@}*/
34
35
37
38/** Enable the data cache */
39void flash_dcache_enable(void);
40
41/** Disable the data cache */
42void flash_dcache_disable(void);
43
44/** Enable the Instruction Cache */
45void flash_icache_enable(void);
46
47/** Disable the Instruction Cache */
48void flash_icache_disable(void);
49
50/** Reset the Data Cache.
51 * The data cache must be disabled for this to have effect.
52 */
53void flash_dcache_reset(void);
54
55/** Reset the Instruction Cache.
56 * The instruction cache must be disabled for this to have effect.
57 */
58void flash_icache_reset(void);
59
61/**@}*/
62
#define END_DECLS
Definition: common.h:34
#define BEGIN_DECLS
Definition: common.h:33
void flash_dcache_reset(void)
Reset the Data Cache.
void flash_icache_disable(void)
Disable the Instruction Cache.
void flash_icache_reset(void)
Reset the Instruction Cache.
void flash_icache_enable(void)
Enable the Instruction Cache.
void flash_dcache_disable(void)
Disable the data cache.
void flash_dcache_enable(void)
Enable the data cache.