Cargo Features

[dependencies]
py32-hal = { version = "0.2.0", default-features = false, features = ["rt", "defmt", "memory-x", "embassy", "time", "exti", "allow-ep-shared-fifo", "py32f030k28", "py32f030f16", "py32f072c1b", "time-driver-any", "time-driver-tim3", "time-driver-tim15", "time-driver-systick", "td-systick-multi-alarms", "log"] }
default = defmt, embassy, exti, memory-x, rt, time

These default features are set whenever py32-hal is added without default-features = false somewhere in the dependency tree.

rt default

Enables rt of py32-metapac

py32-metapac = { path = "../py32-data/build/py32-metapac", default-features = false, features = [

defmt default

Enables defmt and defmt-rtt, defmt of embassy-usb-driver

memory-x default

Enables memory-x of py32-metapac

embassy default

Enables embassy-futures, embassy-sync, and embassy-time-driver

time default

Enables embassy-time, time of embassy-embedded-hal

Affects i2c::Config.timeout

exti default

Affects py32-hal::exti

allow-ep-shared-fifo

PY32F07x: the IN and OUT buffers of the same endpoint being shared When this feature is enabled, the In and Out of an endpoint will not be used at the same time, except for ep0.
PY32F403: IN and OUT do not share FIFO, this feature is invalid

py32f030k28

Enables py32f030k28 of py32-metapac

py32f030f16

Enables py32f030f16 of py32-metapac

py32f072c1b

Enables py32f072c1b of py32-metapac

time-driver-any = _time-driver

As of 2023-12-04, this driver is implemented using CC1 as the halfway rollover interrupt, and any additional CC capabilities to provide timer alarms to embassy-time. embassy-time requires AT LEAST one alarm to be allocatable, which means timers that only have CC1, such as TIM16/TIM17, are not candidates for use as an embassy-time driver provider. (a.k.a 1CH and 1CH_CMP are not, others are good.)

time-driver-tim1 time-driver-tim3 = _time-driver
time-driver-tim15 = _time-driver
time-driver-systick td-systick-multi-alarms? = portable-atomic

Affects py32-hal::systick_time_driver

td-systick-multi-alarms = time-driver-systick

td == time-driver, to avoid confliction
By default, only one alarm is provided (similar to a 2-channel timer). Enabling this feature provides three alarms (similar to a 4-channel timer).
Of course, this will also increase the execution time of the interrupt handler.

_time-driver time-driver-any? time-driver-tim1? time-driver-tim15? time-driver-tim3?

Affects py32-hal::time_driver

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

log implicit feature

Enables log

log:

A lightweight logging facade for Rust

portable-atomic time-driver-systick?