Skip to content

A Rust hardware abstraction layer for the Holtek ht32f1yyy microcontrollers

License

Notifications You must be signed in to change notification settings

ht32-rs/ht32f1yyy-hal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ht32f1yyy-hal

This crate implements a hardware abstraction layer for the Holtek HT32F1YYY chip family.

It relies on the ht32f1yyy peripheral access crate to provide appropriate register definitions, and implements a partial set of the embedded-hal traits.

Much of the implementation was adapted from other HAL crates, like ht32f5xxxx-hal and those in the stm32-rs organisation.

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

Getting Started

The examples folder contains several example programs. To compile them, specify the target device in a cargo feature:

$ cargo build --features=ht32f1755,rt

The examples make use of defmt for logging with deferred formatting. To be able to flash the firmware and view the log messages, you will need to use a tool like probe-rs-cli or probe-run.

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

[dependencies]
cortex-m = "0.7"
cortex-m-rt = "0.7"
ht32f1yyy-hal = {version = "0.1.0", features = ["ht32f1755","rt","critical-section-impl"]}

Copy over the memory.x file to your project and uncomment the correct entry for your device.

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 (MSRV) at the moment is 1.69.0. Older versions may compile, especially when some features are not used in your application.

License

MIT License, see LICENSE or http://opensource.org/licenses/MIT for more details.

About

A Rust hardware abstraction layer for the Holtek ht32f1yyy microcontrollers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published