#hardware-abstraction #hal #cortex-m #arm #py32f0xx

no-std py32f0xx-hal

Peripheral access API for py32F0 series microcontrollers

4 releases (2 breaking)

new 0.2.0 Jan 22, 2025
0.1.1 Oct 10, 2024
0.1.0 Sep 27, 2024
0.0.1 Jun 10, 2023

#141 in Embedded development

Download history 154/week @ 2024-10-06 21/week @ 2024-10-13 1/week @ 2024-10-20 3/week @ 2024-12-08 107/week @ 2025-01-19

107 downloads per month

0BSD license

1MB
21K SLoC

py32f0xx-hal

[HAL] for the py32f0xx family of microcontrollers

NOTE: The function's are not fully tested, and you are responsible for any problems with the use of this repository.

Known issues: - I2C master/slave not tested - rtc not tested

Crates.io Crates.io docs.rs dependency status Continuous integration

py32f0xx-hal contains a hardware abstraction on top of the peripheral access API for the puyasemi PY32F0xx family of microcontrollers.

Collaboration on this crate is highly welcome, as are pull requests!

Supported

  • py32f030 (py32f030xx4, py32f030xx6, py32f030xx7, py32f030xx8)
  • py32f003 (py32f003xx4, py32f003xx6, py32f030xx8)
  • py32f002a (py32f002ax5)
  • py32f002b (py32f002bx5)

Getting Started

The examples folder contains several example programs. To compile them, one must specify the target device as cargo feature:

$ cargo build --features=py32f002ax5 --example=blinky

To use py32f0xx-hal as a dependency in a standalone project the target device feature must be specified in the Cargo.toml file:

[dependencies]
embedded-hal = "1"
nb = "1"
cortex-m = "0.7.7"
cortex-m-rt = "0.7.3"
# Panic behaviour, see https://crates.io/keywords/panic-impl for alternatives
panic-halt = "0.2.0"
py32f0xx-hal = { version = "0.2.0", features = ["py32f002ax5"]}

If you are unfamiliar with embedded development using Rust, there are a number of fantastic resources available to help.

Minimum supported Rust version

The minimum supported Rust version is the latest stable release. Older versions may compile, especially when some features are not used in your application.

Changelog

See CHANGELOG.md.

Credits

This repo was inspired by stm32f0xx-hal and stm32f1xx-hal

License

0-Clause BSD License, see LICENSE-0BSD.txt for more details.

Dependencies

~7.5MB
~183K SLoC