Open
Description
The AtomVM gpio
interface returns bare error
atoms in error conditions, which can make it difficult to diagnose why an error occurred.
We need to change the return type of these operations from error
to {error, Reason :: term()}
, where Reason
is an appropriate term that can be used for logging or even for a program to take action.
The following functions need to be modified:
gpio:close/0
gpio:stop/0
gpio:set_direction/3
gpio:set_level/3
gpio:set_int/3
gpio:remove_int/2
gpio:set_pin_mode/2
gpio:set_pull_mode/2
gpio:hold_en/1
gpio:hold_dis/1
gpio:digital_write/2
gpio:attach_interrupt/2
gpio:detach_interrupt/1