Skip to content

Commit

Permalink
Support Xmodem-1K for transmit.
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinlawson committed Feb 26, 2014
1 parent d3db051 commit c063ffa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xmodem.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

#define DLY_1S 1000
#define MAXRETRANS 25
#define TRANSMIT_XMODEM_1K

static int check(int crc, const unsigned char *buf, int sz)
{
Expand Down Expand Up @@ -195,7 +196,11 @@ int xmodemTransmit(unsigned char *src, int srcsz)

for(;;) {
start_trans:
#ifdef TRANSMIT_XMODEM_1K
xbuff[0] = STX; bufsz = 1024;
#else
xbuff[0] = SOH; bufsz = 128;
#endif
xbuff[1] = packetno;
xbuff[2] = ~packetno;
c = srcsz - len;
Expand Down

0 comments on commit c063ffa

Please sign in to comment.