add primary enable/disable functions for FHSS

This commit is contained in:
Morgan 'ARR\!' Allen 2021-12-02 10:01:37 -08:00
parent b476a41c92
commit 6ad9cba796

View file

@ -107,6 +107,18 @@ void lora32_sleep(lora32_cfg_t *lora) {
lora32_write_reg(lora, REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_SLEEP); lora32_write_reg(lora, REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_SLEEP);
} }
void lora32_enable_fhss(lora32_cfg_t *lora, uint8_t period) {
lora->enableFHSS = true;
lora32_write_reg(lora, REG_HOP_PERIOD, period);
}
void lora32_disable_fhss(lora32_cfg_t *lora) {
lora->enableFHSS = false;
lora32_write_reg(lora, REG_HOP_PERIOD, 0);
}
void lora32_enable_tx(lora32_cfg_t *lora) { void lora32_enable_tx(lora32_cfg_t *lora) {
lora32_standby(lora); lora32_standby(lora);