stm32: flash: pull up prefetch to _all

Turns out, there's lots of common code for flash.  Pull up prefetch
on/off to start with, as there's only a single bit name different.

Pull up the definitions of common API functions too, starting with
flash_set_ws.  Even if the implementations are different, things that
meant to be the same, should be defined centrally.
This commit is contained in:
Karl Palsson
2018-07-10 22:21:18 +00:00
parent 9dd901ba27
commit b23dccc7ae
30 changed files with 117 additions and 185 deletions
+1 -3
View File
@@ -32,6 +32,7 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/common/flash_common_all.h>
/*
* For details see:
* PM0081 Programming manual: STM32F40xxx and STM32F41xxx Flash programming
@@ -151,7 +152,6 @@
BEGIN_DECLS
void flash_set_ws(uint32_t ws);
void flash_unlock(void);
void flash_lock(void);
void flash_clear_pgperr_flag(void);
@@ -165,8 +165,6 @@ void flash_clear_wrperr_flag(void);
void flash_clear_pgaerr_flag(void);
void flash_art_enable(void);
void flash_art_disable(void);
void flash_prefetch_enable(void);
void flash_prefetch_disable(void);
void flash_art_reset(void);
void flash_clear_status_flags(void);
void flash_erase_all_sectors(uint32_t program_size);