分类: 嵌入式
2009-10-14 21:28:24
unsigned char env_monitor[16];
char *tmp = getenv ("monitor");
char *end;
unsigned char disp[16];
int i;
for (i=0; i<16; i++) {
env_monitor[i] = tmp ? simple_strtoul(tmp, &end, 10) : 0;
if (tmp)
tmp = (*end) ? end+1 : end;
}
memcpy (disp, env_monitor, 16); //6
monitor=disp[0];//disp[0];