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

drivers/at86rf2xx: define caps in macros #18967

Merged
merged 5 commits into from
Nov 26, 2022

Conversation

jia200x
Copy link
Member

@jia200x jia200x commented Nov 24, 2022

Contribution description

It has been very hard to port AT86RF based radios to the Radio HAL because the presentation layer is mixed with the interface layer (netdev). Even more, variant specific stuff are scattered everywhere, which makes it hard to write a compatible Radio HAL interface. Therefore, I think the only way to move forward is to clean-up the driver a bit.

This PR tries to define variant specific caps (e.g HAVE_ED_REGISTER, HAVE_SUBGHZ , AT86RF2XX_PERIPH) based on the variant.
In a follow up, I plan to move the PERIPH parts to its own file and separate the SPI implementation with the PERIPH version. The idea is to have provide a common abstraction for the hardware interface layer, so it becomes relatively straight forward to replace at86rf2xx_netdev.c with at86rf2xx_rf_ops.c. With some tweaks, it should be also possible to run multiple variants on the same firmware.

Testing procedure

Check that AT86RF2XX variants still work as expected.

Issues/PRs references

#16535

@github-actions github-actions bot added the Area: drivers Area: Device drivers label Nov 24, 2022
@benpicco benpicco added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer labels Nov 24, 2022
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Nov 24, 2022
@jia200x
Copy link
Member Author

jia200x commented Nov 25, 2022

I accidentally swapped some of the conditions. I already fixed that in the last push and renamed AT86RF2XX_PERIPH to AT86RF2XX_HAVE_PERIPH for consistency with the other caps.

@benpicco
Copy link
Contributor

I could nitpick that AT86RF2XX_IS_PERIPH would be the better name, but please squash.

@jia200x
Copy link
Member Author

jia200x commented Nov 25, 2022

I could nitpick that AT86RF2XX_IS_PERIPH would be the better name, but please squash.

Addressed and directly squashed

@riot-ci
Copy link

riot-ci commented Nov 26, 2022

Murdock results

✔️ PASSED

5a865c3 drivers/at86rf2xx: add HAVE_RETRIES_REG macro

Success Failures Total Runtime
117858 0 117858 02h:17m:40s

Artifacts

This only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now.

@benpicco benpicco merged commit a3e841e into RIOT-OS:master Nov 26, 2022
@kaspar030 kaspar030 added this to the Release 2023.01 milestone Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers 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 Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants