Doing so breaks galileo gen2 (gpio2) and others. Failing early is rather
pointless in any case so we may as well attempt the write, muxes do not
neccesarily have directions that work
Fixes #68
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
if (mux_i == NULL) {
return MRAA_ERROR_INVALID_HANDLE;
}
- if (mraa_gpio_dir(mux_i, MRAA_GPIO_OUT) != MRAA_SUCCESS) {
- mraa_gpio_close(mux_i);
- return MRAA_ERROR_UNSPECIFIED;
- }
+ // this function will sometimes fail, however this is not critical as
+ // long as the write succeeds - Test case galileo gen2 pin2
+ mraa_gpio_dir(mux_i, MRAA_GPIO_OUT);
+
if (mraa_gpio_write(mux_i, meta.mux[mi].value) != MRAA_SUCCESS) {
mraa_gpio_close(mux_i);
return MRAA_ERROR_INVALID_RESOURCE;