Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
19924: drivers/pcf857x: Move compile time check to compilation unit r=maribu a=maribu ### Contribution description This allows including the header without using the module. Obviously, calls to the functions provided by the header won't like without using the module. But including the header can still be useful for e.g.: if (IS_USED(MODULE_PCF857x)) { /* make use of the module */ } In the above example all calls to pcf857x functions would be optimized out when the module is not used, full compile checks happen in either case. ### Testing procedure - binaries should not change - including the pcf857x header should work without having selected one of the pcf857x variants, if the driver is not actually used - when calling any of the functions provided, linking should fail - when using the `pcf857x` module without any variant, compiling should still fail with a message indicating that (at least) one of the pcf857x needs to be selected ### Issues/PRs references None 19925: cpu/sam3: assert valid freq in timer_init() r=maribu a=maribu ### Contribution description The API of timer_init() expects callers to know what frequencies are supported and only use valid frequencies. So let's add an `assert()` to aid debugging if the app uses an invalid. ### Testing procedure - any valid application should compile and work as before - an application using an unsupported timer frequency should trigger an `assert()`, rather than letting the timer silently run at a (possibly widely) different frequency ### Issues/PRs references None Co-authored-by: Marian Buschsieweke <[email protected]>
- Loading branch information