#ifndef BSW_FLASH_H #define BSW_FLASH_H #ifdef __cplusplus extern "C" { #endif #include /*============================================================================== ======= INCLUDES ======= ==============================================================================*/ /*============================================================================== ======= DEFINES & MACROS FOR GENERAL PURPOSE ======= ==============================================================================*/ typedef enum { CY_FLASH_IN_BOUNDS, CY_FLASH_OUT_OF_BOUNDS, } en_flash_bounds_t; #define NULL ((void *)0) /*============================================================================== ======= CONSTANTS & TYPES ======= ==============================================================================*/ extern void Bsw_flashPageProgInit(void); extern uint8_t FlsPgm_DiagRequestDownload(uint32_t Address, uint32_t Length); extern uint8_t FlsPgm_DiagMemoryErase(uint32_t Address, uint32_t Length, void (* Callback)(uint8_t)); extern uint8_t FlsPgm_DiagTransferData(uint32_t pktLength, uint8_t * pData, void(*pcallback)(uint8_t)); extern void FlsPgm_DiagTransferExit( void(*pcallback)(uint8_t)); en_flash_bounds_t Zhixin_Flash_MainBoundsCheck(uint32_t address, uint32_t Length); /*flash related task polling function*/ extern void FlsPgm_EraseStateMachinePolling(void); extern void FlashPageProgStatePolling(void); #ifdef __cplusplus } #endif #endif