7.3.4 Flash Memory Programming (FDTWrite.c)
(1) WriteInit
The user area is selected, the operating frequency is specified, and the initial setting of the programming library is
performed.
/*
////////////////////////
// WriteInit Function //
////////////////////////
*/
BYTE WriteInit(void)
{
InitPtr WRITE_INIT = (InitPtr)INIT_ADDR;
UserMatSelect();
FKEY = WRITE_ERASE_ENABLE;
return ((*WRITE_INIT)(Frequency));
}
(2) WriteStart
The programming data storage address, programming destination address are specified and the programming library is
called. The programming data and programming destination address are received from the Flash Development Toolkit.
For details, refer to Source Files of the Sample Program.
/*
/////////////////////////
// WriteStart Function //
/////////////////////////
*/
BYTE WriteStart(BYTE *data, DWORD adr)
{
WritePtr WRITE_DATA = (WritePtr)WRITE_ERASE_ADDR;
return ((*WRITE_DATA)((BYTE *)data, (BYTE *)adr));
}
92
Kommentare zu diesen Handbüchern