Skip to content

Commit a20d3f1

Browse files
cargo: bump the minor group across 1 directory with 2 updates (#2689)
Bumps the minor group with 2 updates in the /src/exercises/bare-metal/rtc directory: [arm-gic](https://github.com/google/arm-gic) and [bitflags](https://github.com/bitflags/bitflags). --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrew Walbran <[email protected]>
1 parent b24914a commit a20d3f1

File tree

3 files changed

+69
-13
lines changed

3 files changed

+69
-13
lines changed

src/exercises/bare-metal/rtc/Cargo.lock

Lines changed: 60 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/exercises/bare-metal/rtc/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ edition = "2021"
77
publish = false
88

99
[dependencies]
10-
arm-gic = "0.1.2"
11-
bitflags = "2.8.0"
10+
arm-gic = "0.2.2"
11+
bitflags = "2.9.0"
1212
chrono = { version = "0.4.40", default-features = false }
1313
log = "0.4.26"
1414
smccc = "0.1.1"

src/exercises/bare-metal/rtc/src/main.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ mod pl011;
2424
mod pl031;
2525

2626
use crate::pl031::Rtc;
27-
use arm_gic::gicv3::{IntId, Trigger};
28-
use arm_gic::{irq_enable, wfi};
27+
use arm_gic::{irq_enable, wfi, IntId, Trigger};
2928
use chrono::{TimeZone, Utc};
3029
use core::hint::spin_loop;
3130
// ANCHOR: imports
@@ -63,8 +62,9 @@ extern "C" fn main(x0: u64, x1: u64, x2: u64, x3: u64) {
6362
// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base
6463
// addresses of a GICv3 distributor and redistributor respectively, and
6564
// nothing else accesses those address ranges.
66-
let mut gic = unsafe { GicV3::new(GICD_BASE_ADDRESS, GICR_BASE_ADDRESS) };
67-
gic.setup();
65+
let mut gic =
66+
unsafe { GicV3::new(GICD_BASE_ADDRESS, GICR_BASE_ADDRESS, 1, 0x20000) };
67+
gic.setup(0);
6868
// ANCHOR_END: main
6969

7070
// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and
@@ -75,10 +75,10 @@ extern "C" fn main(x0: u64, x1: u64, x2: u64, x3: u64) {
7575
info!("RTC: {time}");
7676

7777
GicV3::set_priority_mask(0xff);
78-
gic.set_interrupt_priority(PL031_IRQ, 0x80);
79-
gic.set_trigger(PL031_IRQ, Trigger::Level);
78+
gic.set_interrupt_priority(PL031_IRQ, None, 0x80);
79+
gic.set_trigger(PL031_IRQ, None, Trigger::Level);
8080
irq_enable();
81-
gic.enable_interrupt(PL031_IRQ, true);
81+
gic.enable_interrupt(PL031_IRQ, None, true);
8282

8383
// Wait for 3 seconds, without interrupts.
8484
let target = timestamp + 3;

0 commit comments

Comments
 (0)