kinetis/bme: add bit_checkXX() functions
Contribution description
Add bit_checkXX functions for kinetis MCUs, analogous to the existing bit_clear and bit_set functions.
A general bit_checkXX implementation was added with #16522 to sys/bit.h, and probably just forgotten for the kinetis override?
cc @benpicco.
Testing procedure
Unfortunately I don't have any kinetis-based boards with me. If someone has them and it is wanted, I can add some unitests for setting/clearing/ reading bits, analogous to the existing tests-bitfield test.
Issues/PRs references
Came up in #21577, which adds a first usage of bit_check (Murdock error).
Murdock results
:heavy_check_mark: PASSED
db2077f8a6c543319b6e9db8499df7c5ad45c974 sys/bit: document return values
| Success | Failures | Total | Runtime |
|---|---|---|---|
| 10515 | 0 | 10516 | 09m:45s |
Artifacts
Is this not already covered by the CPU_HAS_BITBAND code path?
Is this not already covered by the
CPU_HAS_BITBANDcode path?
No, because the whole bit.h module is gated by a #if !BITBAND_FUNCTIONS_PROVIDED, so that path is never entered for the kinetis MCUs that have BITBAND_FUNCTIONS_PROVIDED enabled.
Ah the Kinetis Bit Manipulation Engine is indeed different from the ARM bit-banding extension! I would have thought they'd just use the standard functionality under a different name.