URL
https://opencores.org/ocsvn/qaz_libs/qaz_libs/trunk
Subversion Repositories qaz_libs
[/] [qaz_libs/] [trunk/] [cli/] [util/] [uboot_lib.h] - Rev 30
Go to most recent revision | Compare with Previous | Blame | View Log
////////////////////////////////////////////////////////////////////// //// //// //// Copyright (C) 2015 Authors and OPENCORES.ORG //// //// //// //// This source file may be used and distributed without //// //// restriction provided that this copyright statement is not //// //// removed from the file and that any derivative work contains //// //// the original copyright notice and the associated disclaimer. //// //// //// //// This source file is free software; you can redistribute it //// //// and/or modify it under the terms of the GNU Lesser General //// //// Public License as published by the Free Software Foundation; //// //// either version 2.1 of the License, or (at your option) any //// //// later version. //// //// //// //// This source 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 Lesser General Public License for more //// //// details. //// //// //// //// You should have received a copy of the GNU Lesser General //// //// Public License along with this source; if not, download it //// //// from http://www.opencores.org/lgpl.shtml //// //// //// ////////////////////////////////////////////////////////////////////// #ifndef _UBOOT_LIB_H_ #define _UBOOT_LIB_H_ #include <stdint.h> #include <inttypes.h> #include "types.h" #include <string.h> #include <stdlib.h> #include <stdio.h> #include <ctype.h> #include "xil_printf.h" #undef CONFIG_ARCH_MAP_SYSMEM #include "mapmem.h" #include "sys_cmd.h" /* * Error codes that commands return to cmd_process(). We use the standard 0 * and 1 for success and failure, but add one more case - failure with a * request to call cmd_usage(). But the cmd_process() function handles * CMD_RET_USAGE itself and after calling cmd_usage() it will return 1. * This is just a convenience for commands to avoid them having to call * cmd_usage() all over the place. */ enum command_ret_t { CMD_RET_SUCCESS, /* 0 = Success */ CMD_RET_FAILURE, /* 1 = Failure */ CMD_RET_USAGE = -1, /* Failure, please report 'usage' error */ }; typedef int cmd_tbl_t; /* sysv */ typedef unsigned char unchar; typedef unsigned short ushort; typedef unsigned int uint; typedef unsigned long ulong; /* * Command Flags: */ #define CMD_FLAG_REPEAT 0x0001 /* repeat last command */ #define CMD_FLAG_BOOTD 0x0002 /* command is from bootd */ #define CMD_FLAG_ENV 0x0004 /* command is from the environment */ #define __maybe_unused __attribute__((unused)) /*-----------------------------------------------------------*/ #undef CONFIG_SYS_SUPPORT_64BIT_DATA /*-----------------------------------------------------------*/ extern int cmd_get_data_size(const char * arg, int default_size); extern unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base); extern int print_buffer(ulong addr, const void *data, uint width, uint count, uint linelen); #endif // _UBOOT_LIB_H_
Go to most recent revision | Compare with Previous | Blame | View Log