mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-23 02:36:16 +02:00
add some define
This commit is contained in:
parent
6e4e15eb31
commit
60daa40873
@ -27,8 +27,10 @@
|
||||
#include "cmd.h"
|
||||
#include "config.h"
|
||||
|
||||
#define MAX_ARGC 10
|
||||
#define MAX_ARGV_LENGTH 100
|
||||
static int com_argc;
|
||||
static char com_argv[9][100];
|
||||
static char com_argv[MAX_ARGC][MAX_ARGV_LENGTH];
|
||||
|
||||
static const char COMMAND[][30]=
|
||||
{
|
||||
@ -132,7 +134,7 @@ int command_interpret(char * com_buf)
|
||||
while ( *(++buf) == ' ' );
|
||||
com_argv[i][j] = '\0';
|
||||
i++;
|
||||
if (i > 9) {
|
||||
if (i > MAX_ARGC) {
|
||||
printf("\n Para is too much! About!");
|
||||
return 0;
|
||||
}
|
||||
@ -141,7 +143,7 @@ int command_interpret(char * com_buf)
|
||||
} else {
|
||||
com_argv[i][j] = *buf;
|
||||
j++;
|
||||
if (j > 100) {
|
||||
if (j > MAX_ARGV_LENGTH) {
|
||||
printf("\n Para is too long! About!");
|
||||
return 0;
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ struct hand_t {
|
||||
struct fw_args_t fw_args;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct nand_in {
|
||||
struct nand_in_t {
|
||||
unsigned char dev;
|
||||
unsigned char max_chip;
|
||||
unsigned char *buf;
|
||||
@ -158,11 +158,11 @@ struct nand_in {
|
||||
int (* check) (unsigned char *,unsigned char *,unsigned int);
|
||||
};
|
||||
|
||||
struct nand_out {
|
||||
struct nand_out_t {
|
||||
unsigned char *status;
|
||||
};
|
||||
|
||||
struct sdram_in {
|
||||
struct sdram_in_t {
|
||||
unsigned char dev;
|
||||
unsigned char *buf;
|
||||
unsigned int start;
|
||||
|
Loading…
Reference in New Issue
Block a user