mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-24 00:20:38 +02:00
ubbctl/ubbctl.c (main): move pin status display to separate function
This commit is contained in:
parent
fe96b3b297
commit
e6a0e42296
@ -32,11 +32,10 @@ static struct pin {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
static void show_pins(void)
|
||||||
{
|
{
|
||||||
const struct pin *p;
|
const struct pin *p;
|
||||||
|
|
||||||
ubb_open(UBB_ALL);
|
|
||||||
for (p = pins; p->name; p++) {
|
for (p = pins; p->name; p++) {
|
||||||
printf("%s%s=", p == pins ? "" : " ", p->name);
|
printf("%s%s=", p == pins ? "" : " ", p->name);
|
||||||
if (PDFUN & p->mask)
|
if (PDFUN & p->mask)
|
||||||
@ -48,5 +47,12 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
ubb_open(UBB_ALL);
|
||||||
|
show_pins();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user