xmodem.h File Reference

X-Modem serial transmission protocol. More...

#include <cfg/compiler.h>
#include <kern/kfile.h>

Go to the source code of this file.



#define XMODEM_CHECK_ABORT   (false)
 Called to know if we want to abort data tranfer.
#define XMODEM_PROGRESS(msg,...)   kprintf(msg, ## __VA_ARGS__)
 Called to printf progress messages.
bool xmodem_recv (KFile *ch, KFile *fd)
 Receive a file using the XModem protocol.
bool xmodem_send (KFile *ch, KFile *fd)
 Transmit some data using the XModem protocol.

Detailed Description

X-Modem serial transmission protocol.

Version:
Id
xmodem.h 2933 2009-09-14 10:44:12Z asterix
Author:
Bernie Innocenti <bernie@codewiz.org>
Francesco Sacchi <batt@develer.com>

Definition in file xmodem.h.


Define Documentation

#define XMODEM_CHECK_ABORT   (false)

Called to know if we want to abort data tranfer.

Redefine to whatever you need.

Definition at line 57 of file xmodem.h.

#define XMODEM_PROGRESS ( msg,
...   )     kprintf(msg, ## __VA_ARGS__)

Called to printf progress messages.

Default to kprintf debug, redefine to whatever you need.

Definition at line 68 of file xmodem.h.


Function Documentation

bool xmodem_recv ( KFile ch,
KFile fd 
)

Receive a file using the XModem protocol.

Parameters:
ch Channel to use for transfer
fd Destination file
Note:
This function allocates a large amount of stack (
See also:
XM_BUFSIZE).

Definition at line 86 of file xmodem.c.

bool xmodem_send ( KFile ch,
KFile fd 
)

Transmit some data using the XModem protocol.

Parameters:
ch Channel to use for transfer
fd Source file
Note:
This function allocates a large amount of stack for the XModem transfer buffer (
See also:
XM_BUFSIZE).

Definition at line 306 of file xmodem.c.