Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
39b58a8
changed!: Gate undocumented chip features behind the `undoc-features`…
jbeaurivage Nov 16, 2025
feab341
chore: Remove deprecated warning in aes module (#957)
jbeaurivage Nov 17, 2025
90b9396
feat: Add PB02 and PB03 as undocumented I2C pads for SAMD21 (#958)
wt Nov 18, 2025
a06a4b9
docs: Document newly undoc I2C-capable pins (PB02,PB03) (#960)
jbeaurivage Nov 19, 2025
025e76a
chore: release (#947)
github-actions[bot] Nov 20, 2025
20b17d2
deps(circuit-playground-express): Update dependencies and HAL to 0.23…
wt Nov 20, 2025
48102c1
chore(circuit_playground_express): release v0.12.0 (#961)
github-actions[bot] Nov 20, 2025
03d5366
chore(ci): Make all shebangs for shell scripts consistent. (#964)
wt Nov 23, 2025
3fc3c05
deps(circuit-playground-express): Add RTIC support for CPE (#966)
wt Nov 25, 2025
601908a
deps(grand_central_m4): Bump HAL dependency to 0.23.0 (#968)
supersimple33 Dec 9, 2025
13fbc7a
chore(ci): bump actions/checkout from 5 to 6 (#965)
dependabot[bot] Dec 9, 2025
2c4a772
chore(deps): bump actions/download-artifact from 6 to 7 (#972)
dependabot[bot] Dec 15, 2025
2deb49d
chore(deps): bump actions/upload-artifact from 5 to 6 (#973)
dependabot[bot] Dec 15, 2025
5b5a925
Improve cpe examples
wt Nov 20, 2025
3a30927
chore: fix a few clippy errors for circuit-playground-express
wt Dec 28, 2025
7baae6b
feat(i2c): add I2C capabilities to labelled pins for arduino_nano33io…
Dox5 Dec 29, 2025
a1754c5
chore: release (#974)
github-actions[bot] Dec 29, 2025
ca2ff93
deps(nano33iot)!: Update nano33iot HAL dependency to 0.23.0 (#971)
Dox5 Dec 29, 2025
d49d3fd
chore(arduino_nano33iot): release v0.8.0 (#976)
github-actions[bot] Dec 29, 2025
09a2188
fix(pwm): Fix for off-by-one in get_max_duty() (#959)
codepainters Jan 13, 2026
ef02fe3
feat(usb): USB allocation rework and simplification (#963)
rnd-ash Feb 6, 2026
8f84644
fix(dmac): Check+document that the DMAC transfers are smaller than u1…
jbeaurivage Feb 20, 2026
8788248
fix(uart): Fix embedded_io::Read::read impl (#983)
jbeaurivage Feb 20, 2026
7f108ae
chore: release (#979)
github-actions[bot] Feb 20, 2026
8c7a04f
fix(adc): ADC clearing flags when reading value & make it somewhat co…
nicolube Feb 25, 2026
a04f33a
chore(clippy): New lint doesn't like nesting if in match (#993)
QuartzShard Mar 2, 2026
74fb810
chore(deps): bump actions/upload-artifact from 6 to 7 (#994)
dependabot[bot] Mar 2, 2026
ef547e6
chore(deps): bump actions/download-artifact from 7 to 8 (#995)
dependabot[bot] Mar 2, 2026
ad76394
chore: release (#996)
github-actions[bot] Mar 4, 2026
c23e468
fix(rtc): disable compare interrupt instead of stopping the RTC count…
QuartzShard Mar 23, 2026
f0ed5b4
Make ADC `check_read_discard` private again (#1003)
rnd-ash Mar 23, 2026
eccc9c1
deps(qt_py_m0): Update QT PY M0 to latest HAL version (#970)
gingershaped Mar 23, 2026
9320d05
deps(itsybitsy_m4): Switch itsybitsy_m4 BSP to latest HAL release. (#…
codepainters Mar 24, 2026
94308e9
Update DMAC documentation (#1005)
rnd-ash May 12, 2026
a3ba6be
Fix nightly clippy lint (#1006)
jbeaurivage May 12, 2026
610a5e1
feat(usb): Enable Multi-Packet Rx and Tx (#1009)
rnd-ash May 31, 2026
e3ac593
fix(timer): Fix misuse of ctrlbset and ctrlbclr (#1001)
rnd-ash May 31, 2026
1407891
chore: Introduce more peripheral free methods for consistency (#1000)
rnd-ash May 31, 2026
03c84d7
Merge thumbv6m and thumbv7em clock modules
ianrrees Jul 21, 2025
04ee5aa
TODO Hack to compile, nightly only
ianrrees Jul 22, 2025
5da868d
Work towards clock v2 GCLK and PCLK for thumbv6
bradleyharden Dec 28, 2022
241e08d
TODO Another hack to compile
ianrrees Jul 22, 2025
2d92ffa
stash 2 xosc32k
ianrrees Jul 22, 2025
07cfd7e
stash 2 xosc
ianrrees Jul 22, 2025
8c81ede
stash 2 osculp32k
ianrrees Jul 22, 2025
1fce97f
stash 2 reset
ianrrees Jul 22, 2025
28afdb3
TODO squash warnings
ianrrees Jul 22, 2025
2f3e816
stash 2 pclk
ianrrees Jul 22, 2025
1f272cf
stash 2 gclk
ianrrees Jul 22, 2025
1d5948d
stash 2 dpll
ianrrees Jul 22, 2025
848a451
stash 2 dfll
ianrrees Jul 22, 2025
c110413
Only enable RTC for D5x
ianrrees Jul 22, 2025
82b73eb
WIP stash 2 enable v2 for thumbv6m
ianrrees Jul 22, 2025
f0bf86e
stash 3 ahb
ianrrees Jul 22, 2025
283a2b1
Rename Pac -> Pac0
ianrrees Jul 23, 2025
feb90c2
stash 3 pclk
ianrrees Jul 23, 2025
c9582aa
stash 3 dpll
ianrrees Jul 22, 2025
1711acc
TODO Hacky disable of DPLL DCO for thumbv6m
ianrrees Jul 23, 2025
5349550
stash 3 apb - needs types first
ianrrees Jul 23, 2025
4ab564b
More work on ahb
ianrrees Jul 23, 2025
b50ffd5
stash 3 types
ianrrees Jul 23, 2025
b0b472d
stash 3 pclk
ianrrees Jul 23, 2025
d327af0
stash 3 apb
ianrrees Jul 23, 2025
809d331
stash 4 reset. TODO: Remove thumbv6 from v7 file
ianrrees Jul 23, 2025
56d4017
TODO notes
ianrrees Jul 24, 2025
a0e4cd9
stash 4 APB startup state using macro
ianrrees Jul 24, 2025
51729d4
Fixes in APB for D11/D21
ianrrees Jul 24, 2025
1ecd022
partial! stash 4 - gclk
ianrrees Jul 25, 2025
c559121
Remove with_gclk_max_expr!()
ianrrees Jul 25, 2025
18bc0ab
stash 5 - osc
ianrrees Jul 24, 2025
428064f
osc fixes and partial stash 5 - reset
ianrrees Jul 25, 2025
a702058
stash 4 - dfll
ianrrees Jul 25, 2025
9947b96
fixup gclk
ianrrees Jul 26, 2025
6dc113f
stash 4 - types
ianrrees Jul 26, 2025
3827acb
stash 4 - pclk
ianrrees Jul 26, 2025
9e188d4
stash 4 - xosc and xosc32k
ianrrees Jul 27, 2025
2e74a2e
Remove nvmctrl from GCLK init f/u stash 4 reset
ianrrees Jul 27, 2025
2cd47c2
Fix thumbv6 reset detail
ianrrees Jul 27, 2025
4c5afb9
more stash 4 - gclk
ianrrees Jul 27, 2025
c547c3b
stash 5 - osc32k
ianrrees Jul 24, 2025
b3313a6
stash 5 - reset, stash 5 - osculp32k
ianrrees Jul 27, 2025
52555a6
remainder of stash 4 - gclk
ianrrees Jul 27, 2025
bdf83f5
Add xosc to devices table
ianrrees Jul 28, 2025
8e01658
stash 5 - dpll
ianrrees Jul 28, 2025
086b616
minor doc fix from stash 5 - finer-grained configuration
ianrrees Jul 28, 2025
df290cd
stash 5 - pclk
ianrrees Jul 28, 2025
521ae4c
stash 5 - xosc32k
ianrrees Jul 28, 2025
209e229
stash 4 - gpio
ianrrees Jul 28, 2025
0c39814
fix build for SAMD11
ianrrees Jul 28, 2025
0a21f5e
L variants don't have xosc32k
ianrrees Jul 28, 2025
2a3f6a1
Fixes for SAMD21E
ianrrees Jul 28, 2025
13872c2
Fix builds for smaller SAMD51
ianrrees Jul 28, 2025
23929ca
Build on stable Rust
ianrrees Jul 29, 2025
bbdfaae
Update Feather M4 examples
ianrrees Jul 29, 2025
47c074f
Deduplicate feather_m4 and metro_m4 blinky_rtc example
ianrrees Jul 29, 2025
a81e207
Deduplicate feather_m4 and metro_m4 adc example
ianrrees Jul 29, 2025
640744b
Update pygamer blinky_rtic example
ianrrees Jul 29, 2025
0c08af4
Update atsame54_xpro examples
ianrrees Jul 30, 2025
9d1ec8a
dfll tidy
ianrrees Jul 30, 2025
11f357c
TEMPORARY enable clock v2 for thumbv6 in delay
ianrrees Jul 30, 2025
ac25db8
Metro M0 blinky_basic update to clock v2
ianrrees Jul 30, 2025
24a944f
Clippy
ianrrees Jul 30, 2025
330fd25
Fix polarity in DPLL wait_enabled()
ianrrees Aug 1, 2025
c332589
Fix missing ID field in GCLK divider selection
ianrrees Aug 1, 2025
b67d9d7
GCLK refactor
ianrrees Aug 1, 2025
e82dde2
GCLK refactor to update entire GENCTRL
ianrrees Aug 9, 2025
2dee8da
bsp(atsame54_xpro): Fix example
ianrrees Aug 9, 2025
77d032a
Documentation warnings for SAMD21G
ianrrees Aug 16, 2025
80c8d4d
More doc fixes
ianrrees Aug 16, 2025
1ff22a9
Formatting, minor fix in /rustfmt.sh
ianrrees Aug 16, 2025
22815d1
Unify ADC setup (Remove V1 clock setup)
rnd-ash Nov 27, 2025
e10df03
PCLK Freq check D21 ADC
rnd-ash Nov 27, 2025
3afdf16
feat(clock)!: Dynamic PCLK source ID.
jbeaurivage Jan 17, 2026
5adb203
Also builds on thumbv6m targets!
jbeaurivage Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build-bsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout sources
uses: actions/checkout@v5
uses: actions/checkout@v6
- id: set-matrix
uses: ./.github/actions/list-BSPs

Expand All @@ -26,7 +26,7 @@ jobs:
matrix: ${{fromJson(needs.setup.outputs.matrix)}}
steps:
- name: Checkout sources
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Install Rust
run: |
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
$(${clippy_invocation})

- name: Done
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
# name needs to be unique in the workspace
name: "${{ matrix.bsp.name }}-${{ matrix.toolchain }}"
Expand All @@ -71,7 +71,7 @@ jobs:
needs: [setup, build]
steps:
- name: Download artifacts
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
path: successful-jobs
- name: Do checks
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-hal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout sources
uses: actions/checkout@v5
uses: actions/checkout@v6
- id: set-matrix
uses: ./.github/actions/list-HAL-variants

Expand All @@ -20,7 +20,7 @@ jobs:
matrix: ${{fromJson(needs.setup.outputs.matrix)}}
steps:
- name: Checkout sources
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Install Rust
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Install Rust
run: |
rustup set profile minimal
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Install Rust
run: |
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
echo ' </body>' >> "${docs_path}/index.html"
echo '</html>' >> "${docs_path}/index.html"
- name: Checkout pages branch
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
ref: gh-pages
path: gh-pages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Install Rust
run: |
rustup set profile minimal
Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ members = [
"pac/*",
"boards/*",
]
# Fragments of example files, referenced by `include!()` from BSP examples
exclude = ["boards/examples"]

[profile.dev]
debug = true
Expand Down
52 changes: 42 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ This repository holds various crates that support/enable working with Microchip

The Hardware Abstraction Layer (HAL - [![Crates.io](https://img.shields.io/crates/v/atsamd_hal.svg)](https://crates.io/crates/atsamd_hal)) crate encodes a type-safe layer over the raw PACs. This crate implements traits specified by the [embedded-hal](https://github.com/rust-embedded/embedded-hal) project, making it compatible with various drivers in the embedded Rust ecosystem. Cargo features are used to enable support for specific hardware variations and features. Online documentation for commonly-used feature sets is provided:

| Chip family | Documented features |
|:------------|:----------------------------------|
| [samd11c] | samd11c dma defmt async |
| [samd11d] | samd11d dma defmt async |
| [samd21g] | samd21g usb dma defmt async |
| [samd21j] | samd21j usb dma defmt async |
| [samd51g] | samd51g usb sdmmc dma defmt async |
| [samd51j] | samd51j usb sdmmc dma defmt async |
| [samd51n] | samd51n usb sdmmc dma defmt async |
| [samd51p] | samd51p usb sdmmc dma defmt async |
| Chip family | Documented features |
|:------------|:-------------------------------------------------|
| [samd11c] | samd11c dma defmt async undoc-features |
| [samd11d] | samd11d dma defmt async undoc-features |
| [samd21g] | samd21g usb dma defmt async undoc-features |
| [samd21j] | samd21j usb dma defmt async undoc-features |
| [samd51g] | samd51g usb sdmmc dma defmt async undoc-features |
| [samd51j] | samd51j usb sdmmc dma defmt async undoc-features |
| [samd51n] | samd51n usb sdmmc dma defmt async undoc-features |
| [samd51p] | samd51p usb sdmmc dma defmt async undoc-features |

[samd11c]: https://atsamd-rs.github.io/atsamd/samd11c/thumbv6m-none-eabi/doc/atsamd_hal/index.html
[samd11d]: https://atsamd-rs.github.io/atsamd/samd11d/thumbv6m-none-eabi/doc/atsamd_hal/index.html
Expand Down Expand Up @@ -153,6 +153,38 @@ If you'd like to build all the same things that the CI would build but on your l
$ ./build-all.py
```

## Undocumented chip features

Some development board manufacturers, such as Adafruit, sell some boards with pin multiplexing configurations that aren't
explicitly allowed by the datasheet. As a convenience, we offer the option to enable these undocumented features by opting
into the `undoc-features` Cargo feature. Note that even though these have shown to work in at least some situations, we do not
provide any guarantees with respect to those.

Currently, we provide these features undocumented features:

### SAMD21:

* Mark `PA00` as I2C-capable according to `circuit_playground_express`.

* Mark `PA01` as I2C-capable according to `circuit_playground_express`.

* Mark `PB02` as I2C-capable according to `circuit_playground_express`.

* Mark `PB03` as I2C-capable according to `circuit_playground_express`.

### SAMx5x devices:
* `UndocIoSet1`: Implement an undocumented `IoSet` for PA16, PA17, PB22 &
PB23 configured for `Sercom1`. The `pygamer` & `feather_m4` use this
combination, but it is not listed as valid in the datasheet.

* `UndocIoSet2`: Implement an undocumented `IoSet` for PA00, PA01, PB22 &
PB23 configured for `Sercom1`. The `itsybitsy_m4` uses this combination,
but it is not listed as valid in the datasheet.

* Mark `PB02` as I2C-capable according to `metro_m4`.

* Mark `PB03` as I2C-capable according to `metro_m4`.

## Running and debugging firmware on target hardware

See our wiki page about [loading code onto the device](https://github.com/atsamd-rs/atsamd/wiki/Loading-code-onto-the-device).
Expand Down
12 changes: 9 additions & 3 deletions atsamd-hal-macros/devices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ families:
- serial-numbers
- dsu
- clock
- gclk
- xosc32k
- xosc: { count: 1 }
- gclk: { count: 6 }
- pm
- sysctrl
- wdt
Expand Down Expand Up @@ -53,7 +55,9 @@ families:
- serial-numbers
- dsu
- clock
- gclk
- xosc32k: { except: ["samd21el", "samd21gl"] }
- xosc: { count: 1 }
- gclk: { count: 8 }
- pm
- sysctrl
- wdt
Expand Down Expand Up @@ -96,7 +100,9 @@ families:
- cmcc
- dsu
- clock
- gclk
- xosc32k
- xosc: { count: 2 }
- gclk: { count: 12 }
- mclk
- rstc
- ramecc
Expand Down
6 changes: 6 additions & 0 deletions boards/arduino_nano33iot/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.8.0](https://github.com/atsamd-rs/atsamd/compare/arduino_nano33iot-0.7.2...arduino_nano33iot-0.8.0) - 2025-12-29

### Dependencies

- *(nano33iot)* [**breaking**] Update nano33iot HAL dependency to 0.23.0 ([#971](https://github.com/atsamd-rs/atsamd/pull/971))

## [0.7.2](https://github.com/atsamd-rs/atsamd/compare/arduino_nano33iot-0.7.1...arduino_nano33iot-0.7.2) - 2024-10-17

### Refactored
Expand Down
18 changes: 9 additions & 9 deletions boards/arduino_nano33iot/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "arduino_nano33iot"
version = "0.7.2"
version = "0.8.0"
authors = ["Gus Wynn <guswynn@gmail.com>"]
description = "Board Support crate for the Arduino Nano 33 IOT"
keywords = ["no-std", "arm", "cortex-m", "embedded-hal", "arduino"]
Expand All @@ -15,11 +15,12 @@ version = "0.7"
optional = true

[dependencies.atsamd-hal]
version = "0.14"
version = "0.23.0"
default-features = false
features = ["undoc-features"]

[dependencies.usb-device]
version = "0.2"
version = "0.3.2"
optional = true

[dependencies.rand]
Expand All @@ -28,10 +29,10 @@ default-features = false
features = ["small_rng"]

[dev-dependencies]
cortex-m = "0.7"
usbd-serial = "0.1"
panic-halt = "0.2"
panic-semihosting = "0.5"
cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
usbd-serial = "0.2.2"
panic-halt = "1.0.0"
panic-semihosting = "0.6"
embedded-graphics = "0.7"
st7735-lcd = "0.8"
ssd1306 = { version = "0.7", features = ["graphics"] }
Expand All @@ -41,7 +42,6 @@ ssd1306 = { version = "0.7", features = ["graphics"] }
default = ["rt", "atsamd-hal/samd21g"]
rt = ["cortex-m-rt", "atsamd-hal/samd21g-rt"]
usb = ["atsamd-hal/usb", "usb-device"]
unproven = ["atsamd-hal/unproven"]
use_semihosting = []

# for cargo flash
Expand All @@ -53,7 +53,7 @@ name = "blinky_basic"

[[example]]
name = "usb_logging"
required-features = ["usb", "unproven"]
required-features = ["usb"]

[[example]]
name = "serial"
Expand Down
10 changes: 5 additions & 5 deletions boards/arduino_nano33iot/examples/blinky_basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ fn main() -> ! {
let mut peripherals = Peripherals::take().unwrap();
let core = CorePeripherals::take().unwrap();
let mut clocks = GenericClockController::with_internal_32kosc(
peripherals.GCLK,
&mut peripherals.PM,
&mut peripherals.SYSCTRL,
&mut peripherals.NVMCTRL,
peripherals.gclk,
&mut peripherals.pm,
&mut peripherals.sysctrl,
&mut peripherals.nvmctrl,
);
let pins = bsp::Pins::new(peripherals.PORT);
let pins = bsp::Pins::new(peripherals.port);
let mut led: bsp::Led = pins.led_sck.into();
let mut delay = Delay::new(core.SYST, &mut clocks);

Expand Down
17 changes: 8 additions & 9 deletions boards/arduino_nano33iot/examples/i2c_ssd1306.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use hal::clock::GenericClockController;
use hal::delay::Delay;
use hal::pac::{CorePeripherals, Peripherals};
use hal::prelude::*;
use hal::time::KiloHertz;

use ssd1306::{prelude::*, I2CDisplayInterface, Ssd1306};

Expand All @@ -42,21 +41,21 @@ fn main() -> ! {
let mut peripherals = Peripherals::take().unwrap();
let core = CorePeripherals::take().unwrap();
let mut clocks = GenericClockController::with_internal_32kosc(
peripherals.GCLK,
&mut peripherals.PM,
&mut peripherals.SYSCTRL,
&mut peripherals.NVMCTRL,
peripherals.gclk,
&mut peripherals.pm,
&mut peripherals.sysctrl,
&mut peripherals.nvmctrl,
);
let pins = bsp::Pins::new(peripherals.PORT);
let pins = bsp::Pins::new(peripherals.port);
let mut delay = Delay::new(core.SYST, &mut clocks);

delay.delay_ms(BOOT_DELAY_MS);

let i2c = bsp::i2c_master(
&mut clocks,
KiloHertz(400),
peripherals.SERCOM4,
&mut peripherals.PM,
400.kHz(),
peripherals.sercom4,
&mut peripherals.pm,
pins.sda,
pins.scl,
);
Expand Down
16 changes: 8 additions & 8 deletions boards/arduino_nano33iot/examples/serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ fn main() -> ! {
let mut peripherals = Peripherals::take().unwrap();
let core = CorePeripherals::take().unwrap();
let mut clocks = GenericClockController::with_internal_32kosc(
peripherals.GCLK,
&mut peripherals.PM,
&mut peripherals.SYSCTRL,
&mut peripherals.NVMCTRL,
peripherals.gclk,
&mut peripherals.pm,
&mut peripherals.sysctrl,
&mut peripherals.nvmctrl,
);
let pins = bsp::Pins::new(peripherals.PORT);
let pins = bsp::Pins::new(peripherals.port);
let mut delay = Delay::new(core.SYST, &mut clocks);

let mut uart = bsp::uart(
&mut clocks,
9600.hz(),
peripherals.SERCOM5,
&mut peripherals.PM,
9600.Hz(),
peripherals.sercom5,
&mut peripherals.pm,
pins.rx,
pins.tx,
);
Expand Down
17 changes: 8 additions & 9 deletions boards/arduino_nano33iot/examples/spi_st7735.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use hal::clock::GenericClockController;
use hal::delay::Delay;
use hal::pac::{CorePeripherals, Peripherals};
use hal::prelude::*;
use hal::time::MegaHertz;

use embedded_graphics::{
image::{Image, ImageRaw, ImageRawLE},
Expand All @@ -35,21 +34,21 @@ fn main() -> ! {
let mut peripherals = Peripherals::take().unwrap();
let core = CorePeripherals::take().unwrap();
let mut clocks = GenericClockController::with_internal_32kosc(
peripherals.GCLK,
&mut peripherals.PM,
&mut peripherals.SYSCTRL,
&mut peripherals.NVMCTRL,
peripherals.gclk,
&mut peripherals.pm,
&mut peripherals.sysctrl,
&mut peripherals.nvmctrl,
);
let pins = bsp::Pins::new(peripherals.PORT);
let pins = bsp::Pins::new(peripherals.port);
let mut delay = Delay::new(core.SYST, &mut clocks);

delay.delay_ms(BOOT_DELAY_MS);

let spi = bsp::spi_master(
&mut clocks,
MegaHertz(16),
peripherals.SERCOM1,
&mut peripherals.PM,
16.MHz(),
peripherals.sercom1,
&mut peripherals.pm,
pins.led_sck,
pins.mosi,
pins.miso,
Expand Down
Loading