General:
- Better validation of Ruby arrays inside C functions
- Added
LGPIO.micro_delay(duration)
Hardware PWM:
- Ensure polarity is always set to :normal on initialize, not :inversed by default on some hardware
- Add
#polarity
,#polarity=
and#frequency
- Duty cycles are now correctly set as floats, not integers
Hardware SPI:
- Allow reading and writing different lengths in
LGPIO.spi_xfer
. Now requires a 3rd arg always, for number of bytes to read.
Bit-Bang I2C:
- Move bit level operations back into C. Very little C code, so still mostly Ruby to maintain, but much faster where YJIT isn't available (mostly Raspberry Pi Zero W). On newer boards performance difference is negligible.