Merge pull request #81 from merlokk/fix_flash_lock

flash_lock() must be at beginning
This commit is contained in:
Conor Patrick
2019-02-11 21:57:40 -05:00
committed by GitHub

View File

@@ -29,6 +29,11 @@
#include "log.h"
#include "device.h"
static void flash_lock()
{
FLASH->CR |= (1U<<31);
}
static void flash_unlock()
{
if (FLASH->CR & FLASH_CR_LOCK)
@@ -197,8 +202,3 @@ void flash_write_fast(uint32_t addr, uint32_t * data)
__enable_irq();
}
void flash_lock()
{
FLASH->CR |= (1U<<31);
}