1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-04-28 09:53:19 +02:00

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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Walbran <qwandor@google.com>
This commit is contained in:
dependabot[bot] 2025-03-06 04:28:38 +00:00 committed by GitHub
parent b24914a247
commit a20d3f15c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 69 additions and 13 deletions

View File

@ -4,11 +4,12 @@ version = 4
[[package]]
name = "arm-gic"
version = "0.1.2"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f0dcb1a29e42b98d24e0706354839b8d02f0d01445d819dc06cef8919a57548"
checksum = "0283195c61a2bbd6c5e79a0d707951799f97503db21974de7c9f948c05ba3ad8"
dependencies = [
"bitflags",
"thiserror",
]
[[package]]
@ -19,9 +20,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "bitflags"
version = "2.8.0"
version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
[[package]]
name = "cc"
@ -66,6 +67,24 @@ dependencies = [
"autocfg",
]
[[package]]
name = "proc-macro2"
version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1f1914ce909e1658d9907913b4b91947430c7d9be598b15a1912935b8c04801"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rtc"
version = "0.1.0"
@ -105,3 +124,40 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
dependencies = [
"lock_api",
]
[[package]]
name = "syn"
version = "2.0.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e02e925281e18ffd9d640e234264753c43edc62d64b2d4cf898f1bc5e75f3fc2"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "thiserror"
version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "unicode-ident"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe"

View File

@ -7,8 +7,8 @@ edition = "2021"
publish = false
[dependencies]
arm-gic = "0.1.2"
bitflags = "2.8.0"
arm-gic = "0.2.2"
bitflags = "2.9.0"
chrono = { version = "0.4.40", default-features = false }
log = "0.4.26"
smccc = "0.1.1"

View File

@ -24,8 +24,7 @@ mod pl011;
mod pl031;
use crate::pl031::Rtc;
use arm_gic::gicv3::{IntId, Trigger};
use arm_gic::{irq_enable, wfi};
use arm_gic::{irq_enable, wfi, IntId, Trigger};
use chrono::{TimeZone, Utc};
use core::hint::spin_loop;
// ANCHOR: imports
@ -63,8 +62,9 @@ extern "C" fn main(x0: u64, x1: u64, x2: u64, x3: u64) {
// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base
// addresses of a GICv3 distributor and redistributor respectively, and
// nothing else accesses those address ranges.
let mut gic = unsafe { GicV3::new(GICD_BASE_ADDRESS, GICR_BASE_ADDRESS) };
gic.setup();
let mut gic =
unsafe { GicV3::new(GICD_BASE_ADDRESS, GICR_BASE_ADDRESS, 1, 0x20000) };
gic.setup(0);
// ANCHOR_END: main
// 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) {
info!("RTC: {time}");
GicV3::set_priority_mask(0xff);
gic.set_interrupt_priority(PL031_IRQ, 0x80);
gic.set_trigger(PL031_IRQ, Trigger::Level);
gic.set_interrupt_priority(PL031_IRQ, None, 0x80);
gic.set_trigger(PL031_IRQ, None, Trigger::Level);
irq_enable();
gic.enable_interrupt(PL031_IRQ, true);
gic.enable_interrupt(PL031_IRQ, None, true);
// Wait for 3 seconds, without interrupts.
let target = timestamp + 3;