⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xmodem.c

📁 長高44b0xi BIOS源碼 FS44B0II BIOS具有啟動、引導
💻 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;			//

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -