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:
@@ -42,9 +42,10 @@ OBJS = rcc.o adc.o can.o pwr.o dma.o flash.o desig.o
|
||||
OBJS += gpio_common_all.o gpio_common_f0234.o \
|
||||
dac_common_all.o crc_common_all.o crc_v2.o \
|
||||
iwdg_common_all.o pwr_common_v1.o dma_common_l1f013.o\
|
||||
timer_common_all.o timer_common_f0234.o flash_common_f234.o \
|
||||
flash.o exti_common_all.o rcc_common_all.o
|
||||
timer_common_all.o timer_common_f0234.o \
|
||||
exti_common_all.o rcc_common_all.o
|
||||
OBJS += adc_common_v2.o adc_common_v2_multi.o
|
||||
OBJS += flash_common_all.o flash_common_f234.o
|
||||
OBJS += usart_common_v2.o usart_common_all.o
|
||||
OBJS += i2c_common_v2.o
|
||||
OBJS += spi_common_all.o spi_common_v2.o
|
||||
|
||||
@@ -58,25 +58,5 @@ void flash_clear_status_flags(void)
|
||||
flash_clear_eop_flag();
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable the FLASH Prefetch Buffer
|
||||
* This buffer is used for instruction fetches and is enabled by default after
|
||||
* reset.
|
||||
*/
|
||||
void flash_prefetch_enable(void)
|
||||
{
|
||||
FLASH_ACR |= FLASH_ACR_PRFTBE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable the FLASH Prefetch Buffer
|
||||
* This buffer is used for instruction fetches and is enabled by default after
|
||||
* reset.
|
||||
*/
|
||||
void flash_prefetch_disable(void)
|
||||
{
|
||||
FLASH_ACR &= ~FLASH_ACR_PRFTBE;
|
||||
}
|
||||
|
||||
/**@}*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user