If a file open in linuxspi_gpio_op_wr fails, retry after a delay #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Setting the reset pin direction immediately after export doesn't allow enough time for the udev rule to give access rights to the gpio user group. This causes avrdude commands run as non-root to fail:
This code is based on the patch in #10 but it doesn't impose a fixed delay of 2 seconds. On my RPi 3 B+, I find a delay of 50 ms is all that's needed.
Your patch is currently being beta tested for inclusion in the next release of the Arduino IDE/Arduino AVR Boards but this issue makes the linuxspi programmer not terribly useful to Arduino IDE users. So, even if things aren't moving forward quickly for merging your patch in mainline AVRDUDE, it would still be very helpful to get this issue resolved and the patch updated.
I welcome any suggestions for improvement of this code.
Fixes #10
CC: @thinkingcow