41#ifndef LIBOPENCM3_FLASH_H
42#define LIBOPENCM3_FLASH_H
55#define FLASH_OPTION_BYTE_0 FLASH_OPTION_BYTE(0)
56#define FLASH_OPTION_BYTE_1 FLASH_OPTION_BYTE(1)
57#define FLASH_OPTION_BYTE_2 FLASH_OPTION_BYTE(2)
58#define FLASH_OPTION_BYTE_3 FLASH_OPTION_BYTE(3)
59#define FLASH_OPTION_BYTE_4 FLASH_OPTION_BYTE(4)
60#define FLASH_OPTION_BYTE_5 FLASH_OPTION_BYTE(5)
61#define FLASH_OPTION_BYTE_6 FLASH_OPTION_BYTE(6)
62#define FLASH_OPTION_BYTE_7 FLASH_OPTION_BYTE(7)
74#define FLASH_ACR_LATENCY_0WS 0x00
75#define FLASH_ACR_LATENCY_1WS 0x01
76#define FLASH_ACR_LATENCY_2WS 0x02
78#define FLASH_ACR_HLFCYA (1 << 3)
82#define FLASH_SR_EOP (1 << 5)
83#define FLASH_SR_WRPRTERR (1 << 4)
84#define FLASH_SR_PGERR (1 << 2)
85#define FLASH_SR_BSY (1 << 0)
93#define FLASH_OBR_NRST_STDBY (1 << 4)
94#define FLASH_OBR_NRST_STOP (1 << 3)
95#define FLASH_OBR_WDG_SW (1 << 2)
96#define FLASH_OBR_RDPRT_EN (1 << FLASH_OBR_RDPRT_SHIFT)
103#define FLASH_RDP_KEY ((uint16_t)0x00a5)
void flash_clear_wrprterr_flag_upper(void)
Clear the Write Protect Error Status Flag, upper Bank.
void flash_lock_upper(void)
Lock the Flash Program and Erase Controller, upper Bank.
void flash_clear_pgerr_flag_upper(void)
Clear the Programming Error Status Flag, upper Bank.
void flash_halfcycle_disable(void)
Disable the FLASH Half Cycle Mode.
void flash_unlock_upper(void)
Unlock the Flash Program and Erase Controller, upper Bank.
void flash_halfcycle_enable(void)
Enable the FLASH Half Cycle Mode.
void flash_clear_eop_flag_upper(void)
Clear the End of Operation Status Flag, upper Bank.