
SDK Programming Guide Version 1.511
ABLELink
R
Ethernet-Serial Server MAXI Series
Example:
Write 0x55 at address A000:1234.
ushort ret
;
uchar *addr;
addr = (uchar *) 0xA0001234 ;
// the segment value of addr must be within 64k boundary,
// it means that the legal segment value is 0x8000
、
0x9000....
// or 0xD000
。
ret = ProgOneByte( 0x55, addr ) ;
if ( ret ) {
// fatal error found !!!
:
}
else {
// OK !!!
:
}
Remarks:
This function is used to write one byte
data
into the flash memory pointed
by
addr
.
ProgString()
Description:
Write a string of data into flash memory.
Include:
DAPAPI.H
Usage:
ushort ProgString ( ushort
len,
uchar *
src,
uchar *
dest
)
len
byte count of data
src
source data address
Input Parameters:
dest
address of flash memory.
Note:
1.
The segment value of the address must be 64k boundary
,
it means that the legal segment value is 0x8000
、
0x9000....or
0xD000. For GW21x-MAXI, only 0xC000 and 0xD000 are
available. For example: the address D000:F000 is correct
but DF00:0 is error.
2. All addresses in flash memory can be written only one
times. If you want to write the second times, you must call
EraseSector()
function to erase the sector:64K and then write
the data.
Copyright © 2004 Atop Technologies, Inc.
All rights reserved. Designed in Taiwan.