LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
spifi_001.h File Reference
#include "sys_config.h"
#include "cmsis.h"
#include "spifi_rom_api.h"

Go to the source code of this file.

Functions

void cancel_mem_mode (SPIFIobj *obj)
 
int32_t checkAd (SPIFIobj *obj, SPIFIopers *opers)
 
int32_t setProt (SPIFIobj *obj, SPIFIopers *opers, char *change, char *saveProt)
 
int32_t check_block (SPIFIobj *obj, char *source, SPIFIopers *opers, uint32_t check_program)
 
int32_t send_erase_cmd (SPIFIobj *obj, uint8_t op, uint32_t addr)
 
uint32_t ck_erase (SPIFIobj *obj, uint32_t *addr, uint32_t length)
 
int32_t prog_block (SPIFIobj *obj, char *source, SPIFIopers *opers, uint32_t *left_in_page)
 
uint32_t ck_prog (SPIFIobj *obj, char *source, char *dest, uint32_t length)
 
void setSize (SPIFIobj *obj, int32_t value)
 
int32_t setDev (SPIFIobj *obj, uint32_t opts, uint32_t mem_cmd, uint32_t prog_cmd)
 
uint32_t cmd (uc op, uc addrLen, uc intLen, uint16_t len)
 
uint32_t readAd (SPIFIobj *obj, uint32_t cmd, uint32_t addr)
 
void send04 (SPIFIobj *obj, uc op, uc len, uint32_t value)
 
void wren_sendAd (SPIFIobj *obj, uint32_t cmd, uint32_t addr, uint32_t value)
 
int32_t write_stat (SPIFIobj *obj, uc len, uint16_t value)
 
int32_t wait_busy (SPIFIobj *obj, uc prog_or_erase)
 
STATIC INLINE int32_t IP_SPIFI_Init (SPIFIobj *obj, uint32_t csHigh, uint32_t options, uint32_t mhz)
 This call sends the standardized Read JEDEC ID command to the attached serial Flash device. If it responds, it is set up for reading in ARM memory space.
 
STATIC INLINE int32_t IP_SPIFI_Program (SPIFIobj *obj, char *source, SPIFIopers *opers)
 This call programs opers.length bytes in the serial flash. An IP_SPIFI_Program call with source equal to opers.dest and opers.options not including S_FORCE_ERASE can be used to protect or unprotect sectors depending on the value of opers.protect.
 
STATIC INLINE int32_t IP_SPIFI_Erase (SPIFIobj *obj, SPIFIopers *opers)
 This call erases opers.length bytes in the serial flash.
 
STATIC INLINE void IP_SPIFI_CancelMemMode (SPIFIobj *obj)
 : This function disables the memory mapping of the external QSPI flash.
 
STATIC INLINE void IP_SPIFI_SetMemMode (SPIFIobj *obj)
 
STATIC INLINE int32_t IP_SPIFI_checkAd (SPIFIobj *obj, SPIFIopers *opers)
 
STATIC INLINE int32_t IP_SPIFI_setProt (SPIFIobj *obj, SPIFIopers *opers, char *change, char *saveProt)
 
STATIC INLINE int32_t IP_SPIFI_CheckBlock (SPIFIobj *obj, char *source, SPIFIopers *opers, uint32_t check_program)
 
STATIC INLINE int32_t IP_SPIFI_SendEraseCmd (SPIFIobj *obj, uint8_t op, uint32_t addr)
 
STATIC INLINE uint32_t IP_SPIFI_CkErase (SPIFIobj *obj, uint32_t *addr, uint32_t length)
 
STATIC INLINE int32_t IP_SPIFI_ProgBlock (SPIFIobj *obj, char *source, SPIFIopers *opers, uint32_t *left_in_page)
 
STATIC INLINE uint32_t IP_SPIFI_CkProg (SPIFIobj *obj, char *source, char *dest, uint32_t length)
 
STATIC INLINE void IP_SPIFI_SetSize (SPIFIobj *obj, int32_t value)
 
STATIC INLINE int32_t IP_SPIFI_SetDev (SPIFIobj *obj, uint32_t opts, uint32_t mem_cmd, uint32_t prog_cmd)
 
STATIC INLINE uint32_t IP_SPIFI_Cmd (uc op, uc addrLen, uc intLen, uint16_t len)
 
STATIC INLINE uint32_t IP_SPIFI_ReadAd (SPIFIobj *obj, uint32_t cmd, uint32_t addr)
 
STATIC INLINE void IP_SPIFI_Send04 (SPIFIobj *obj, uc op, uc len, uint32_t value)
 
STATIC INLINE void IP_SPIFI_WrEnSendAd (SPIFIobj *obj, uint32_t cmd, uint32_t addr, uint32_t value)
 
STATIC INLINE int32_t IP_SPIFI_WriteStat (SPIFIobj *obj, uc len, uint16_t value)
 
STATIC INLINE int32_t IP_SPIFI_WaitBusy (SPIFIobj *obj, uc prog_or_erase)
 

Variables

void(* set_mem_mode )(SPIFIobj *obj)