354
Flash register operation special function library
Flashregister operation special
function
flash_copy ( void *dst, void *src,
size_t len );
A function that copies data to a flash register.
DST: the starting address of the target register
copied to;
SRC: source data address;
Len: number of bytes copied;
flash_move ( void *dst, void *src,
size_t len );
the copy bytes of the flash register,if the target area and
the source area overlap, flash_ Move can ensure that the
bytes of the overlapping area are copied to the target area
before the source string is overwritten, but the source
content will be changed after copying. However, when
the target area does not overlap with the source area, it is
same to the function of flash_copy.
DST: the starting address of the target register copied to;
SRC: source data address;
Len: number of bytes copied;
flash_set_int8 ( void* dst, int8 data );
Make some type of assignment to the flash register.
DST: the starting address of the target register;
Data: different types of data;
flash_set_int16 ( void* dst, int16
data );
flash_set_int32 ( void* dst, int32
data );
flash_set_int64 ( void* dst, int64
data );
flash_set_float32( void* dst, float32
data );
flash_set_float64( void* dst, float64
data );
Take the copy data and assignment of flash register as an example to illustrate the use of
functions in the function table:
Example 1: Copy data to Flash register FD100
flash_copy ( void *dst, void *src, size_t len );
The Void in the flash_copy function represents the parameter type. In actual use, there is no
need to write void. See line 13 in the following example:
tudonghoatoancau.com