Skip to content

Commit

Permalink
Set of fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Jun 16, 2024
1 parent 42c7f0d commit 1d3aeeb
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 25 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
targets: "thumbv6m-none-eabi"
- run: cargo check --release
- run: cargo check --examples --release
- run: cargo check --target thumbv6m-none-eabi --release
- run: cargo check --target thumbv6m-none-eabi --examples --release

test:
name: Run Tests
Expand All @@ -21,8 +21,8 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- name: Install nextest
uses: taiki-e/install-action@nextest
- run: cargo nextest run --all-features
- run: cargo test --doc
- run: cargo nextest run --all-features -p va108xx-hal
- run: cargo test --doc -p va108xx-hal

fmt:
name: Check formatting
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Vorago VA108xx Rust Support
=========

This crate collection provided support to write Rust applications for the VA108XX family
This crate collection provides support to write Rust applications for the VA108XX family
of devices.

## List of crates
Expand Down
30 changes: 15 additions & 15 deletions automation/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,29 @@ pipeline {
}
}
stage('Clippy') {
steps {
sh 'cargo clippy'
}
steps {
sh 'cargo clippy'
}
}
stage('Rustfmt') {
steps {
sh 'cargo fmt'
}
steps {
sh 'cargo fmt'
}
}
stage('Docs') {
steps {
sh: cargo +nightly doc --all-features --config 'build.rustdocflags=["--cfg", "docs_rs"]'
}
steps {
sh 'cargo +nightly doc --all-features --config 'build.rustdocflags=["--cfg", "docs_rs"]'
}
}
stage('Check') {
steps {
sh 'cargo check --target thumbv6m-none-eabi'
}
steps {
sh 'cargo check --target thumbv6m-none-eabi'
}
}
stage('Check Examples') {
steps {
sh 'cargo check --target thumbv6m-none-eabi --examples'
}
steps {
sh 'cargo check --target thumbv6m-none-eabi --examples'
}
}
}
}
1 change: 1 addition & 0 deletions board-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ embedded-io = "0.6"
version = "0.6"
path = "../va108xx-hal"
features = ["rt"]

10 changes: 7 additions & 3 deletions examples/simple/examples/uart-irq-rtic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
#[rtic::app(device = pac, dispatchers = [OC4])]
mod app {
use embedded_io::Write;
use panic_rtt_target as _;
use rtic_monotonics::systick::Systick;
use rtic_sync::make_channel;
use panic_rtt_target as _;
use rtt_target::{rprintln, rtt_init_print};
use va108xx_hal::{
time::Hertz,
gpio::PinsB,
pac,
prelude::*,
time::Hertz,
uart::{self, IrqCfg, IrqResult, UartWithIrqBase},
};

Expand Down Expand Up @@ -52,7 +52,11 @@ mod app {

// Initialize the systick interrupt & obtain the token to prove that we did
let systick_mono_token = rtic_monotonics::create_systick_token!();
Systick::start(cx.core.SYST, Hertz::from(50.MHz()).raw(), systick_mono_token);
Systick::start(
cx.core.SYST,
Hertz::from(50.MHz()).raw(),
systick_mono_token,
);

let mut dp = cx.device;
let gpiob = PinsB::new(&mut dp.sysconfig, Some(dp.ioconfig), dp.portb);
Expand Down
4 changes: 4 additions & 0 deletions va108xx-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ default-features = false
[features]
default = ["rt"]
rt = ["va108xx/rt"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docs_rs", "--generate-link-to-definition"]
1 change: 1 addition & 0 deletions va108xx-hal/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![no_std]
#![cfg_attr(docs_rs, feature(doc_auto_cfg))]

pub use va108xx;
pub use va108xx as pac;
Expand Down
4 changes: 4 additions & 0 deletions va108xx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ version = ">=0.6.15,<0.8"

[features]
rt = ["cortex-m-rt/device"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docs_rs", "--generate-link-to-definition"]
2 changes: 2 additions & 0 deletions va108xx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ svd2rust release can be generated by cloning the svd2rust [repository], checking
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![no_std]
// Manually inserted.
#![cfg_attr(docs_rs, feature(doc_auto_cfg))]
use core::marker::PhantomData;
use core::ops::Deref;
#[doc = r"Number available in the NVIC for configuring priority"]
Expand Down
3 changes: 3 additions & 0 deletions va108xx/src/porta.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Manually inserted.
#![allow(clippy::identity_op)]

#[repr(C)]
#[doc = "Register block"]
pub struct RegisterBlock {
Expand Down
6 changes: 4 additions & 2 deletions vorago-reb1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ dummy-pin = "1"

[dependencies.max116xx-10bit]
version = "0.3"
git = "https://egit.irs.uni-stuttgart.de/rust/max116xx-10bit"
branch = "bump-embedded-hal"

[dependencies.va108xx-hal]
version = "0.6"
Expand All @@ -39,3 +37,7 @@ version = "0.5"

[dev-dependencies.panic-rtt-target]
version = "0.1"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docs_rs", "--generate-link-to-definition"]
1 change: 1 addition & 0 deletions vorago-reb1/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![no_std]
#![cfg_attr(docs_rs, feature(doc_auto_cfg))]

pub mod button;
pub mod leds;
Expand Down

0 comments on commit 1d3aeeb

Please sign in to comment.