Skip to content

Releases: denko-rb/lgpio

v0.1.11

12 Oct 05:14
Compare
Choose a tag to compare

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.

v0.1.10

28 Sep 23:25
Compare
Choose a tag to compare
  • Fix I2CBitBang and SPIBitBang, which were broken by the last version.
  • They both now take a hash of pin hashes for initialization, and can work across gpiochip devices.
  • Each pin hash must have an already open LGPIO handle (NOT chip number) for the chip to be used, and which line number of that chip is to be used.
  • I2C example: { scl: { handle: h0, line: 1 }, sda: { handle: h1, line: 15 } }
  • SPI example: { clock: { handle: h0, line: 3 }, input: { handle: h1, line: 4 }, output: { handle: h2, line: 5 } }

v0.1.9

28 Sep 17:34
Compare
Choose a tag to compare
  • Changed arg order for _claim_ methods, compared to lgpio C, so that gpio number (or group of numbers) always follows handle. The general pattern is handle, gpio, flags, state. This affects:
    • gpio_claim_input
    • gpio_claim_output
    • gpio_claim_alert
    • group_claim_input
    • group_claim_output

Helpful on boards where the usable GPIO lines are spread across multiple /dev/gpiochipN devices. Lines/groups can be referred to by tuples of [gpiochip, line/group], then then splatted when given to these methods.

v0.1.8

19 Sep 20:59
Compare
Choose a tag to compare
  • Added SPIBitBang#config which was needed by denko-piboard
  • Fixed a math error in the SPI bit-bang SSD1306 example

v0.1.7

19 Sep 04:31
Compare
Choose a tag to compare
  • Removed C version of bit-bang I2C (and associated examples)
  • Renamed most examples so they make more sense

v0.1.6

19 Sep 03:53
Compare
Choose a tag to compare

New Features

  • Ultrasonic Read (HC-SR04)
  • Multiple Pulse Read (DHT enviro sensors)
  • Bit-bang I2C
  • Bit-bang SPI
  • Bit-bang 1-Wire
  • On-Off Keying (OOK) Waves via Hardware PWM (eg. Infrared)

New mappings to C lgpio

  • LGPIO.gpio_get_mode

v0.1.5

17 Aug 04:22
Compare
Choose a tag to compare

Add Hardware PWM and Servo support using the Linux sysfs interface.

v0.1.4

05 Aug 04:56
Compare
Choose a tag to compare

Moved WS2812 data re-encoding (1 data bit -> 3 SPI bits) from Ruby example into C extension.

v0.1.3

03 Aug 18:10
Compare
Choose a tag to compare

Initial Release