Hardware Reference
In-Depth Information
292 gettimeofday(&t1,0);
293 if ( word == last && t0.tv_sec && msdiff (&t1,&t0) < 1100.0 )
294 goto Start; /
Too soon
/
295
296 t0 = t1;
297 fprintf(stderr,"CODE %08lX\n",word);
298 return word;
299 }
300
301 /
302
Get text form of remote key :
303
/
304 static const char
305 getircode(void) {
306 unsigned long code;
307 int kx;
308
309 for (;;) {
310 code = getword();
311 for ( kx=0; ir_codes[kx].text; ++kx )
312 if ( ir_codes[kx].ir_code == code )
313 return ir_codes[kx].text;
314 }
315 }
316
317 /
318
Main program :
319
/
320 int
321 main(int argc,char
argv) {
∗∗
322 const char
key;
323 int optch;
324 int f_dump = 0, f_gnuplot = 0, f_noinvert = 0;
325
326 while ( (optch = getopt(argc,argv,"dgnsp:h")) != EOF )
327 switch ( optch ) {
328 case 'd' :
329 f_dump = 1;
330 break;
331 case 'g' :
332 f_gnuplot = 1;
333 break;
334 case 'n':
335 f_noinvert = 1;
336 break;
337 case 'p' :
338 gpio_inpin = atoi(optarg);
Search WWH ::




Custom Search