Closed beegee-tokyo closed 5 years ago
You shouldn't change anything in the SX126x SPI command implementations (such as setDioIrqParams()
method). Instead, find all calls to setDioIrqParams()
and remove any references to DIO2 configuration, so that it doesn't get overwritten after setting it as RF switch in config()
. The only call to setDioIrqParams()
that changes DIO2 should be in CAD method.
DIO2 configuration could be added, but I don't think it should be in the begin()
method, there's already enough parameters as it is. Since there's already a method to set DIO3 as TCXO control, something similar to that could be implemented. Default setting would be DIO2 as IRQ, user would be able to change that by calling e.g. setRFSwitch(bool enable)
to change it to RF switch control (and disable CAD in the process).
Got it. I like your idea with the additional method to set DIO2 as RF switch. Will look how to implement it and test it.
Got the French ISP4250 (with DIO2 as RF switch) already talking to my Chinese E22 modules, your library makes it so easy to adapt.
Closed against https://github.com/jgromes/RadioLib/pull/17
Hope I am not getting annoying with my issues.
I got my Insight DSP4520 modules. These modules combines a nRF52 and a SX1262 into one package. Unfortunately on these boards the DIO2 is used as RF switch control and this cannot be changed. Is there any hope that I can change the library to setup DIO2 as RF switch control? I found in SX126x.cpp this:
and
I changed it to
and
Just for testing. But that might not be the only functions that needs to be changed. Can you point me to where I should search for additional locations that needs to be changed. I know that this will break the CAD function, but I really would like to use your library, because it is much easier to setup than the SEMTECH example library for the SX126x chips.
If I get it to work, I will think about how to make this configurable (e.g. in the begin() function) and prepare a pull-request.