[flash] f1: use "proper" bit definition naming.
Part 2 of 4: updated f1 to use flash_<reg>_bit instead of just flash_bit
This commit is contained in:
@@ -44,48 +44,48 @@
|
||||
|
||||
/* --- FLASH_ACR values ---------------------------------------------------- */
|
||||
|
||||
#define FLASH_PRFTBS (1 << 5)
|
||||
#define FLASH_PRFTBE (1 << 4)
|
||||
#define FLASH_HLFCYA (1 << 3)
|
||||
#define FLASH_LATENCY_0WS 0x00
|
||||
#define FLASH_LATENCY_1WS 0x01
|
||||
#define FLASH_LATENCY_2WS 0x02
|
||||
#define FLASH_ACR_PRFTBS (1 << 5)
|
||||
#define FLASH_ACR_PRFTBE (1 << 4)
|
||||
#define FLASH_ACR_HLFCYA (1 << 3)
|
||||
#define FLASH_ACR_LATENCY_0WS 0x00
|
||||
#define FLASH_ACR_LATENCY_1WS 0x01
|
||||
#define FLASH_ACR_LATENCY_2WS 0x02
|
||||
|
||||
/* --- FLASH_SR values ----------------------------------------------------- */
|
||||
|
||||
#define FLASH_EOP (1 << 5)
|
||||
#define FLASH_WRPRTERR (1 << 4)
|
||||
#define FLASH_PGERR (1 << 2)
|
||||
#define FLASH_BSY (1 << 0)
|
||||
#define FLASH_SR_EOP (1 << 5)
|
||||
#define FLASH_SR_WRPRTERR (1 << 4)
|
||||
#define FLASH_SR_PGERR (1 << 2)
|
||||
#define FLASH_SR_BSY (1 << 0)
|
||||
|
||||
/* --- FLASH_CR values ----------------------------------------------------- */
|
||||
|
||||
#define FLASH_EOPIE (1 << 12)
|
||||
#define FLASH_ERRIE (1 << 10)
|
||||
#define FLASH_OPTWRE (1 << 9)
|
||||
#define FLASH_LOCK (1 << 7)
|
||||
#define FLASH_STRT (1 << 6)
|
||||
#define FLASH_OPTER (1 << 5)
|
||||
#define FLASH_OPTPG (1 << 4)
|
||||
#define FLASH_MER (1 << 2)
|
||||
#define FLASH_PER (1 << 1)
|
||||
#define FLASH_PG (1 << 0)
|
||||
#define FLASH_CR_EOPIE (1 << 12)
|
||||
#define FLASH_CR_ERRIE (1 << 10)
|
||||
#define FLASH_CR_OPTWRE (1 << 9)
|
||||
#define FLASH_CR_LOCK (1 << 7)
|
||||
#define FLASH_CR_STRT (1 << 6)
|
||||
#define FLASH_CR_OPTER (1 << 5)
|
||||
#define FLASH_CR_OPTPG (1 << 4)
|
||||
#define FLASH_CR_MER (1 << 2)
|
||||
#define FLASH_CR_PER (1 << 1)
|
||||
#define FLASH_CR_PG (1 << 0)
|
||||
|
||||
/* --- FLASH_OBR values ---------------------------------------------------- */
|
||||
|
||||
/* FLASH_OBR[25:18]: Data1 */
|
||||
/* FLASH_OBR[17:10]: Data0 */
|
||||
#define FLASH_NRST_STDBY (1 << 4)
|
||||
#define FLASH_NRST_STOP (1 << 3)
|
||||
#define FLASH_WDG_SW (1 << 2)
|
||||
#define FLASH_RDPRT (1 << 1)
|
||||
#define FLASH_OPTERR (1 << 0)
|
||||
#define FLASH_OBR_NRST_STDBY (1 << 4)
|
||||
#define FLASH_OBR_NRST_STOP (1 << 3)
|
||||
#define FLASH_OBR_WDG_SW (1 << 2)
|
||||
#define FLASH_OBR_RDPRT (1 << 1)
|
||||
#define FLASH_OBR_OPTERR (1 << 0)
|
||||
|
||||
/* --- FLASH Keys -----------------------------------------------------------*/
|
||||
|
||||
#define RDP_KEY ((u16)0x00a5)
|
||||
#define FLASH_KEY1 ((u32)0x45670123)
|
||||
#define FLASH_KEY2 ((u32)0xcdef89ab)
|
||||
#define FLASH_RDP_KEY ((u16)0x00a5)
|
||||
#define FLASH_KEYR_KEY1 ((u32)0x45670123)
|
||||
#define FLASH_KEYR_KEY2 ((u32)0xcdef89ab)
|
||||
|
||||
/* --- Function prototypes ------------------------------------------------- */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user