Skip to content

Commit a4786bb

Browse files
committed
Bump dependencies and svd files.
This change updates `cortex-m` dependency as well as `svd2rust`, which required updating xtask source code too. Effectively, `svd2rust` was the biggest update in terms of dependencies. This also updates SVD files for all nRF chips to the latest version. I presume this is going to introduce breaking changes all over the place, so I also bumped the minor version (which is not exactly semver, but it felt arrogant to bump the major).
1 parent 4588855 commit a4786bb

File tree

9,848 files changed

+1238266
-1157374
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,848 files changed

+1238266
-1157374
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ members = ["xtask", "pacs/*"]
33
default-members = ["xtask"]
44

55
[workspace.package]
6-
version = "0.12.2"
6+
version = "0.13.0"
77
keywords = ["no-std", "arm", "cortex-m", "nrf", "peripherals"]
88
license = "0BSD"
99
repository = "https://github.com/nrf-rs/nrf-pacs"
1010
edition = "2018"
1111
readme = "README.md"
1212

1313
[workspace.dependencies]
14-
cortex-m = "0.7.3"
14+
cortex-m = "0.7.7"
1515
vcell = "0.1.3"
1616
cortex-m-rt = ">=0.6.15,<0.8"
1717

1818
# meta-dependencies (upgrade as needed, they apply to all PACs):
19-
# @svd2rust = 0.25.1
20-
# @form = 0.12.1
19+
# @svd2rust = 0.37.0
20+
# @form = 0.13.0

pacs/nrf51-pac/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![doc = r" Builder file for Peripheral access crate generated by svd2rust tool"]
12
use std::env;
23
use std::fs::File;
34
use std::io::Write;

pacs/nrf51-pac/src/aar.rs

