Skip to content

Commit 96aa8ed

Browse files
committed
do not set pinmux on the beaglebone blue
beaglebone blue has complete dtb file and does not need pinmux set for gpio ports
1 parent f70453e commit 96aa8ed

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

source/c_pinmux.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,23 @@ BBIO_err set_pin_mode(const char *key, const char *mode)
3232
snprintf(pinmux_dir, sizeof(pinmux_dir), "ocp:%s_pinmux", pin);
3333
snprintf(path, sizeof(path), "%s/%s/state", ocp_dir, pinmux_dir);
3434

35+
/* beaglebone blue has complete dtb file and does not need overlays */
36+
if(beaglebone_blue()) {
37+
fprintf(stderr, "DEBUG: Adafruit_BBIO: set_pin_mode() :: Pinmux file: %s, mode: %s", path, mode);
38+
fprintf(stderr, "DEBUG: Adafruit_BBIO: set_pin_mode(): beaglebone_blue() is TRUE; return BBIO_OK\n");
39+
return BBIO_OK;
40+
}
41+
42+
3543
f = fopen(path, "w");
3644
if (NULL == f) {
3745
return BBIO_ACCESS;
3846
}
3947
syslog(LOG_DEBUG, "Adafruit_BBIO: set_pin_mode() :: Pinmux file %s access OK", path);
48+
fprintf(stderr, "Adafruit_BBIO: set_pin_mode() :: Pinmux file %s access OK", path);
4049
fprintf(f, "%s", mode);
4150
fclose(f);
4251
syslog(LOG_DEBUG, "Adafruit_BBIO: set_pin_mode() :: Set pinmux mode to %s for %s", mode, pin);
52+
fprintf(stderr, "Adafruit_BBIO: set_pin_mode() :: Set pinmux mode to %s for %s", mode, pin);
4353
return BBIO_OK;
4454
}

0 commit comments

Comments
 (0)