Sample implementation to parse commandline parameter.

This commit is contained in:
Kai Lauterbach 2011-12-30 13:04:26 +01:00
parent b3fd6c03d5
commit cf16f06a98

View file

@ -32,8 +32,17 @@ int main(int argc, char **argv)
lc_init(); lc_init();
// TODO parse commandline parameters lc_setMode(MODE_ANIMATION_STOP);
// TODO parse commandline parameters
unsigned int frame = 0;
if ( sscanf((char*)argv[1], "0x%08x", &frame) )
{
printf("0x%08x\n", frame);
lc_setFrame(frame);
}
//lc_setMode(MODE_ANIMATION_LOOP);
lc_close(); lc_close();
return 0; return 0;