Skip to content

Latest commit

 

History

History
235 lines (179 loc) · 8.87 KB

CHANGELOG.md

File metadata and controls

235 lines (179 loc) · 8.87 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Note: As this project is still very early in its lifecycle, we don't have proper releases yet. Instead, the CHANGELOG will document changes over time so people already using the crates have a reference what is changing upstream.

Changed

  • Large refactor of the USART implementation (#116). The user-facing API is mostly the same though there might be some small details which have changed. Especially the user-facing interrupt methods look different now.
  • Updated the target specs to be in sync with upstream again. There were no major changes so it shouldn't be necessary to update downstream copies for now.
  • Upgraded to avr-device 0.3 (#128). As there can only ever be one version of avr-device in the dependency graph, you'll need to update all local dependencies which still point to 0.2 as well!

Fixed

  • Removed a bashism in the runner scripts (#126).

Added

  • A method to reconfigure an SPI peripheral (#112).

Fixed

  • Fixed I2C implementation for ATmega328PB (#107).
  • Fixed SPI implementation for ATmega328PB (#111).

Added

Changed

  • I2c was renamed to I2cMaster. There is a (deprecated) alias for the old name but where possible, the new one should be used (#102).

Changed

  • The SPI driver now wraps the chip-select (CS) pin to enforce proper usage (#103). Downstream code must change slightly to use the new API (example for Arduino Uno):
    -    let mut cs_pin = pins.d10.into_output(&mut pins.ddr);
    
    -    let mut spi = spi::Spi::new(
    +    let (mut spi, mut cs_pin) = spi::Spi::new(
             dp.SPI,
             pins.d13.into_output(&mut pins.ddr),
             pins.d11.into_output(&mut pins.ddr),
             pins.d12.into_pull_up_input(&mut pins.ddr),
    +        pins.d10.into_output(&mut pins.ddr),
             spi::Settings::default(),
         );

Fixed

  • Fixed a soundness issue in the SPI driver. The hardware requires proper setup of the CS pin which was not guaranteed. An API change was made to enforce the necessary invariant (#103).

Added

  • arduino-mega2560: A usart module with type aliases for all other USART peripherals apart from Usart0 (#100).

Changed

  • The avr-hal-generic::serial module was renamed to avr-hal-generic::usart for consistency (493546530eb8).

Added

  • Serial/USART: The Baudrate type for more precise control over the baudrate selection (#88).

Changed

  • The constructor for the Serial/USART driver must now be called with a Baudrate value, not an integer (#88). In practice, the easiest way to do this is using the .into_baudrate() conversion method. As an example, the needed change might look like this:
     let mut serial = arduino_uno::Serial::new(
         dp.USART0,
         pins.d0,
         pins.d1.into_output(&mut pins.ddr),
    -    57600,
    +    57600.into_baudrate(),
     );

Added

  • Support for ATmega328PB (#96).

Changed

  • atmega328p-hal: You must now select a chip via either the atmega328p or atmega328pb features. Selecting no or more than one chip will lead to a compile-error. As an example:
    [dependencies.atmega328p-hal]
    git = "https://github.com/Rahix/avr-hal.git"
    rev = "<latest git commit hash>"
    features = ["atmega328p"]
  • In HAL crates, the avr-hal-generic crate is no longer renamed to avr-hal as this will just lead to confusion and problems down the line (#89).
  • In HAL crates, the peripheral access crate (submodule of avr-device) is imported as pac everywhere instead of using the actual device name. This will make it easier to support multiple devices in a single HAL in the future (#89).
  • The reexported modules in board crates were cleaned up: The HAL crate is now reexported as hal and the PAC crates as pac (#89).

Added

  • The runner scripts now have better suport for MacOS out of the box (#87).

Added

  • Added a script for automatically synchronizing target specs with upstream (#84).

Changed

  • Moved all target specs (like avr-atmega32u4.json) to a single directory named avr-specs/ (#82).
  • Updated various settings in all target specs for better compatibility and general cleanup (#85).

Fixed

  • Fixed a number of issues in the sparkfun-pro-micro board crate (#74).

Changed

  • The Pins::new() for arduino-leonardo now also consumes the PORTF peripheral and exposes its pins as a0 - a5 (#73).

Fixed

  • Fixed a nightly regression which broke our target specs (#72).

Added

  • Added support for Arduino Nano (in arduino-uno board crate) (#69).
  • Added support for ADC6 and ADC7 pins in atmega328p-hal (#69).

Fixed

  • Reduced the overhead from delay_us(u32) (#68).

Added

  • Support for Sparkfun's Pro Micro board (#62).
  • SPI driver now implements the blocking::spi::{Transfer, Write} traits (#66).

Fixed

  • Fixed not resetting U2X bit in USART driver which leads to wrong baudrates in some situations (reported in #67, fixed in 7caed3a995e2).
  • Fixed I2C/TWI driver not resetting all bits during initialization (3116e9ad5441).

2019-05-11 - 2020-08-31

Please look at the git log for changes before this point :)