Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/msp430/periph_timer: add a static_assert() for clear mask #20571

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

maribu
Copy link
Member

@maribu maribu commented Apr 14, 2024

Contribution description

The driver assumes that timer A and timer B have the same register layout regarding all the features exposed by the driver. This is backed by the MCU family datasheets for the MSP430 x1xx and the MSP430 G2xx / F2xx MCUs (and likely more families).

The assert() is pretty limited in coverage, but more to document why a "timer A clear" mask is used but still claiming the driver also works for timer B. It just looks too much like a bug otherwise.

Testing procedure

Green CI.

Issues/PRs references

None

@maribu maribu added Platform: MSP Platform: This PR/issue effects MSP-based platforms Area: doc Area: Documentation Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Apr 14, 2024
@github-actions github-actions bot added Area: cpu Area: CPU/MCU ports and removed Area: doc Area: Documentation labels Apr 14, 2024
The driver assumes that timer A and timer B have the same register
layout regarding all the features exposed by the driver. This is
backed by the MCU family datasheets for the MSP430 x1xx and the
MSP430 G2xx / F2xx MCUs (and likely more families).

The assert() is pretty limited in coverage, but more to document why
a "timer A clear" mask is used but still claiming the driver also
works for timer B. It just looks too much like a bug otherwise.
@maribu maribu force-pushed the cpu/msp430/timer branch from 2ef9491 to 49d59d1 Compare April 14, 2024 14:02
@riot-ci
Copy link

riot-ci commented Apr 14, 2024

Murdock results

✔️ PASSED

49d59d1 cpu/msp430/periph_timer: add a static_assert() for clear mask

Success Failures Total Runtime
10044 0 10045 14m:43s

Artifacts

@maribu maribu added this pull request to the merge queue Apr 15, 2024
Merged via the queue into RIOT-OS:master with commit 53edb4e Apr 15, 2024
26 checks passed
@maribu maribu deleted the cpu/msp430/timer branch April 23, 2024 08:54
@mguetschow mguetschow added this to the Release 2024.07 milestone Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Platform: MSP Platform: This PR/issue effects MSP-based platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants