LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CHIP: LPC17xx/40xx EEPROM Driver

Detailed Description

Typedefs

typedef IP_EEPROM_RWSIZE_T EEPROM_RWSIZE_T
 

Functions

void Chip_EEPROM_Init (LPC_EEPROM_T *pEEPROM)
 Initializes EEPROM.
 
STATIC INLINE void Chip_EEPROM_DeInit (LPC_EEPROM_T *pEEPROM)
 De-initializes EEPROM.
 
STATIC INLINE void Chip_EEPROM_SetWaitState (LPC_EEPROM_T *pEEPROM, uint32_t ws)
 Set EEPROM wait state.
 
STATIC INLINE Status Chip_EEPROM_Write (LPC_EEPROM_T *pEEPROM, uint16_t pageOffset, uint16_t pageAddress, void *pData, EEPROM_RWSIZE_T wsize, uint32_t byteNum)
 Write data to EEPROM at specific address.
 
STATIC INLINE void Chip_EEPROM_Read (LPC_EEPROM_T *pEEPROM, uint16_t pageOffset, uint16_t pageAddress, void *pData, EEPROM_RWSIZE_T rsize, uint32_t byteNum)
 Read data to EEPROM at specific address.
 
STATIC INLINE void Chip_EEPROM_Erase (LPC_EEPROM_T *pEEPROM, uint16_t address)
 Erase a page at the specific address.
 
STATIC INLINE void Chip_EEPROM_EnablePowerDown (LPC_EEPROM_T *pEEPROM)
 Put EEPROM device in power down mode.
 
STATIC INLINE void Chip_EEPROM_DisablePowerDown (LPC_EEPROM_T *pEEPROM)
 Bring EEPROM device out of power down mode.
 
STATIC INLINE void Chip_EEPROM_EnableInt (LPC_EEPROM_T *pEEPROM, uint32_t mask)
 Enable EEPROM interrupt.
 
STATIC INLINE void Chip_EEPROM_DisableInt (LPC_EEPROM_T *pEEPROM, uint32_t mask)
 Disable EEPROM interrupt.
 
STATIC INLINE uint32_t Chip_EEPROM_GetIntEnable (LPC_EEPROM_T *pEEPROM)
 Get the value of the EEPROM interrupt enable register.
 
STATIC INLINE uint32_t Chip_EEPROM_GetIntStatus (LPC_EEPROM_T *pEEPROM)
 Get EEPROM interrupt status.
 
STATIC INLINE void Chip_EEPROM_SetIntStatus (LPC_EEPROM_T *pEEPROM, uint32_t mask)
 Set EEPROM interrupt status.
 
STATIC INLINE void Chip_EEPROM_ClearIntStatus (LPC_EEPROM_T *pEEPROM, uint32_t mask)
 Clear EEPROM interrupt status.
 

Typedef Documentation

Definition at line 45 of file eeprom_17xx_40xx.h.

Function Documentation

STATIC INLINE void Chip_EEPROM_ClearIntStatus ( LPC_EEPROM_T pEEPROM,
uint32_t  mask 
)

Clear EEPROM interrupt status.

Parameters
pEEPROM: pointer to EEPROM peripheral block
mask: interrupt mask (or-ed bits value of EEPROM_INT_*)
Returns
Nothing

Definition at line 211 of file eeprom_17xx_40xx.h.

STATIC INLINE void Chip_EEPROM_DeInit ( LPC_EEPROM_T pEEPROM)

De-initializes EEPROM.

Parameters
pEEPROM: The base of EEPROM peripheral on the chip
Returns
Nothing

Definition at line 59 of file eeprom_17xx_40xx.h.

STATIC INLINE void Chip_EEPROM_DisableInt ( LPC_EEPROM_T pEEPROM,
uint32_t  mask 
)

Disable EEPROM interrupt.

Parameters
pEEPROM: pointer to EEPROM peripheral block
mask: interrupt mask (or-ed bits value of EEPROM_INT_*)
Returns
Nothing

Definition at line 169 of file eeprom_17xx_40xx.h.

STATIC INLINE void Chip_EEPROM_DisablePowerDown ( LPC_EEPROM_T pEEPROM)

Bring EEPROM device out of power down mode.

Parameters
pEEPROM: The base of EEPROM peripheral on the chip
Returns
Nothing

Definition at line 147 of file eeprom_17xx_40xx.h.

STATIC INLINE void Chip_EEPROM_EnableInt ( LPC_EEPROM_T pEEPROM,
uint32_t  mask 
)

Enable EEPROM interrupt.

Parameters
pEEPROM: pointer to EEPROM peripheral block
mask: interrupt mask (or-ed bits value of EEPROM_INT_*)
Returns
Nothing

Definition at line 158 of file eeprom_17xx_40xx.h.

STATIC INLINE void Chip_EEPROM_EnablePowerDown ( LPC_EEPROM_T pEEPROM)

Put EEPROM device in power down mode.

Parameters
pEEPROM: The base of EEPROM peripheral on the chip
Returns
Nothing

Definition at line 137 of file eeprom_17xx_40xx.h.

STATIC INLINE void Chip_EEPROM_Erase ( LPC_EEPROM_T pEEPROM,
uint16_t  address 
)

Erase a page at the specific address.

Parameters
pEEPROM: The base of EEPROM peripheral on the chip
address: EEPROM page address (0-62)
Returns
Nothing

Definition at line 127 of file eeprom_17xx_40xx.h.

STATIC INLINE uint32_t Chip_EEPROM_GetIntEnable ( LPC_EEPROM_T pEEPROM)

Get the value of the EEPROM interrupt enable register.

Parameters
pEEPROM: pointer to EEPROM peripheral block
Returns
Or-ed bits value of EEPROM_INT_*

Definition at line 179 of file eeprom_17xx_40xx.h.

STATIC INLINE uint32_t Chip_EEPROM_GetIntStatus ( LPC_EEPROM_T pEEPROM)

Get EEPROM interrupt status.

Parameters
pEEPROM: pointer to EEPROM peripheral block
Returns
Or-ed bits value of EEPROM_INT_*

Definition at line 189 of file eeprom_17xx_40xx.h.

void Chip_EEPROM_Init ( LPC_EEPROM_T pEEPROM)

Initializes EEPROM.

Parameters
pEEPROM: The base of EEPROM peripheral on the chip
Returns
Nothing

Definition at line 53 of file eeprom_17xx_40xx.c.

STATIC INLINE void Chip_EEPROM_Read ( LPC_EEPROM_T pEEPROM,
uint16_t  pageOffset,
uint16_t  pageAddress,
void *  pData,
EEPROM_RWSIZE_T  rsize,
uint32_t  byteNum 
)

Read data to EEPROM at specific address.

Parameters
pEEPROM: The base of EEPROM peripheral on the chip
pageOffset: offset of data in page register(0 - 63)
pageAddress,:page address (0-62)
pData: buffer that contain data read from read data register
rsize: Read size:
  • EEPROM_RWSIZE_8BITS : 8-bit read/write mode
  • EEPROM_RWSIZE_16BITS : 16-bit read/write mode
  • EEPROM_RWSIZE_32BITS : 32-bit read/write mode
byteNum: number read data (bytes)
Returns
Nothing

Definition at line 112 of file eeprom_17xx_40xx.h.

STATIC INLINE void Chip_EEPROM_SetIntStatus ( LPC_EEPROM_T pEEPROM,
uint32_t  mask 
)

Set EEPROM interrupt status.

Parameters
pEEPROM: pointer to EEPROM peripheral block
mask: interrupt mask (or-ed bits value of EEPROM_INT_*)
Returns
Nothing

Definition at line 200 of file eeprom_17xx_40xx.h.

STATIC INLINE void Chip_EEPROM_SetWaitState ( LPC_EEPROM_T pEEPROM,
uint32_t  ws 
)

Set EEPROM wait state.

Parameters
pEEPROM: pointer to EEPROM peripheral block
ws: Wait State value.
Returns
Nothing

Definition at line 70 of file eeprom_17xx_40xx.h.

STATIC INLINE Status Chip_EEPROM_Write ( LPC_EEPROM_T pEEPROM,
uint16_t  pageOffset,
uint16_t  pageAddress,
void *  pData,
EEPROM_RWSIZE_T  wsize,
uint32_t  byteNum 
)

Write data to EEPROM at specific address.

Parameters
pEEPROM: The base of EEPROM peripheral on the chip
pageOffset: offset of data in page register(0 - 63)
pageAddress,:page address (0-62)
pData: buffer that contain data that will be written to buffer
wsize: Write size:
  • EEPROM_RWSIZE_8BITS : 8-bit read/write mode
  • EEPROM_RWSIZE_16BITS : 16-bit read/write mode
  • EEPROM_RWSIZE_32BITS : 32-bit read/write mode
byteNum: number written data (bytes)
Returns
SUCCESS on successful write of data, or ERROR
Note
This function actually write data into EEPROM memory and automatically write into next page if current page is overflowed

Definition at line 90 of file eeprom_17xx_40xx.h.