Beispiel #1
0
int main(int argc,char **argv){
  setlocale(LC_ALL,"");

  int section;
  int opt;

  while((opt=getopt(argc,argv,"d:t:")) != -1){
    switch(opt){
    case 'd':
      section=hexstr2i(optarg);
      if(section>=0){
	show_section(section);
      } else {
	wprintf(L"wrong number, must in range 0x00 ~ 0xff\n");
      }
      return 0;
    case 't':
      decode_and_print(optarg);
      return 0;
    }
  }

  for(int i=0;i<256;i++){
	show_section(i);
  }
}
Beispiel #2
0
int main()
{
    init_platform();
    init_gpio();
    init_uart_interrupt();

	while(1){
		read_from_mp();
		decode_and_print();
	}



    return 0;
}