Lines changed: 122 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,167 @@
1-
#[doc = r"Register block"]
21
#[repr(C)]
2+
#[doc = "Register block"]
33
pub struct RegisterBlock {
4-
#[doc = "0x00 - Start resolving addresses based on IRKs specified in the IRK data structure."]
5-
pub tasks_start: TASKS_START,
4+
tasks_start: TasksStart,
65
_reserved1: [u8; 0x04],
7-
#[doc = "0x08 - Stop resolving addresses."]
8-
pub tasks_stop: TASKS_STOP,
6+
tasks_stop: TasksStop,
97
_reserved2: [u8; 0xf4],
8+
events_end: EventsEnd,
9+
events_resolved: EventsResolved,
10+
events_notresolved: EventsNotresolved,
11+
_reserved5: [u8; 0x01f8],
12+
intenset: Intenset,
13+
intenclr: Intenclr,
14+
_reserved7: [u8; 0xf4],
15+
status: Status,
16+
_reserved8: [u8; 0xfc],
17+
enable: Enable,
18+
nirk: Nirk,
19+
irkptr: Irkptr,
20+
_reserved11: [u8; 0x04],
21+
addrptr: Addrptr,
22+
scratchptr: Scratchptr,
23+
_reserved13: [u8; 0x0ae4],
24+
power: Power,
25+
}
26+
impl RegisterBlock {
27+
#[doc = "0x00 - Start resolving addresses based on IRKs specified in the IRK data structure."]
28+
#[inline(always)]
29+
pub const fn tasks_start(&self) -> &TasksStart {
30+
&self.tasks_start
31+
}
32+
#[doc = "0x08 - Stop resolving addresses."]
33+
#[inline(always)]
34+
pub const fn tasks_stop(&self) -> &TasksStop {
35+
&self.tasks_stop
36+
}
1037
#[doc = "0x100 - Address resolution procedure completed."]
11-
pub events_end: EVENTS_END,
38+
#[inline(always)]
39+
pub const fn events_end(&self) -> &EventsEnd {
40+
&self.events_end
41+
}
1242
#[doc = "0x104 - Address resolved."]
13-
pub events_resolved: EVENTS_RESOLVED,
43+
#[inline(always)]
44+
pub const fn events_resolved(&self) -> &EventsResolved {
45+
&self.events_resolved
46+
}
1447
#[doc = "0x108 - Address not resolved."]
15-
pub events_notresolved: EVENTS_NOTRESOLVED,
16-
_reserved5: [u8; 0x01f8],
48+
#[inline(always)]
49+
pub const fn events_notresolved(&self) -> &EventsNotresolved {
50+
&self.events_notresolved
51+
}
1752
#[doc = "0x304 - Interrupt enable set register."]
18-
pub intenset: INTENSET,
53+
#[inline(always)]
54+
pub const fn intenset(&self) -> &Intenset {
55+
&self.intenset
56+
}
1957
#[doc = "0x308 - Interrupt enable clear register."]
20-
pub intenclr: INTENCLR,
21-
_reserved7: [u8; 0xf4],
58+
#[inline(always)]
59+
pub const fn intenclr(&self) -> &Intenclr {
60+
&self.intenclr
61+
}
2262
#[doc = "0x400 - Resolution status."]
23-
pub status: STATUS,
24-
_reserved8: [u8; 0xfc],
63+
#[inline(always)]
64+
pub const fn status(&self) -> &Status {
65+
&self.status
66+
}
2567
#[doc = "0x500 - Enable AAR."]
26-
pub enable: ENABLE,
68+
#[inline(always)]
69+
pub const fn enable(&self) -> &Enable {
70+
&self.enable
71+
}
2772
#[doc = "0x504 - Number of Identity root Keys in the IRK data structure."]
28-
pub nirk: NIRK,
73+
#[inline(always)]
74+
pub const fn nirk(&self) -> &Nirk {
75+
&self.nirk
76+
}
2977
#[doc = "0x508 - Pointer to the IRK data structure."]
30-
pub irkptr: IRKPTR,
31-
_reserved11: [u8; 0x04],
78+
#[inline(always)]
79+
pub const fn irkptr(&self) -> &Irkptr {
80+
&self.irkptr
81+
}
3282
#[doc = "0x510 - Pointer to the resolvable address (6 bytes)."]
33-
pub addrptr: ADDRPTR,
83+
#[inline(always)]
84+
pub const fn addrptr(&self) -> &Addrptr {
85+
&self.addrptr
86+
}
3487
#[doc = "0x514 - Pointer to a scratch data area used for temporary storage during resolution. A minimum of 3 bytes must be reserved."]
35-
pub scratchptr: SCRATCHPTR,
36-
_reserved13: [u8; 0x0ae4],
88+
#[inline(always)]
89+
pub const fn scratchptr(&self) -> &Scratchptr {
90+
&self.scratchptr
91+
}
3792
#[doc = "0xffc - Peripheral power control."]
38-
pub power: POWER,
93+
#[inline(always)]
94+
pub const fn power(&self) -> &Power {
95+
&self.power
96+
}
3997
}
40-
#[doc = "TASKS_START (w) register accessor: an alias for `Reg<TASKS_START_SPEC>`"]
41-
pub type TASKS_START = crate::Reg<tasks_start::TASKS_START_SPEC>;
98+
#[doc = "TASKS_START (w) register accessor: Start resolving addresses based on IRKs specified in the IRK data structure.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`tasks_start::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@tasks_start`] module"]
99+
#[doc(alias = "TASKS_START")]
100+
pub type TasksStart = crate::Reg<tasks_start::TasksStartSpec>;
42101
#[doc = "Start resolving addresses based on IRKs specified in the IRK data structure."]
43102
pub mod tasks_start;
44-
#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg<TASKS_STOP_SPEC>`"]
45-
pub type TASKS_STOP = crate::Reg<tasks_stop::TASKS_STOP_SPEC>;
103+
#[doc = "TASKS_STOP (w) register accessor: Stop resolving addresses.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`tasks_stop::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@tasks_stop`] module"]
104+
#[doc(alias = "TASKS_STOP")]
105+
pub type TasksStop = crate::Reg<tasks_stop::TasksStopSpec>;
46106
#[doc = "Stop resolving addresses."]
47107
pub mod tasks_stop;
48-
#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg<EVENTS_END_SPEC>`"]
49-
pub type EVENTS_END = crate::Reg<events_end::EVENTS_END_SPEC>;
108+
#[doc = "EVENTS_END (rw) register accessor: Address resolution procedure completed.\n\nYou can [`read`](crate::Reg::read) this register and get [`events_end::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`events_end::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@events_end`] module"]
109+
#[doc(alias = "EVENTS_END")]
110+
pub type EventsEnd = crate::Reg<events_end::EventsEndSpec>;
50111
#[doc = "Address resolution procedure completed."]
51112
pub mod events_end;
52-
#[doc = "EVENTS_RESOLVED (rw) register accessor: an alias for `Reg<EVENTS_RESOLVED_SPEC>`"]
53-
pub type EVENTS_RESOLVED = crate::Reg<events_resolved::EVENTS_RESOLVED_SPEC>;
113+
#[doc = "EVENTS_RESOLVED (rw) register accessor: Address resolved.\n\nYou can [`read`](crate::Reg::read) this register and get [`events_resolved::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`events_resolved::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@events_resolved`] module"]
114+
#[doc(alias = "EVENTS_RESOLVED")]
115+
pub type EventsResolved = crate::Reg<events_resolved::EventsResolvedSpec>;
54116
#[doc = "Address resolved."]
55117
pub mod events_resolved;
56-
#[doc = "EVENTS_NOTRESOLVED (rw) register accessor: an alias for `Reg<EVENTS_NOTRESOLVED_SPEC>`"]
57-
pub type EVENTS_NOTRESOLVED = crate::Reg<events_notresolved::EVENTS_NOTRESOLVED_SPEC>;
118+
#[doc = "EVENTS_NOTRESOLVED (rw) register accessor: Address not resolved.\n\nYou can [`read`](crate::Reg::read) this register and get [`events_notresolved::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`events_notresolved::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@events_notresolved`] module"]
119+
#[doc(alias = "EVENTS_NOTRESOLVED")]
120+
pub type EventsNotresolved = crate::Reg<events_notresolved::EventsNotresolvedSpec>;
58121
#[doc = "Address not resolved."]
59122
pub mod events_notresolved;
60-
#[doc = "INTENSET (rw) register accessor: an alias for `Reg<INTENSET_SPEC>`"]
61-
pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
123+
#[doc = "INTENSET (rw) register accessor: Interrupt enable set register.\n\nYou can [`read`](crate::Reg::read) this register and get [`intenset::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intenset::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@intenset`] module"]
124+
#[doc(alias = "INTENSET")]
125+
pub type Intenset = crate::Reg<intenset::IntensetSpec>;
62126
#[doc = "Interrupt enable set register."]
63127
pub mod intenset;
64-
#[doc = "INTENCLR (rw) register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
65-
pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
128+
#[doc = "INTENCLR (rw) register accessor: Interrupt enable clear register.\n\nYou can [`read`](crate::Reg::read) this register and get [`intenclr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intenclr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@intenclr`] module"]
129+
#[doc(alias = "INTENCLR")]
130+
pub type Intenclr = crate::Reg<intenclr::IntenclrSpec>;
66131
#[doc = "Interrupt enable clear register."]
67132
pub mod intenclr;
68-
#[doc = "STATUS (r) register accessor: an alias for `Reg<STATUS_SPEC>`"]
69-
pub type STATUS = crate::Reg<status::STATUS_SPEC>;
133+
#[doc = "STATUS (r) register accessor: Resolution status.\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@status`] module"]
134+
#[doc(alias = "STATUS")]
135+
pub type Status = crate::Reg<status::StatusSpec>;
70136
#[doc = "Resolution status."]
71137
pub mod status;
72-
#[doc = "ENABLE (rw) register accessor: an alias for `Reg<ENABLE_SPEC>`"]
73-
pub type ENABLE = crate::Reg<enable::ENABLE_SPEC>;
138+
#[doc = "ENABLE (rw) register accessor: Enable AAR.\n\nYou can [`read`](crate::Reg::read) this register and get [`enable::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`enable::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@enable`] module"]
139+
#[doc(alias = "ENABLE")]
140+
pub type Enable = crate::Reg<enable::EnableSpec>;
74141
#[doc = "Enable AAR."]
75142
pub mod enable;
76-
#[doc = "NIRK (rw) register accessor: an alias for `Reg<NIRK_SPEC>`"]
77-
pub type NIRK = crate::Reg<nirk::NIRK_SPEC>;
143+
#[doc = "NIRK (rw) register accessor: Number of Identity root Keys in the IRK data structure.\n\nYou can [`read`](crate::Reg::read) this register and get [`nirk::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`nirk::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@nirk`] module"]
144+
#[doc(alias = "NIRK")]
145+
pub type Nirk = crate::Reg<nirk::NirkSpec>;
78146
#[doc = "Number of Identity root Keys in the IRK data structure."]
79147
pub mod nirk;
80-
#[doc = "IRKPTR (rw) register accessor: an alias for `Reg<IRKPTR_SPEC>`"]
81-
pub type IRKPTR = crate::Reg<irkptr::IRKPTR_SPEC>;
148+
#[doc = "IRKPTR (rw) register accessor: Pointer to the IRK data structure.\n\nYou can [`read`](crate::Reg::read) this register and get [`irkptr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`irkptr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@irkptr`] module"]
149+
#[doc(alias = "IRKPTR")]
150+
pub type Irkptr = crate::Reg<irkptr::IrkptrSpec>;
82151
#[doc = "Pointer to the IRK data structure."]
83152
pub mod irkptr;
84-
#[doc = "ADDRPTR (rw) register accessor: an alias for `Reg<ADDRPTR_SPEC>`"]
85-
pub type ADDRPTR = crate::Reg<addrptr::ADDRPTR_SPEC>;
153+
#[doc = "ADDRPTR (rw) register accessor: Pointer to the resolvable address (6 bytes).\n\nYou can [`read`](crate::Reg::read) this register and get [`addrptr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`addrptr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@addrptr`] module"]
154+
#[doc(alias = "ADDRPTR")]
155+
pub type Addrptr = crate::Reg<addrptr::AddrptrSpec>;
86156
#[doc = "Pointer to the resolvable address (6 bytes)."]
87157
pub mod addrptr;
88-
#[doc = "SCRATCHPTR (rw) register accessor: an alias for `Reg<SCRATCHPTR_SPEC>`"]
89-
pub type SCRATCHPTR = crate::Reg<scratchptr::SCRATCHPTR_SPEC>;
158+
#[doc = "SCRATCHPTR (rw) register accessor: Pointer to a scratch data area used for temporary storage during resolution. A minimum of 3 bytes must be reserved.\n\nYou can [`read`](crate::Reg::read) this register and get [`scratchptr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`scratchptr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@scratchptr`] module"]
159+
#[doc(alias = "SCRATCHPTR")]
160+
pub type Scratchptr = crate::Reg<scratchptr::ScratchptrSpec>;
90161
#[doc = "Pointer to a scratch data area used for temporary storage during resolution. A minimum of 3 bytes must be reserved."]
91162
pub mod scratchptr;
92-
#[doc = "POWER (rw) register accessor: an alias for `Reg<POWER_SPEC>`"]
93-
pub type POWER = crate::Reg<power::POWER_SPEC>;
163+
#[doc = "POWER (rw) register accessor: Peripheral power control.\n\nYou can [`read`](crate::Reg::read) this register and get [`power::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`power::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@power`] module"]
164+
#[doc(alias = "POWER")]
165+
pub type Power = crate::Reg<power::PowerSpec>;
94166
#[doc = "Peripheral power control."]
95167
pub mod power;

