Main Page | Modules | Namespace List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

flash.c File Reference

#include <environment.h>
#include "flash.h"

Functions

unsigned short Flash_EraseSector (unsigned long startAddress, unsigned long sectorAddress)
unsigned short Flash_EraseChip (void)
unsigned short Flash_ProgramWord (unsigned long startAddress, unsigned long wordAddress, unsigned short data)
void Flash_ReadIdentifier (unsigned short *cDevCode, unsigned short *cManuCode)
unsigned short Flash_Unlock (void)
unsigned short Flash_Lock (unsigned long pa_nSectorAddr)
unsigned short Flash_Reset (void)
unsigned short Flash_ReadWord (unsigned long pa_nOffset)
int Flash_GetSectorNumber (unsigned long ulOffset)
bool Flash_CheckIfEmpty (unsigned long pa_nStartAddress)

Function Documentation

bool Flash_CheckIfEmpty unsigned long  pa_nStartAddress  ) 
 

Parameters:
pa_nStartAddress start address of the check
Returns:
true if empty, otherwise false

unsigned short Flash_EraseChip void   ) 
 

Returns:
content of the flash status register (on success 0x0080 for Intel Strata Compatible Devices)
erases the entire flash

unsigned short Flash_EraseSector unsigned long  startAddress,
unsigned long  sectorAddress
 

Parameters:
startAddress start address of the flash device
sectorAddress address of the sector to be erased
Returns:
content of the flash status register (on success 0x0080 for Intel Strata Compatible Devices)
erases the specified sector

int Flash_GetSectorNumber unsigned long  ulOffset  ) 
 

Parameters:
ulOffset address offset
Returns:
sector number containing the address offset
calculates a sector number for a given address offset

unsigned short Flash_Lock unsigned long  pa_nSectorAddr  ) 
 

Parameters:
pa_nSectorAddr sector address to be locked
Returns:
content of the flash status register (on success 0x0080 for Intel Strata Compatible Devices)
locks a specified sector of the flash

unsigned short Flash_ProgramWord unsigned long  startAddress,
unsigned long  wordAddress,
unsigned short  data
 

Parameters:
startAddress start address of the flash device
wordAddress address of the word to be programmed
data value to be written
Returns:
content of the flash status register (on success 0x0080 for Intel Strata Compatible Devices)
programms a word at the specified address

void Flash_ReadIdentifier unsigned short *  cDevCode,
unsigned short *  cManuCode
 

Parameters:
cDevCode holds the device code after the function call
cManuCode holds the manufacturer code after the function call
reads flash device and manufacturer codes

unsigned short Flash_ReadWord unsigned long  pa_nOffset  ) 
 

Parameters:
pa_nOffset address offset to be read
Returns:
content of the flash status register (on success 0x0080 for Intel Strata Compatible Devices)
reads a word from the specified address

unsigned short Flash_Reset void   ) 
 

Returns:
content of the flash status register (on success 0x0080 for Intel Strata Compatible Devices)
resets the flash's state machine to default values

unsigned short Flash_Unlock void   ) 
 


Generated on Thu Mar 2 16:11:30 2006 for VDK Blacksheep by  doxygen 1.4.1