103 bool busy()
const {
return this->busy_; }
137 this->state_ =
state;
140 static RadioEffects comm_report(
bool ok);
141 const LogString *apply_configuration_(
const RadioProfile &requested, std::span<char, 16> version);
144 bool packet_waiting_();
146 RadioEffects receive_(
bool holding,
uint32_t now, std::span<uint8_t, SX126X_MAX_PACKET_SIZE> packet);
147 SX126xCommands commands_;
148 AppliedProfile applied_;
151 uint16_t pending_irq_{0};
152 GPIOPin *dio1_pin_{
nullptr};
153 GPIOPin *rst_pin_{
nullptr};
156 bool rx_retry_pending_{
false};
RadioEffects configure(const RadioProfile &requested, std::span< char, 16 > version)
GPIOPin * get_rst_pin() const
SX126xRadio(const SX126xRadio &)=delete
bool can_configure() const
size_t max_packet_size() const
GPIOPin * get_dio1_pin() const
bool can_change_mode() const
RadioEffects retune(uint32_t frequency)
void set_dio1_pin(GPIOPin *pin)
RadioEffects cancel_transmit(SX126xTransmitListener *listener)
RadioEffects poll(uint32_t now, std::span< uint8_t, SX126X_MAX_PACKET_SIZE > packet)
void set_rst_pin(GPIOPin *pin)
RadioEffects poll_transmit(uint32_t now)
RadioEffects change_mode(ModeCommand command, uint8_t arg)
RadioEffects start_transmit(SX126xTransmitListener *listener, const uint8_t *data, size_t len, uint32_t timeout_ms)
bool is_transmitting() const
SX126xRadio & operator=(const SX126xRadio &)=delete
virtual void on_transmit_complete(SX126xError result)=0
@ SX126X_ERROR_INVALID_PARAMS
@ SX126X_ERROR_BUSY_TIMEOUT
@ RADIO_STATE_NEEDS_CONFIGURATION
@ RADIO_STATE_TRANSMITTING
@ MODE_COMMAND_COLD_SLEEP
size_t max_packet_size() const
const LogString * warning
SX126xTransmitListener * listener