diff options
author | Perry Hung <iperry@alum.mit.edu> | 2010-08-04 04:17:16 -0400 |
---|---|---|
committer | Perry Hung <iperry@alum.mit.edu> | 2010-08-04 04:17:16 -0400 |
commit | 2bb8c3fbe39ad12bc4669d499228961ad25e0ace (patch) | |
tree | 8037e64219d4a7b875c70baf2d5e0697c194cf5f /libmaple/flash.h | |
parent | d0e353ca9f3a0986c54beab3948117bdaade700e (diff) | |
download | librambutan-2bb8c3fbe39ad12bc4669d499228961ad25e0ace.tar.gz librambutan-2bb8c3fbe39ad12bc4669d499228961ad25e0ace.zip |
Basic flash peripheral management api for board bringup
Diffstat (limited to 'libmaple/flash.h')
-rw-r--r-- | libmaple/flash.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/libmaple/flash.h b/libmaple/flash.h index dca5984..a1ae0a4 100644 --- a/libmaple/flash.h +++ b/libmaple/flash.h @@ -24,17 +24,26 @@ /** - * @brief + * @brief basic stm32 flash setup routines */ #ifndef _FLASH_H_ #define _FLASH_H_ -#define FLASH_BASE 0x40022000 -#define FLASH_ACR FLASH_BASE +#define FLASH_WAIT_STATE_0 0x0 +#define FLASH_WAIT_STATE_1 0x1 +#define FLASH_WAIT_STATE_2 0x2 + +#ifdef __cplusplus +extern "C"{ +#endif void flash_enable_prefetch(void); -void flash_set_latency(void); +void flash_set_latency(uint32 wait_states); + +#ifdef __cplusplus +} +#endif #endif |