Skip to content

Commit bf0a6c2

Browse files
committed
svd2rust: update to v0.35.0
1 parent 95f5810 commit bf0a6c2

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
id: cache-cargo
2727
with:
2828
path: ~/cargo-bin
29-
key: rust-tools-20250106-001
29+
key: rust-tools-20250111-001
3030
- name: Install svd2rust
3131
if: steps.cache-cargo.outputs.cache-hit != 'true'
32-
run: cargo install svd2rust --version 0.28.0 --locked
32+
run: cargo install svd2rust --version 0.35.0 --locked
3333
- name: Install cargo-form
3434
if: steps.cache-cargo.outputs.cache-hit != 'true'
3535
run: cargo install form --version 0.8.0 --locked

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ Via the feature you can select which chip you want the register specifications f
4040
## Build Instructions
4141
The version on `crates.io` is pre-built. The following is only necessary when trying to build this crate from source.
4242

43-
You need to have [atdf2svd][] (= 0.5.0), [svd2rust][] (= 0.28), [form][] (>= 0.8), [rustfmt][](for the *nightly* toolchain) and [svdtools][] (= 0.4.0) installed:
43+
You need to have [atdf2svd][] (= 0.5.0), [svd2rust][] (= 0.35.0), [form][] (>= 0.8), [rustfmt][](for the *nightly* toolchain) and [svdtools][] (= 0.4.0) installed:
4444
```bash
4545
cargo install atdf2svd --version 0.5.0 --locked
46-
cargo install svd2rust --version 0.28.0 --locked
46+
cargo install svd2rust --version 0.35.0 --locked
4747
cargo install form
4848
rustup component add --toolchain nightly rustfmt
4949
cargo install svdtools --version 0.4.0 --locked

examples/atmega328p/src/main.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ fn panic(_info: &core::panic::PanicInfo) -> ! {
2626

2727
loop {
2828
avr_device::asm::delay_cycles(1_000_000);
29-
dp.PORTD.portd.write(|w| w.pd3().set_bit());
29+
dp.portd.portd().write(|w| w.pd3().set_bit());
3030
avr_device::asm::delay_cycles(1_000_000);
31-
dp.PORTD.portd.write(|w| w.pd3().clear_bit());
31+
dp.portd.portd().write(|w| w.pd3().clear_bit());
3232
}
3333
}
3434

@@ -59,14 +59,14 @@ fn main() -> ! {
5959
// will be written value + the modified bits
6060

6161
// Divide by 1024 -> 16MHz/1024 = 15.6kHz
62-
dp.TC0.tccr0b.write(|w| w.cs0().prescale_1024());
62+
dp.tc0.tccr0b().write(|w| w.cs0().prescale_1024());
6363
// Enable overflow interrupts
64-
dp.TC0.timsk0.write(|w| w.toie0().set_bit());
64+
dp.tc0.timsk0().write(|w| w.toie0().set_bit());
6565

6666
// Make pd2 and pd3 outputs
6767
// We use .modify() in order not to change the other bits
68-
dp.PORTD.ddrd.modify(|_, w| w.pd2().set_bit());
69-
dp.PORTD.ddrd.modify(|_, w| w.pd3().set_bit());
68+
dp.portd.ddrd().modify(|_, w| w.pd2().set_bit());
69+
dp.portd.ddrd().modify(|_, w| w.pd3().set_bit());
7070

7171
// SAFETY: We can enable the interrupts here as we are not inside
7272
// a critical section.
@@ -82,7 +82,7 @@ fn main() -> ! {
8282
led_state = LED_STATE.borrow(cs).get();
8383
});
8484

85-
dp.PORTD.portd.modify(|_, w| w.pd2().bit(led_state));
85+
dp.portd.portd().modify(|_, w| w.pd2().bit(led_state));
8686

8787
// We want to make the program crash after 9 blinks
8888
if previous_state != led_state {

0 commit comments

Comments
 (0)