diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2012-01-10 13:53:18 -0500 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2012-04-11 16:56:54 -0400 |
commit | 511a553334f36112bc2fd85f7c991840df727b60 (patch) | |
tree | cbcc48e082a7d08de0e07a5c52356c5b862673c7 /libmaple/stm32f2/flash.c | |
parent | e6a595b6e51e82388b323dbd4f96aad023ddd978 (diff) | |
download | librambutan-511a553334f36112bc2fd85f7c991840df727b60.tar.gz librambutan-511a553334f36112bc2fd85f7c991840df727b60.zip |
STM32F2 Flash support.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple/stm32f2/flash.c')
-rw-r--r-- | libmaple/stm32f2/flash.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/libmaple/stm32f2/flash.c b/libmaple/stm32f2/flash.c new file mode 100644 index 0000000..d239940 --- /dev/null +++ b/libmaple/stm32f2/flash.c @@ -0,0 +1,39 @@ +/****************************************************************************** + * The MIT License + * + * Copyright (c) 2011 LeafLabs, LLC. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + *****************************************************************************/ + +/** + * @file libmaple/stm32f2/flash.c + * @brief Flash management functions + */ + +#include <libmaple/flash.h> + +/** + * @brief Turn on the instruction prefetcher. + */ +void flash_enable_prefetch(void) { + FLASH_BASE->ACR |= FLASH_ACR_PRFTEN; +} |