kiss_modem: keep FEM replies ordered and deliverable; drop Wio FEM control

- Wio Tracker L1 1W no longer advertises TX gain control: its setter
  drives LORA_PWR_EN, the shared LDO for the SX1262 and the PA, so
  "gain off" would power down the radio.
- A SetFemState that arrives mid-TX is now applied after TxDone is
  queued, so its reply follows TxDone.
- SetFemState replies (immediate or deferred) are retained until they
  fit in the host output queue instead of being dropped, so a change
  that took effect is always acknowledged.
- GetFemState replies queue behind an outstanding SetFemState reply;
  a further SetFemState returns TxBusy until it clears.
This commit is contained in:
agessaman committed 2026-09-23 16:11:29 -07:00
1 parent a087a5198f
commit 0d648e4a18
5 files changed
+131 -32

No files matched your search

+1 -1
View File
@@ -279,7 +279,7 @@ FemState response data:
Example: enable RX gain without changing TX gain: apply `0x01`, value `0x01`.
If any bit in the apply mask is not in the board's capability mask (including reserved bits), the modem replies `Unsupported` and changes nothing. On success, SetFemState replies with the FemState response carrying the new state. A request received while a packet is on air is applied as soon as that transmission ends, and the FemState response is sent then; a second request during the same transmission returns `TxBusy`. Capabilities come from the board, so a board with a fixed, board-managed FEM (for example RAK3401) reports none.
If any bit in the apply mask is not in the board's capability mask (including reserved bits), the modem replies `Unsupported` and changes nothing. On success, SetFemState replies with the FemState response carrying the new state. A SetFemState received while a packet is on air (before its TxDone is queued) is held and applied after TxDone, so its FemState response follows TxDone. While a SetFemState is held or its response is still waiting for output space, GetFemState responses are queued behind it in order, and a further SetFemState returns `TxBusy`. Capabilities come from the board, so a board with a fixed, board-managed FEM (for example RAK3401) reports none.
The setting is not persisted; the board's power-on default applies after reboot.