pacs/nrf51-pac/src/aar/addrptr.rs

Lines changed: 15 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,23 @@
11
#[doc = "Register `ADDRPTR` reader"]
2-
pub struct R(crate::R<ADDRPTR_SPEC>);
3-
impl core::ops::Deref for R {
4-
type Target = crate::R<ADDRPTR_SPEC>;
5-
#[inline(always)]
6-
fn deref(&self) -> &Self::Target {
7-
&self.0
8-
}
9-
}
10-
impl From<crate::R<ADDRPTR_SPEC>> for R {
11-
#[inline(always)]
12-
fn from(reader: crate::R<ADDRPTR_SPEC>) -> Self {
13-
R(reader)
14-
}
15-
}
2+
pub type R = crate::R<AddrptrSpec>;
163
#[doc = "Register `ADDRPTR` writer"]
17-
pub struct W(crate::W<ADDRPTR_SPEC>);
18-
impl core::ops::Deref for W {
19-
type Target = crate::W<ADDRPTR_SPEC>;
20-
#[inline(always)]
21-
fn deref(&self) -> &Self::Target {
22-
&self.0
4+
pub type W = crate::W<AddrptrSpec>;
5+
impl core::fmt::Debug for R {
6+
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
7+
write!(f, "{}", self.bits())
238
}
249
}
25-
impl core::ops::DerefMut for W {
26-
#[inline(always)]
27-
fn deref_mut(&mut self) -> &mut Self::Target {
28-
&mut self.0
29-
}
30-
}
31-
impl From<crate::W<ADDRPTR_SPEC>> for W {
32-
#[inline(always)]
33-
fn from(writer: crate::W<ADDRPTR_SPEC>) -> Self {
34-
W(writer)
35-
}
36-
}
37-
impl W {
38-
#[doc = "Writes raw bits to the register."]
39-
#[inline(always)]
40-
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
41-
self.0.bits(bits);
42-
self
43-
}
44-
}
45-
#[doc = "Pointer to the resolvable address (6 bytes).\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [addrptr](index.html) module"]
46-
pub struct ADDRPTR_SPEC;
47-
impl crate::RegisterSpec for ADDRPTR_SPEC {
10+
impl W {}
11+
#[doc = "Pointer to the resolvable address (6 bytes).\n\nYou can [`read`](crate::Reg::read) this register and get [`addrptr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`addrptr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
12+
pub struct AddrptrSpec;
13+
impl crate::RegisterSpec for AddrptrSpec {
4814
type Ux = u32;
4915
}
50-
#[doc = "`read()` method returns [addrptr::R](R) reader structure"]
51-
impl crate::Readable for ADDRPTR_SPEC {
52-
type Reader = R;
53-
}
54-
#[doc = "`write(|w| ..)` method takes [addrptr::W](W) writer structure"]
55-
impl crate::Writable for ADDRPTR_SPEC {
56-
type Writer = W;
16+
#[doc = "`read()` method returns [`addrptr::R`](R) reader structure"]
17+
impl crate::Readable for AddrptrSpec {}
18+
#[doc = "`write(|w| ..)` method takes [`addrptr::W`](W) writer structure"]
19+
impl crate::Writable for AddrptrSpec {
20+
type Safety = crate::Unsafe;
5721
}
5822
#[doc = "`reset()` method sets ADDRPTR to value 0"]
59-
impl crate::Resettable for ADDRPTR_SPEC {
60-
#[inline(always)]
61-
fn reset_value() -> Self::Ux {
62-
0
63-
}
64-
}
23+
impl crate::Resettable for AddrptrSpec {}

0 commit comments

Comments
 (0)