Private
Public Access
2
0

api: introduce define for pin name size

MRAA_PIN_NAME_SIZE currently set at 12.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
Thomas Ingleby
2015-03-23 17:25:27 +00:00
parent 2388fb9a2a
commit 52c53760b2
3 changed files with 3 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ list_pins()
for (i = 0; i < pin_count; ++i) {
if (strcmp(mraa_get_pin_name(i), "INVALID") != 0) {
fprintf(stdout, "%02d ", i);
fprintf(stdout, "%8s: ", mraa_get_pin_name(i));
fprintf(stdout, "%*s: ", (MRAA_PIN_NAME_SIZE - 1), mraa_get_pin_name(i));
if (mraa_pin_mode_test(i, MRAA_PIN_GPIO))
fprintf(stdout, "GPIO ");
if (mraa_pin_mode_test(i, MRAA_PIN_I2C))