rust-embedded / embedded-hal

A Hardware Abstraction Layer (HAL) for embedded systems
Apache License 2.0
1.95k stars 197 forks source link

Use named constants to clarify delay-stepdown behavior #542

Closed jamesmunns closed 10 months ago

jamesmunns commented 10 months ago

Add some named constants to clarify behavior/intent, which confused at least one person already.

The compiler almost certainly should be able to optimize away N / M * M, but if we'd like to be extra sure, I can add another const.