static int crcflag; /* Sez we are using CRC's instead of cksums */
static int
-readchar (serial_t desc, int timeout)
+readchar (struct serial *desc, int timeout)
{
int c;
- c = SERIAL_READCHAR (desc, timeout);
+ c = serial_readchar (desc, timeout);
if (remote_debug > 0)
fputc_unfiltered (c, gdb_stdlog);
send NAK or CRC request. */
int
-xmodem_init_xfer (serial_t desc)
+xmodem_init_xfer (struct serial *desc)
{
int c;
int i;
*/
void
-xmodem_send_packet (serial_t desc, unsigned char *packet, int len, int hashmark)
+xmodem_send_packet (struct serial *desc, unsigned char *packet, int len, int hashmark)
{
int i;
int retries;
{
int c;
- SERIAL_WRITE (desc, packet, pktlen);
+ serial_write (desc, packet, pktlen);
c = readchar (desc, 3);
switch (c)
}
}
- SERIAL_WRITE (desc, "\004", 1); /* Send an EOT */
+ serial_write (desc, "\004", 1); /* Send an EOT */
error ("xmodem_send_packet: Excessive retries.");
}
/* Finish off the transfer. Send out the EOT, and wait for an ACK. */
void
-xmodem_finish_xfer (serial_t desc)
+xmodem_finish_xfer (struct serial *desc)
{
int retries;
{
int c;
- SERIAL_WRITE (desc, "\004", 1); /* Send an EOT */
+ serial_write (desc, "\004", 1); /* Send an EOT */
c = readchar (desc, 3);
switch (c)