stm32: f24: flash: Make code match documentation
This removes the shift from the defines, and includes them in the helper function, making the code match the documentation, and following how the rest of the library commonly operates. Code using the existing defines will continue to work.
This commit is contained in:
committed by
Karl Palsson
parent
07ee71cf23
commit
ec15c1ca64
@@ -38,8 +38,8 @@ programming manual for more information.
|
||||
|
||||
static inline void flash_set_program_size(uint32_t psize)
|
||||
{
|
||||
FLASH_CR &= ~(((1 << 0) | (1 << 1)) << 8);
|
||||
FLASH_CR |= psize;
|
||||
FLASH_CR &= ~(FLASH_CR_PROGRAM_MASK << FLASH_CR_PROGRAM_SHIFT);
|
||||
FLASH_CR |= psize << FLASH_CR_PROGRAM_SHIFT;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user