Set of fixes #2
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
@ -10,8 +10,8 @@ jobs:
|
|||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
targets: "thumbv6m-none-eabi"
|
targets: "thumbv6m-none-eabi"
|
||||||
- run: cargo check --release
|
- run: cargo check --target thumbv6m-none-eabi --release
|
||||||
- run: cargo check --examples --release
|
- run: cargo check --target thumbv6m-none-eabi --examples --release
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Run Tests
|
name: Run Tests
|
||||||
@ -21,8 +21,9 @@ jobs:
|
|||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Install nextest
|
- name: Install nextest
|
||||||
uses: taiki-e/install-action@nextest
|
uses: taiki-e/install-action@nextest
|
||||||
- run: cargo nextest run --all-features
|
- run: cargo nextest run --all-features -p va108xx-hal
|
||||||
- run: cargo test --doc
|
# I think we can skip those on an embedded crate..
|
||||||
|
# - run: cargo test --doc -p va108xx-hal
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
name: Check formatting
|
name: Check formatting
|
||||||
@ -46,4 +47,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- run: cargo clippy -- -D warnings
|
with:
|
||||||
|
targets: "thumbv6m-none-eabi"
|
||||||
|
- run: cargo clippy --target thumbv6m-none-eabi -- -D warnings
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Vorago VA108xx Rust Support
|
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.
|
of devices.
|
||||||
|
|
||||||
## List of crates
|
## List of crates
|
||||||
|
6
automation/Jenkinsfile
vendored
6
automation/Jenkinsfile
vendored
@ -14,7 +14,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Clippy') {
|
stage('Clippy') {
|
||||||
steps {
|
steps {
|
||||||
sh 'cargo clippy'
|
sh 'cargo clippy --target thumbv6m-none-eabi'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Rustfmt') {
|
stage('Rustfmt') {
|
||||||
@ -24,7 +24,9 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Docs') {
|
stage('Docs') {
|
||||||
steps {
|
steps {
|
||||||
sh: cargo +nightly doc --all-features --config 'build.rustdocflags=["--cfg", "docs_rs"]'
|
sh """
|
||||||
|
cargo +nightly doc --all-features --config 'build.rustdocflags=["--cfg", "docs_rs"]'
|
||||||
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Check') {
|
stage('Check') {
|
||||||
|
@ -18,3 +18,4 @@ embedded-io = "0.6"
|
|||||||
version = "0.6"
|
version = "0.6"
|
||||||
path = "../va108xx-hal"
|
path = "../va108xx-hal"
|
||||||
features = ["rt"]
|
features = ["rt"]
|
||||||
|
|
||||||
|
@ -13,15 +13,15 @@
|
|||||||
#[rtic::app(device = pac, dispatchers = [OC4])]
|
#[rtic::app(device = pac, dispatchers = [OC4])]
|
||||||
mod app {
|
mod app {
|
||||||
use embedded_io::Write;
|
use embedded_io::Write;
|
||||||
|
use panic_rtt_target as _;
|
||||||
use rtic_monotonics::systick::Systick;
|
use rtic_monotonics::systick::Systick;
|
||||||
use rtic_sync::make_channel;
|
use rtic_sync::make_channel;
|
||||||
use panic_rtt_target as _;
|
|
||||||
use rtt_target::{rprintln, rtt_init_print};
|
use rtt_target::{rprintln, rtt_init_print};
|
||||||
use va108xx_hal::{
|
use va108xx_hal::{
|
||||||
time::Hertz,
|
|
||||||
gpio::PinsB,
|
gpio::PinsB,
|
||||||
pac,
|
pac,
|
||||||
prelude::*,
|
prelude::*,
|
||||||
|
time::Hertz,
|
||||||
uart::{self, IrqCfg, IrqResult, UartWithIrqBase},
|
uart::{self, IrqCfg, IrqResult, UartWithIrqBase},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -52,7 +52,11 @@ mod app {
|
|||||||
|
|
||||||
// Initialize the systick interrupt & obtain the token to prove that we did
|
// Initialize the systick interrupt & obtain the token to prove that we did
|
||||||
let systick_mono_token = rtic_monotonics::create_systick_token!();
|
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 mut dp = cx.device;
|
||||||
let gpiob = PinsB::new(&mut dp.sysconfig, Some(dp.ioconfig), dp.portb);
|
let gpiob = PinsB::new(&mut dp.sysconfig, Some(dp.ioconfig), dp.portb);
|
||||||
|
@ -43,3 +43,7 @@ default-features = false
|
|||||||
[features]
|
[features]
|
||||||
default = ["rt"]
|
default = ["rt"]
|
||||||
rt = ["va108xx/rt"]
|
rt = ["va108xx/rt"]
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docs_rs", "--generate-link-to-definition"]
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
|
#![cfg_attr(docs_rs, feature(doc_auto_cfg))]
|
||||||
|
|
||||||
pub use va108xx;
|
pub use va108xx;
|
||||||
pub use va108xx as pac;
|
pub use va108xx as pac;
|
||||||
|
@ -21,3 +21,7 @@ version = ">=0.6.15,<0.8"
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
rt = ["cortex-m-rt/device"]
|
rt = ["cortex-m-rt/device"]
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docs_rs", "--generate-link-to-definition"]
|
||||||
|
@ -3,6 +3,8 @@ svd2rust release can be generated by cloning the svd2rust [repository], checking
|
|||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
#![allow(non_snake_case)]
|
#![allow(non_snake_case)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
// Manually inserted.
|
||||||
|
#![cfg_attr(docs_rs, feature(doc_auto_cfg))]
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use core::ops::Deref;
|
use core::ops::Deref;
|
||||||
#[doc = r"Number available in the NVIC for configuring priority"]
|
#[doc = r"Number available in the NVIC for configuring priority"]
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
// Manually inserted.
|
||||||
|
#![allow(clippy::identity_op)]
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[doc = "Register block"]
|
#[doc = "Register block"]
|
||||||
pub struct RegisterBlock {
|
pub struct RegisterBlock {
|
||||||
|
@ -18,8 +18,6 @@ dummy-pin = "1"
|
|||||||
|
|
||||||
[dependencies.max116xx-10bit]
|
[dependencies.max116xx-10bit]
|
||||||
version = "0.3"
|
version = "0.3"
|
||||||
git = "https://egit.irs.uni-stuttgart.de/rust/max116xx-10bit"
|
|
||||||
branch = "bump-embedded-hal"
|
|
||||||
|
|
||||||
[dependencies.va108xx-hal]
|
[dependencies.va108xx-hal]
|
||||||
version = "0.6"
|
version = "0.6"
|
||||||
@ -39,3 +37,7 @@ version = "0.5"
|
|||||||
|
|
||||||
[dev-dependencies.panic-rtt-target]
|
[dev-dependencies.panic-rtt-target]
|
||||||
version = "0.1"
|
version = "0.1"
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docs_rs", "--generate-link-to-definition"]
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
|
#![cfg_attr(docs_rs, feature(doc_auto_cfg))]
|
||||||
|
|
||||||
pub mod button;
|
pub mod button;
|
||||||
pub mod leds;
|
pub mod leds;
|
||||||
|
Loading…
Reference in New Issue
Block a user