Skip to content

Commit

Permalink
[SX126x] Make setPaConfig public (#852)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgromes committed Oct 20, 2023
1 parent eabc752 commit f1f3336
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ spectralScanStart KEYWORD2
spectralScanAbort KEYWORD2
spectralScanGetStatus KEYWORD2
spectralScanGetResult KEYWORD2
setPaConfig KEYWORD2

# nRF24
setIrqAction KEYWORD2
Expand Down
13 changes: 13 additions & 0 deletions src/modules/SX126x/SX126x.h
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,19 @@ class SX126x: public PhysicalLayer {
*/
int16_t spectralScanGetResult(uint16_t* results);

/*!
\brief Set the PA configuration. Allows user to optimize PA for a specific output power
and matching network. Any calls to this method must be done after calling begin/beginFSK and/or setOutputPower.
WARNING: Use at your own risk! Setting invalid values can and will lead to permanent damage!
\param paDutyCycle PA duty cycle raw value.
\param deviceSel Device select, usually RADIOLIB_SX126X_PA_CONFIG_SX1261,
RADIOLIB_SX126X_PA_CONFIG_SX1262 or RADIOLIB_SX126X_PA_CONFIG_SX1268.
\param hpMax hpMax raw value.
\param paLut paLut PA lookup table raw value.
\returns \ref status_codes
*/
int16_t setPaConfig(uint8_t paDutyCycle, uint8_t deviceSel, uint8_t hpMax = RADIOLIB_SX126X_PA_CONFIG_HP_MAX, uint8_t paLut = RADIOLIB_SX126X_PA_CONFIG_PA_LUT);

#if !defined(RADIOLIB_GODMODE)
protected:
#endif
Expand Down

0 comments on commit f1f3336

Please sign in to comment.