Currently, CTimerPwmPeriodChannel::new returns a Result and can fail at runtime, requiring .expect("...") calls even when the arguments are compile-time constants that are known to be valid.
Requested improvement:
Either:
- Make the constructor
const fn with compile-time validation - Use const { assert!() } blocks to validate arguments at compile time, making invalid arguments a compiler error rather than runtime panic
- Provide a separate const
fn new_const() variant that only accepts const arguments and validates them at compile time