As avr-device is upgrading to use svd2rust version 0.33.1 (see https://github.com/Rahix/avr-device/pull/155), there are some significant changes in the generated API. We have to adapt the HAL code to use the new API whereever relevant. This PR is a preview of what will change.
The following major changes are necessary:
Registers are no longer accessed as struct-fields of the peripheral, but rather as methods of the peripheral.
Safe writing to a field or register is now done using a new .set() method instead of .bits().
Fortunately, these changes can be trivially automated from rustc error messages using the following script:
As avr-device is upgrading to use svd2rust version 0.33.1 (see https://github.com/Rahix/avr-device/pull/155), there are some significant changes in the generated API. We have to adapt the HAL code to use the new API whereever relevant. This PR is a preview of what will change.
The following major changes are necessary:
.set()
method instead of.bits()
.Fortunately, these changes can be trivially automated from rustc error messages using the following script: