User`s manual
BL160048 s System Development
XMODEM Commands
int Dxmodem
_
z0down( char *buffer, int count )
Sends (downloads) count 128-byte blocks in buffer using XMODEM
protocol.
RETURN VALUE:
0timed out (no transfer).
1successful transfer.
2canceled transfer (canceled by receiver side).
int Dxmodem_z0up ( unsigned long address,
int *pages, int dest, int(*parser)() )
Receives (uploads) a file using XMODEM protocol.
PARAMETERS: address is the physical address in RAM where the
received data are to be stored. If the receive buffer is allocated by
xdata (a Dynamic C keyword to allocate extended memory data), then
the name of the array may be used for the address argument. If,
however, the data area is allocated using normal C, the logical
address of the buffer must first be converted to a physical address using
the library function phy_adr.
pages is the number of 4K blocks of data that have been transferred.
dest If an RS-485 master-slave network is set up, specify dest = 0
when the upload is intended for the master. If dest is non-zero, the
upload is intended for the designated slave.
parser is the function that handles parsing of the uploaded data.
RETURN VALUE:
0timed out (no transfer).
1successful transfer.
2canceled transfer (canceled by sender side).
int z0modemset()
Returns information about modem selection.
RETURN VALUE: 1 if the modem option is selected (with Dinit
_
z0),
and 0 if not.
int z0modemstat()
Returns the status of the modem.
RETURN VALUE: 1 if the modem is in command mode, and 0 if it is
in data mode.