Dallas Semiconductor DS80C400 C Libraries Home Page

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

rom400_flash.h File Reference


Detailed Description

Flash programming functions for the TINIm400 module.

This library contains functions that allow applications to access the ROM's flash erasing and programming algorithms. Any flash that is compatible with the DS80C400 boot loader's functions will be compatible with this library.

For detailed information on the DS80C400 please see the High-Speed Microcontroller User's Guide: DS80C400 Supplement.

The functions in this library are multi-process safe--that is, if you call the same method from two different processes at the same time, the parameters to the function will not be destroyed. However, multiple processes should not be performing flash altering operations without some kind of synchronization control.

Go to the source code of this file.

Defines

#define ROM400_FLASH_VERSION   2

Functions

unsigned char flash_eraseblock (unsigned char blocknum)
 Erase a flash block.
unsigned char flash_programbyte (void *location, unsigned char b)
 Program a byte of flash.
unsigned int flash_version (void)
 Returns the version number of this flash library.


Define Documentation

#define ROM400_FLASH_VERSION   2
 

Version number associated with this header file. Should be the same as the version number returned by the flash_version function.

See also:
flash_version


Function Documentation

unsigned char flash_eraseblock unsigned char  blocknum  ) 
 

Erase a flash block.

Erases the block of flash that begins at address blocknum:00:00. This operation checks to see if the block is RAM or is the ROM (blocknum equals FF), in which case the operation fails.

Parameters:
blocknum bank/block number of flash to erase
Returns:
0 if the erase was successful, 1 if the erase could not be performed.

unsigned char flash_programbyte void *  location,
unsigned char  b
 

Program a byte of flash.

Programs the byte b to the address location. If the location is unprogrammable (too many zero bits have already been set) the operation fails.

Parameters:
location The address to write the value b to
b The value to be programmed
Returns:
0 if the program is successful, 1 if the operation could not be performed.

unsigned int flash_version void   ) 
 

Returns the version number of this flash library.

Returns:
Version number of this flash library.


Copyright 2005 Dallas Semiconductor, Inc.. Documentation generated by Doxygen.