User manual

Tutorial: Handel-C code optimization
macro proc FlashWriteWord (FlashPtr, Address, Data)
{
par
{
FlashPtr->APICommand ! FlashAPICommandWriteWord;
FlashPtr->APIAddress = Address;
FlashPtr->APIData = Data;
}
}
macro proc FlashEraseBlock (FlashPtr, BlockNumber)
{
par
{
FlashPtr->APICommand ! FlashAPICommandEraseBlock;
FlashPtr->APIBlockNumber = BlockNumber;
}
}
When the flash device driver is used, the application programmer must:
Declare a variable of type
(Flash *)
Call
FlashInit() with appropriate parameters to build interfaces to the correct pins and
to create and initialize a
Flash structure.
Run the
FlashRun() server process in parallel with the application
Alternatively, the calls can be put inside a PSL that is configured for a specific platform.
www.celoxica.com
Page 86