This commit is contained in:
11
main.c
11
main.c
@ -51,13 +51,16 @@
|
|||||||
|
|
||||||
static struct libusb_device_handle *devh = NULL;
|
static struct libusb_device_handle *devh = NULL;
|
||||||
|
|
||||||
int main(int argc,char** argv)
|
int
|
||||||
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
unsigned char code = 0;
|
unsigned char code = 0;
|
||||||
if (argc != 2)
|
if (argc != 2)
|
||||||
{
|
{
|
||||||
printf("syntax: %s blue | red | green | aqua | purple | yellow | white | off\n",argv[0]);
|
printf
|
||||||
|
("Syntax: %s blue | red | green | aqua | purple | yellow | white | off\n",
|
||||||
|
argv[0]);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -108,7 +111,9 @@ int main(int argc,char** argv)
|
|||||||
else if (strcmp (argv[1], "white") == 0)
|
else if (strcmp (argv[1], "white") == 0)
|
||||||
{
|
{
|
||||||
code = 7;
|
code = 7;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
printf ("invalid color\n");
|
printf ("invalid color\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user