Daiki Kato / FlashAccess
Embed: (wiki syntax)

« Back to documentation index

FlashAccess Class Reference

FlashAccess Class Reference

FlashAccess class Flash access library for GR-Boards. More...

#include <FlashAccess.h>

Public Member Functions

 FlashAccess ()
 Constructor.
bool SectorErase (uint32_t addr) _RAM_PRG
 Sector Erase.
bool PageProgram (uint32_t addr, uint8_t *buf, int32_t size) _RAM_PRG
 Page Program.
bool Read (uint32_t addr, uint8_t *buf, int32_t size) _RAM_PRG
 Read.

Protected Member Functions

bool _SectorErase (uint32_t addr) _RAM_PRG
 protected

Detailed Description

FlashAccess class Flash access library for GR-Boards.

Definition at line 38 of file FlashAccess.h.


Constructor & Destructor Documentation

FlashAccess (  )

Constructor.

public

Definition at line 48 of file FlashAccess.cpp.


Member Function Documentation

bool _SectorErase ( uint32_t  addr ) [protected]

protected

Definition at line 101 of file FlashAccess.cpp.

bool PageProgram ( uint32_t  addr,
uint8_t *  buf,
int32_t  size 
)

Page Program.

The Page Program instruction allows from one byte to 256 bytes (a page) of data to be programmed at previously erased (FFh) memory locations.

Parameters:
addrstarting address
bufthe buffer to read into
sizesize of the data
Returns:
true = success, false = failure

Definition at line 67 of file FlashAccess.cpp.

bool Read ( uint32_t  addr,
uint8_t *  buf,
int32_t  size 
)

Read.

The Read Data instruction allows one or more data bytes to be sequentially read from the memory.

Parameters:
addrstarting address
bufthe buffer to write from
sizesize of the data
Returns:
true = success, false = failure

Definition at line 83 of file FlashAccess.cpp.

bool SectorErase ( uint32_t  addr )

Sector Erase.

The Sector Erase instruction sets all memory within a specified sector (4K-bytes) to the erased state of all 1s (FFh).

Parameters:
addrsector address
Returns:
true = success, false = failure

Definition at line 51 of file FlashAccess.cpp.