Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1.32 KB

1to2.md

File metadata and controls

33 lines (26 loc) · 1.32 KB

2.0.0 Changelog

Features

  • Swift 3.1 support removed, the minimum supported release is now 4.0.
  • New error handling for GPIO,1Wire, ADC, I2C, UART, SPI and PWM

API Changes

  • All enums are now lowercase, more importantly the pins .P<n> enums are now .pin<n>
  • Custom GPIO objects can now be declared with just a numeric Id
  • Most I/O functions in GPIO,1Wire, ADC, I2C, UART, SPI and PWM throws Errors instead of aborting.
  • GPIO API changes:
    • Value is now a boolean (true=1/High, false=0/Low)
    • New throwing enable() method that throws if a GPIO cannot be initialized correctly or if it's unreadable for SysFS GPIOs. I/O methods still crash on I/O errors for now, enable() can be optionally used to check beforehand for setup issues.
  • PWM API changes:
    • initPWM -> Throwing enable
    • startPWM -> start
    • stopPWM -> stop
    • initPWMPattern -> initPattern
  • UART API changes:
    • hasAvailableData now throwing a UARTError.IOError

Bug fixes, internal changes

  • RaspberryPi presets use the detected cpu architecture to determine the baseAddress
  • PWMOutput is now PWMInterface, GPIO now implements GPIOInterface, GPIO is now SysFSGPIO.
  • Fixed initalization issue for GPIO.pull
  • Updated the examples to Swift 4.0, long overdue
  • Updated project structure
  • API Tests