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

Reverse Engineering tricks #804

Merged
merged 8 commits into from
Nov 27, 2021
Merged

Reverse Engineering tricks #804

merged 8 commits into from
Nov 27, 2021

Conversation

2bndy5
Copy link
Member

@2bndy5 2bndy5 commented Oct 27, 2021

This resolves #798 with the addition of 2 new public functions (& 2 new private functions for code re-use).

  1. toggleAllPipes() can be used to open or close all data pipes (EN_RXADDR register) in 1 SPI transaction.
  2. setRadiation() can be used to configure the RF_SETUP register in 1 SPI transaction. To re-use the existing code in setDataRate() & setPALevel() functions, there are 2 new private functions:
    • _data_rate_reg_value(speed) replaces a bulk of setDataRate() by returning an uint8_t value that can be |'d into the value written to the RF_SETUP register. This private inline function also sets the txDelay value
    • _pa_level_reg_value(level, lnaEnable) replaces a bulk of setPALevel() by returning an uint8_t value that can be |'d into the value written to the RF_SETUP register. Given the parameter names, you can surmise that this new private inline function also compensates for the LNA_HCURR bit in the RF_SETUP register.

Also includes appropriate additions to the docs and python wrapper.

@TMRh20 TMRh20 merged commit 2bfde05 into master Nov 27, 2021
@TMRh20 TMRh20 deleted the RE-tricks branch November 27, 2021 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using RF24 in reverse engineering protocols
2 participants