Skip to content

Commit 67af1bb

Browse files
committed
PAC update
1 parent 1a83f93 commit 67af1bb

Some content is hidden

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

95 files changed

+108
-1
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
targets: "thumbv6m-none-eabi"
1313
- run: cargo check --target thumbv6m-none-eabi
1414
- run: cargo check --target thumbv6m-none-eabi --examples
15+
- run: cargo check -p va108xx --target thumbv6m-none-eabi --all-features
16+
- run: cargo check -p va108xx-hal --target thumbv6m-none-eabi --features "defmt"
1517

1618
test:
1719
name: Run Tests

va108xx/CHANGELOG.md

Lines changed: 4 additions & 0 deletions

va108xx/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ categories = ["embedded", "no-std", "hardware-support"]
1313
[dependencies]
1414
cortex-m = "0.7"
1515
vcell = "0.1.3"
16+
defmt = "0.3"
1617
critical-section = { version = "1", optional = true }
1718

1819
[dependencies.cortex-m-rt]
@@ -21,6 +22,10 @@ version = ">=0.6.15,<0.8"
2122

2223
[features]
2324
rt = ["cortex-m-rt/device"]
25+
# Adds defmt support
26+
defmt = []
27+
# Adds Debug implementation
28+
debug = []
2429

2530
[package.metadata.docs.rs]
2631
all-features = true

va108xx/README.md

Lines changed: 6 additions & 0 deletions

va108xx/gen-helper.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fi
3030

3131
svdtools patch svd/va108xx-patch.yml
3232
# See https://github.com/rust-embedded/svd2rust/issues/830 for required re-export.
33-
${svd2rust_bin} --reexport-interrupt -i svd/va108xx.svd.patched
33+
${svd2rust_bin} --reexport-interrupt --impl-defmt defmt --impl-debug-feature debug -i svd/va108xx.svd.patched
3434

3535
result=$?
3636
if [ $result -ne 0 ]; then

va108xx/src/i2ca/address.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
pub type R = crate::R<AddressSpec>;
33
#[doc = "Register `ADDRESS` writer"]
44
pub type W = crate::W<AddressSpec>;
5+
#[cfg(feature = "debug")]
56
impl core::fmt::Debug for R {
67
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
78
write!(f, "{}", self.bits())

va108xx/src/i2ca/clktolimit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
pub type R = crate::R<ClktolimitSpec>;
33
#[doc = "Register `CLKTOLIMIT` writer"]
44
pub type W = crate::W<ClktolimitSpec>;
5+
#[cfg(feature = "debug")]
56
impl core::fmt::Debug for R {
67
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
78
write!(f, "{}", self.bits())

va108xx/src/i2ca/cmd.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
pub type R = crate::R<CmdSpec>;
33
#[doc = "Register `CMD` writer"]
44
pub type W = crate::W<CmdSpec>;
5+
#[cfg(feature = "debug")]
56
impl core::fmt::Debug for R {
67
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
78
write!(f, "{}", self.bits())

va108xx/src/i2ca/data.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
pub type R = crate::R<DataSpec>;
33
#[doc = "Register `DATA` writer"]
44
pub type W = crate::W<DataSpec>;
5+
#[cfg(feature = "debug")]
56
impl core::fmt::Debug for R {
67
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
78
write!(f, "{}", self.bits())

va108xx/src/i2ca/perid.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#[doc = "Register `PERID` reader"]
22
pub type R = crate::R<PeridSpec>;
3+
#[cfg(feature = "debug")]
34
impl core::fmt::Debug for R {
45
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
56
write!(f, "{}", self.bits())

0 commit comments

Comments
 (0)