-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Refactor the SX1276 driver to facilitate code reuse #25040
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
Conversation
Mani-Sadhasivam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
chrta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I have not tested this, but i think this is a good improvement.
|
Needs rebase and switching to C99 types @andysan |
The implementation of the board support routines is shared between all LoRa drivers that use LoRaMAC-Node. Move them from the SX1276 implementation to a separate source file to facilitate reuse. Make this source file conditional on CONFIG_HAS_SEMTECH_RADIO_DRIVERS since it will be used by all LoRaMAC-Node-based drivers. Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
LoRa radios supported by LoRaMAC-Node have a lot of common functionality. Zephyr's LoRa implementation for the SX1276 uses LoRaMAC-Nodes Radio HAL to implement API functionality like send and recv. The exact same functionality will be used by the SX126x driver. Facilitate sharing by moving that to a separate source file. Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
Done. |
The SX126x and the SX1276 share a significant amount of code. Refactor the current code to facilitate reuse.
Note: The CW API change is expected to go in together with the shell before this PR. The commit is included here as a "glue" commit.