6 releases (3 breaking)

0.4.0 Aug 15, 2024
0.3.0 Aug 15, 2024
0.2.0 Aug 13, 2024
0.1.4 Aug 12, 2024
0.1.1 Jul 19, 2024

#390 in No standard library

Download history 188/week @ 2024-07-17 30/week @ 2024-07-24 10/week @ 2024-07-31 188/week @ 2024-08-07 326/week @ 2024-08-14

514 downloads per month
Used in 2 crates

Custom license

3MB
37K SLoC

C 20K SLoC // 0.5% comments Rust 11K SLoC // 0.0% comments GNU Style Assembly 5.5K SLoC // 0.0% comments Python 79 SLoC // 0.3% comments Alex 25 SLoC

Contains (static library, 635KB) libpy32csdk_hal_debug.a, (static library, 305KB) libpy32csdk_hal_release.a

py32csdk-hal-sys

Crates.io

This is a crate that generates bindings using the C SDK for PY32F0.

This package is used by bind-hal, you can use bind-hal's rust API.

bind-hal - crates.io

Supported MCU:

---PY32F0xx Series---

Puya PY32F002A, PY32F003, PY32F030

Xinlinggo XL32F003*, XL32F002A*

Luat AIR001

Build

This library uses precompiled static libraries and pregenerated bindings by default.

When using a debug build, this crate uses -Og -g, and when using a release build, uses -Ofast.

These two static libraries are ready for you if you don't want to bother!

--features=recompile

Generate Bindings

To handle macros with type conversions, this library requires using this Pull Request. However, to compile this PR, you need to set the dependency address of cmacro to https://github.com/reitermarkus/cmacro-rs. You might be able to achieve this using [patch.crates-io] or by directly fetching the library.

Compile

This crate use Clang and cc to compile CSDK.

New Chips:

Some content needs to be processed manually or by script

  1. (*(uint32_t *)
  2. __HAL_RCC_xxx
  3. Interrupt

Dependencies