aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/flash.c
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-11-16 13:51:55 -0500
committerMarti Bolivar <mbolivar@leaflabs.com>2012-04-11 16:56:51 -0400
commitfa7a177a0cb6c1201912d9fcdfe6d86edffb9d79 (patch)
treedfab78b0830c83c8353db151247160cd6691ce5d /libmaple/flash.c
parentb6290890b64d5188f75527b979c5c7912547be9b (diff)
downloadlibrambutan-fa7a177a0cb6c1201912d9fcdfe6d86edffb9d79.tar.gz
librambutan-fa7a177a0cb6c1201912d9fcdfe6d86edffb9d79.zip
Move Flash support for STM32F1 to libmaple/stm32f1/.
This is a backwards-compatible change. The Flash registers on the STM32F2 line are different than on STM32F1. Therefore, move the register map and bit definitions to new libmaple/stm32f1/include/family/flash.h. Move flash_enable_prefetch() from libmaple/flash.c to new libmaple/stm32f1/flash.c. The remaining pieces of libmaple/flash.c use a common subset of the Flash registers, so they're's portable to F2, and that's all we're currently interested in. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple/flash.c')
-rw-r--r--libmaple/flash.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/libmaple/flash.c b/libmaple/flash.c
index d0e23d0..0ade4cb 100644
--- a/libmaple/flash.c
+++ b/libmaple/flash.c
@@ -25,20 +25,12 @@
*****************************************************************************/
/**
- * @file flash.c
+ * @file libmaple/flash.c
* @brief Flash management functions
*/
-#include <libmaple/libmaple.h>
+#include <libmaple/libmaple_types.h>
#include <libmaple/flash.h>
-#include <libmaple/bitband.h>
-
-/**
- * @brief Turn on the hardware prefetcher.
- */
-void flash_enable_prefetch(void) {
- *bb_perip(&FLASH_BASE->ACR, FLASH_ACR_PRFTBE_BIT) = 1;
-}
/**
* @brief Set flash wait states