Open xlla opened 4 years ago
is this function right? it will stop init in function mraa_intel_edison_fab_c statement
Hi @xlla, yes the function is right but only needed with the Arduino expansion board which is now a retired product. That pin needs to be set to MRAA_GPIO_OUT to successfully init the SPI bus and ADC.
Hi @Propanu , I am understand it's purpose,
the issus is in chardev version,
I have init a line by
tristate = mraa_gpio_init_by_name(TRI_STATE_ALL)
and set the direction by
mraa_gpio_dir(tristate, MRAA_GPIO_OUT)
then I check the direction by
mraa_gpio_read_dir(tristate, &tristate_dir)
it will wrong and report "Line used by kernel".
I have init a line, and set direction to output successful. later, when I check this line's direction by call function mraa_gpio_read_dir, it will think "Line used by kernel." and return ERROR.
in function mraa_gpio_read_dir, it will check line->flags with those macro
but in mraa_gpio_chardev_dir function, it set line->flag with those macro
if I skip mraa_gpio_read_dir and check direction, just call mraa_gpio_write in this line, it will success, and program runs fine.
is this function right? it will stop init in function mraa_intel_edison_fab_c statement