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

📄 command.h

📁 arm7,44b0芯片的blob程序,适用于学嵌入式linux的新手.
💻 H
字号:
/*------------------------------------------------------------------------- * Filename:      command.h * Version:       $Id: command.h,v 1.2 2001/10/07 15:27:35 erikm Exp $ * Copyright:     Copyright (C) 1999, Erik Mouw * Author:        Erik Mouw <J.A.K.Mouw@its.tudelft.nl> * Description:   Header file for command.c * Created at:    Sun Aug 29 17:23:33 1999 * Modified by:   Erik Mouw <J.A.K.Mouw@its.tudelft.nl> * Modified at:   Tue Sep 28 23:38:04 1999 *-----------------------------------------------------------------------*//* * command.c: Command line functions for blob * * Copyright (C) 1999  Erik Mouw (J.A.K.Mouw@its.tudelft.nl) * * 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: command.h,v 1.2 2001/10/07 15:27:35 erikm Exp $"#ifndef BLOB_COMMAND_H#define BLOB_COMMAND_H#include <blob/types.h>#define COMMAND_MAGIC (0x436d6420)	/* "Cmd " */typedef int(*commandfunc_t)(int, char *[]);typedef struct commandlist {	u32 magic;	char *name;	char *help;	commandfunc_t callback;	struct commandlist *next;} commandlist_t;#define __command __attribute__((unused, __section__(".commandlist")))#define __commandlist(fn, nm, hlp) \static commandlist_t __command_##fn __command = { \	magic:    COMMAND_MAGIC, \	name:     nm, \	help:     hlp, \	callback: fn }			 extern commandlist_t *commands;int parse_command(char *cmdline);#define MAX_COMMANDLINE_LENGTH (128)#define MAX_ARGS (MAX_COMMANDLINE_LENGTH / 4)void DisplayPrompt(char *prompt);int GetCommand(char *command, int len, int timeout);#endif

⌨️ 快捷键说明

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