/* * error number for finsh shell. * * copyright (C) 2013, shanghai real-thread technology co., ltd * * this file is part of RT-Thread (http://www.rt-thread.org) * Maintainer: bernard.xiong <bernard.xiong at gmail.com> * * all rights reserved. * * 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., * 51 franklin street, fifth floor, boston, ma 02110-1301 USA. * * Change Logs: * Date author notes * 2010-03-22 bernard first version */#ifndef __finsh_error_h__#define __finsh_error_h__ #include <finsh.h> //the macro definition int finsh_error_init (void) of the error code type is referenced here; //Error code Global_errno = finsh_error_ok;/* get error number */u_char finsh _errno (void); //get error code global_errnoint finsh_error_set (u_char type); //set error code type, Define Const char* finsh_error_string (U_char type) in finsh.h, //find the corresponding string by the error code type #endif
This article is from the "mountain Ask the Boy" blog, please be sure to keep this source http://linpeng.blog.51cto.com/9779987/1685377
Rt-thread finsh Source Analysis: Finsh_error.h