Skip to content

Version 0.8.0

Latest

Choose a tag to compare

@Rahix Rahix released this 30 Nov 16:56
v0.8.0

Changed

  • BREAKING: Changed the architecture of avr-device such that code is now generated at build time (#157 by @LuigiPiucco). This allows us to scale better and also makes the code-generation much simpler in general. No external dependencies need to be installed anymore when working on this crate.
  • BREAKING: Upgraded to svd2rust version 0.36.1 (#157 by @LuigiPiucco). This leads to mostly one major change in the register API:
    • Registers are now accessed through functions instead of struct members.
      In practice, this means you will have to do the following changes throughout your codebase:
    -dp.PORTD.portd.write(|w| w.pd3().clear_bit());
    +dp.PORTD.portd().write(|w| w.pd3().clear_bit());
    
    -dp.TC0.tccr0b.write(|w| w.cs0().prescale_1024());
    +dp.TC0.tccr0b().write(|w| w.cs0().prescale_1024());
  • BREAKING: Renamed the critical-section-impl to just critical-section and enabled it by default. This was done because the Periperals::take() method is now gated on critical-section (#195).
  • Switched to the rust version of svdtools (#174 by @tones111).
  • Better register definitions for peripherals of the ATmega128RFA1 (#173 by @NikBel3476).

Added

  • Support for AT90CAN128, AT90CAN64, and AT90CAN32 (#206 by @alios).
  • Support for AVR128DB28 (#207 by @tomtor).
  • Support for ATtiny204, ATtiny804, and ATtiny1604 (#182 @nonik0).
  • Support for ATtiny1606 (#183 by @hammerlink).
  • Support for ATtiny261A, ATtiny461A, and ATtiny861A (#179 by @mbuesch).
  • Support for ATtiny417, ATtiny817, ATtiny1617, and ATtiny3217 (#184 by @G33KatWork).
  • Support for ATtiny1626 (#185 by @ckoehne). The VPORTA.DIR register is currently unavailable due to a compiler limitation. See pull request for details.
  • Added asm::get_stack_size() function which returns the current size of the stack (#189 by @LuigiPiucco). This function depends on the rt feature.
  • Added asm::nop2(), asm::nop3(), asm::nop4(), and asm::nop5() functions that delay for precisely 2 to 5 cycles (#228 by @mbuesch). These are useful for precise timing in bit-banging.