?? xmodem.c
字號:
/*------------------------------------------------------------------------- * Filename: xmodem.c * Version: $Id: xmodem.c,v 1.2 2002/01/06 19:02:29 erikm Exp $ * Copyright: Copyright (C) 2001, Hewlett-Packard Company * Author: Christopher Hoover <ch@hpl.hp.com> * Description: xmodem functionality for uploading of kernels * and the like * Created at: Thu Dec 20 01:58:08 PST 2001 *-----------------------------------------------------------------------*//* * xmodem.c: xmodem functionality for uploading of kernels and * the like * * Copyright (C) 2001 Hewlett-Packard Laboratories * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */#ident "$Id: xmodem.c,v 1.2 2002/01/06 19:02:29 erikm Exp $"//#ifdef HAVE_CONFIG_H//# include <blob/config.h>//#endif//#include <blob/errno.h>//#include <blob/serial.h>//#include <blob/util.h>#include <../inc/board.h>#define UART_RD_TMOUT 300000#define TIMEOUT 800#define MAXERRORS 10//5#define serial_write_raw(cc) putch(cc)static int SerialInputBlock(char *buf, unsigned long count, unsigned long timeout){/* unsigned long i; do { i = 0; while(!SerialRxToBuf(buf) && (i++ < UART_RD_TMOUT)); if(i < UART_RD_TMOUT) return 1; //
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -