[Apologies for the mega-patch. I think that this will be worthwhile change, but it's probably worth tagging the project to avoid disrupting anyone using it by a pretty major refactoring. Also, the diff view on GitHub is a little scary due to the deletions. It looks more recognizable as Erlang/ALE when you look at my repository.]
Many of the updates come from changes to the C code to fix race
conditions, simplify building (including cross-compiling), and add
functionality. The changes had been collected in the Elixir/ALE project,
and given that both projects had similar issues, it seemed better to
hold the fixes here. Given the nature of the changes, it was difficult
to commit incrementally and still have working builds. Hence this
mega-patch.
This code has been manually tested on an Erlang Embedded Demo Board.
The following is a summary of changes:
Updated documentation with schematics showing use
Fixed race conditions with GPIO (no more multiple threads in C)
Fix interrupt support on Raspberry Pi 2. No more infinite
interrupts.
Eliminate dependencies. This made is possible to build in some
situations. It also should help people use it out of the box.
Use binaries on I2C. This makes dealing with I2C a lot more
pleasant. While I2C theoretically supports 10-bit bytes, very few
chips use this in practice.
Simplify port code and interface to Erlang.
Remove PWM interface. This was Raspberry Pi specific and not
maintained.
Make one multi-call binary. This reduces memory usage and
simplifies the build system.
Only support Linux. The previous code had an abstraction layer
in anticipation of porting to RTOS's. That never happened, and the
API had many Linux assumptions in it anyway.
Support "atomic" write, read transactions on I2C. This is a very common
usage scenario.
Require client code to register names for ALE processes if it
wants them. The previous code sometimes registered with gproc and
sometimes locally. The user decides now.
Remove most tests. They had limited coverage and complicated the GPIO
code. The gpio_counter example still exists and has been updated.
Use rebar3 to build.
Fix gpio interrupt filter so that transients on the GPIO don't
send an unexpected notification.
Signed-off-by: Frank Hunleth fhunleth@troodon-software.com
[Apologies for the mega-patch. I think that this will be worthwhile change, but it's probably worth tagging the project to avoid disrupting anyone using it by a pretty major refactoring. Also, the diff view on GitHub is a little scary due to the deletions. It looks more recognizable as Erlang/ALE when you look at my repository.]
Many of the updates come from changes to the C code to fix race conditions, simplify building (including cross-compiling), and add functionality. The changes had been collected in the Elixir/ALE project, and given that both projects had similar issues, it seemed better to hold the fixes here. Given the nature of the changes, it was difficult to commit incrementally and still have working builds. Hence this mega-patch.
This code has been manually tested on an Erlang Embedded Demo Board.
The following is a summary of changes:
Signed-off-by: Frank Hunleth fhunleth@troodon-software.com