Sample implementation to parse commandline parameter.
This commit is contained in:
parent
b3fd6c03d5
commit
cf16f06a98
1 changed files with 10 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue