From d7f698eef315fa5edc009ec6335fc41ad62dfc05 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Tue, 8 May 2012 16:24:42 -0400 Subject: libmaple/flash.h: Doxygen for flash_enable_features(). Signed-off-by: Marti Bolivar --- libmaple/include/libmaple/flash.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'libmaple') diff --git a/libmaple/include/libmaple/flash.h b/libmaple/include/libmaple/flash.h index 4ecfb77..d84ded1 100644 --- a/libmaple/include/libmaple/flash.h +++ b/libmaple/include/libmaple/flash.h @@ -60,10 +60,7 @@ extern "C"{ * -- FLASH_ICACHE: instruction cache * -- FLASH_DCACHE: data cache * - * If the target doesn't provide a feature (e.g. instruction and - * data caches on the STM32F1), the flag should be set to some no-op - * value. This allows using these flags unconditionally, with the - * desired effect taking place on series that support them. + * See that function's Doxygen for more restrictions. */ #include @@ -73,6 +70,19 @@ extern "C"{ void flash_set_latency(uint32 wait_states); +/** + * @brief Enable Flash memory features + * + * If the target MCU doesn't provide a feature (e.g. instruction and + * data caches on the STM32F1), the flag will be ignored. This allows + * using these flags unconditionally, with the desired effect taking + * place on targets that support them. + * + * @param feature_flags Bitwise OR of the following: + * FLASH_PREFETCH (turns on prefetcher), + * FLASH_ICACHE (turns on instruction cache), + * FLASH_DCACHE (turns on data cache). + */ static inline void flash_enable_features(uint32 feature_flags) { FLASH_BASE->ACR |= feature_flags; } -- cgit v1.2.3