Skip to content

Commit

Permalink
Merge branch 'development' into issue/56/remove-pacs-from-this-reposi…
Browse files Browse the repository at this point in the history
…tory
  • Loading branch information
michalfita authored Dec 17, 2023
2 parents f4bb9b0 + ec0a398 commit b31df1b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 10 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:

jobs:
setup:
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand All @@ -24,6 +25,7 @@ jobs:
feature_matrix: ${{ steps.features.outputs.feature_matrix }}

build:
if: github.event.pull_request.head.repo.full_name != github.repository
needs: setup
runs-on: ubuntu-latest
strategy:
Expand All @@ -39,7 +41,28 @@ jobs:
- name: Build HAL for ${{ matrix.pac }}
run: cargo check --package atsamx7x-hal --features ${{ matrix.pac }},unproven

build-latest:
if: github.event.pull_request.head.repo.full_name != github.repository
needs: setup
runs-on: ubuntu-latest
strategy:
matrix:
pac: ${{ fromJson(needs.setup.outputs.pac_matrix) }}
continue-on-error: true # we let this fail and carry on, but GH UI is poor not showing amber like other CIs
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Update toolchain
run: rustup update
- name: Specify toolchain
run: rustup override set stable
- name: Install Rust (thumbv7em)
run: rustup target add thumbv7em-none-eabihf
- name: Build HAL for ${{ matrix.pac }}
run: cargo check --package atsamx7x-hal --features ${{ matrix.pac }},unproven

build-features:
if: github.event.pull_request.head.repo.full_name != github.repository
needs: setup
runs-on: ubuntu-latest
strategy:
Expand All @@ -56,6 +79,7 @@ jobs:
run: cargo check --package atsamx7x-hal --features ${{ matrix.features }},samv71q21b,unproven

board-examples:
if: github.event.pull_request.head.repo.full_name != github.repository
needs: setup
runs-on: ubuntu-latest
strategy:
Expand All @@ -74,6 +98,7 @@ jobs:
cargo check --examples
clippy-hal:
if: github.event.pull_request.head.repo.full_name != github.repository
needs: build
runs-on: ubuntu-latest
steps:
Expand All @@ -89,6 +114,7 @@ jobs:
run: cargo clippy --package atsamx7x-hal --no-deps --features samv71q21b,unproven,reconfigurable-system-pins -- --deny warnings

clippy-examples:
if: github.event.pull_request.head.repo.full_name != github.repository
needs: [setup, build, board-examples]
runs-on: ubuntu-latest
strategy:
Expand All @@ -109,6 +135,7 @@ jobs:
cargo clippy --examples --no-deps -- --deny warnings
docs:
if: github.event.pull_request.head.repo.full_name != github.repository
needs: build
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@

### Added

- [Integration](https://crates.io/crates/mcan-core) with the
[`mcan`](https://crates.io/crates/mcan) crate.
- [Integration](https://crates.io/crates/mcan-core) with the [`mcan`](https://crates.io/crates/mcan) crate.
- Implementation of blocking::i2c::Transactional trait from [embedded-hal](https://crates.io/crates/embedded-hal) for TWI device.

### Changed
- Remove `rust-toolchain.toml` and control MSRV from .github/workflow/ files instead.
- Update `cortex-m-rt` version in examples to `0.7.3`.
- Switched from AFE0_AD6 to AFE0_AD8 for the atsamv71_xult board ADC example code.

### Removed
- Huge generated source code for PACs removed, new location for them [`atsamx7x-pac`](/atsams-rs/atsamx7x-pac) (user side generated)

### Fixed
- Examples now build and link again
- [#62] Remove ambiguous reexports from `src/serial/mod.rs`.
- TWIHS: Fix issue with clock frequency calculation.

## [v0.4.2] 2022-11-06
Expand Down
6 changes: 3 additions & 3 deletions boards/atsamv71_xult/examples/periodic_adc_sample.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mod app {
#[local]
struct Local {
afec: Afec<Afec0>,
pin: Pin<PA17, Input>,
pin: Pin<PA19, Input>,
}

#[init]
Expand Down Expand Up @@ -65,7 +65,7 @@ mod app {
);

let afec = Afec::new_afec0(ctx.device.AFEC0, &mut mck).unwrap();
let pin = banka.pa17.into_input(PullDir::PullUp);
let pin = banka.pa19.into_input(PullDir::PullUp);

adc_sample::spawn().unwrap();

Expand All @@ -77,7 +77,7 @@ mod app {
let adc_sample::LocalResources { afec, pin } = ctx.local;

let v: f32 = afec.read(pin).unwrap();
rprintln!("PA17 (channel 6) = {:.2}V", v);
rprintln!("PA19 (channel 6) = {:.2}V", v);

adc_sample::spawn_after(1.secs()).unwrap();
}
Expand Down
4 changes: 0 additions & 4 deletions hal/src/serial/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,11 @@ impl ExtBpsU32 for u32 {
}

pub mod uart;
pub use uart::*;

pub mod usart;
pub use usart::*;

pub mod twi;
pub use twi::*;

#[cfg(not(feature = "pins-64"))]
pub mod spi;
#[cfg(not(feature = "pins-64"))]
pub use spi::*;
2 changes: 1 addition & 1 deletion hal/src/serial/usart/uart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::ehal::{self, blocking};
pub enum UartError {
/// A frame's stop bit was read as zero.
Framing,
/// Parity check of the recived frame failed.
/// Parity check of the received frame failed.
Parity,
/// A word was received before the previous word was read.
Overrun,
Expand Down

0 comments on commit b31df1b

Please sign in to comment.