ESPHome 2026.6.0-dev
Loading...
Searching...
No Matches
sx126x_transport.cpp
Go to the documentation of this file.
1#include "esphome/core/log.h"
3#include "sx126x_transport.h"
4
5namespace esphome::sx126x {
6
7static const char *const TAG = "sx126x_transport";
8
10 PacketTransport::setup();
11 this->parent_->register_listener(this);
12}
13
14void SX126xTransport::send_packet(const std::vector<uint8_t> &buf) const { this->parent_->transmit_packet(buf); }
15
16void SX126xTransport::on_packet(const std::vector<uint8_t> &packet, float rssi, float snr) { this->process_(packet); }
17
18} // namespace esphome::sx126x
void process_(std::span< const uint8_t > data)
Process a received packet.
void on_packet(const std::vector< uint8_t > &packet, float rssi, float snr) override
void send_packet(const std::vector< uint8_t > &buf) const override
const char *const TAG
Definition spi.cpp:7