From 2d35ca398fb2f6eab04ba2ae4db524f63e15aaf6 Mon Sep 17 00:00:00 2001 From: asterix Date: Mon, 19 May 2008 10:40:11 +0000 Subject: [PATCH] Fix comply to kfile interface. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1276 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/net/xmodem.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bertos/net/xmodem.c b/bertos/net/xmodem.c index d6653a49..d3882483 100644 --- a/bertos/net/xmodem.c +++ b/bertos/net/xmodem.c @@ -30,6 +30,7 @@ * Copyright 1999, 2001 Bernardo Innocenti * * --> + * * \brief X-Modem serial transmission protocol (implementation) * * Supports the CRC-16 and 1K-blocks variants of the standard. @@ -38,6 +39,7 @@ * \todo Break xmodem_send() and xmodem_recv() in smaller functions. * * \version $Id$ + * * \author Bernardo Innocenti * \author Francesco Sacchi */ @@ -100,7 +102,7 @@ bool xmodem_recv(struct KFileSerial *port, KFile *fd) XMODEM_PROGRESS("Starting Transfer...\n"); purge = true; - ser_clearerr(port); + kfile_clearerr(&port->fd); /* Send initial NAK to start transmission */ for(;;) @@ -278,7 +280,7 @@ bool xmodem_recv(struct KFileSerial *port, KFile *fd) break; case XM_EOT: /* End of transmission */ - kfile_putchar(XM_ACK, &port->fd); + kfile_putc(XM_ACK, &port->fd); XMODEM_PROGRESS("Transfer completed\n"); return true; @@ -420,8 +422,8 @@ bool xmodem_send(struct KFileSerial *port, KFile *fd) { crc = UPDCRC16(0, crc); crc = UPDCRC16(0, crc); - ser_putchar(crc >> 8, port); - ser_putchar(crc & 0xFF, port); + kfile_putc(crc >> 8, &port->fd); + kfile_putc(crc & 0xFF, &port->fd); } else kfile_putc(sum, &port->fd); -- 2.25.1