Skip to content

Commit

Permalink
mraa-gpio.c: dont display pins set as not MRAA_PINS_VALID
Browse files Browse the repository at this point in the history
Signed-off-by: Brendan Le Foll <[email protected]>
  • Loading branch information
arfoll committed Jun 20, 2016
1 parent 3d2163e commit 5f515f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/mraa-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ list_platform_pins(uint8_t platform_offset)
for (i = 0; i < pin_count; ++i) {
int pin_id = platform_offset > 0 ? mraa_get_sub_platform_id(i) : i;
char* pin_name = mraa_get_pin_name(pin_id);
if (strcmp(pin_name, "INVALID") != 0) {
if (strcmp(pin_name, "INVALID") != 0 && mraa_pin_mode_test(pin_id, MRAA_PIN_VALID)) {
fprintf(stdout, "%02d ", pin_id);
fprintf(stdout, "%*s: ", (MRAA_PIN_NAME_SIZE - 1), pin_name);
if (mraa_pin_mode_test(pin_id, MRAA_PIN_GPIO))
Expand Down

0 comments on commit 5f515f7

Please sign in to comment.