mirror of
https://github.com/thelsing/knx.git
synced 2025-08-22 13:46:21 +02:00
save work
This commit is contained in:
parent
ac2952b35e
commit
f1085a39cc
@ -17,23 +17,44 @@ class UsbTunnelInterface
|
|||||||
// from cEMI server
|
// from cEMI server
|
||||||
bool sendCemiFrame(CemiFrame& frame);
|
bool sendCemiFrame(CemiFrame& frame);
|
||||||
|
|
||||||
|
static const uint8_t* getKnxHidReportDescriptor();
|
||||||
|
static uint16_t getHidReportDescriptorLength();
|
||||||
|
static void receiveKnxHidReport(uint8_t const* data, uint16_t bufSize);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct _tx_queue_frame_t
|
struct _queue_buffer_t
|
||||||
{
|
{
|
||||||
uint8_t* data;
|
uint8_t* data;
|
||||||
uint16_t length;
|
uint16_t length;
|
||||||
_tx_queue_frame_t* next;
|
_queue_buffer_t* next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _tx_queue_t
|
struct _queue_t
|
||||||
{
|
{
|
||||||
_tx_queue_frame_t* front = nullptr;
|
_queue_buffer_t* front = nullptr;
|
||||||
_tx_queue_frame_t* back = nullptr;
|
_queue_buffer_t* back = nullptr;
|
||||||
} _tx_queue;
|
};
|
||||||
|
|
||||||
|
static const uint8_t descHidReport[];
|
||||||
|
|
||||||
CemiServer& _cemiServer;
|
CemiServer& _cemiServer;
|
||||||
|
|
||||||
|
uint16_t _manufacturerId;
|
||||||
|
uint16_t _maskVersion;
|
||||||
|
|
||||||
|
// USB TX queue
|
||||||
|
_queue_t _tx_queue;
|
||||||
void addFrameTxQueue(CemiFrame& frame);
|
void addFrameTxQueue(CemiFrame& frame);
|
||||||
bool isTxQueueEmpty();
|
bool isTxQueueEmpty();
|
||||||
void loadNextTxFrame(uint8_t** sendBuffer, uint16_t* sendBufferLength);
|
void loadNextTxFrame(uint8_t** sendBuffer, uint16_t* sendBufferLength);
|
||||||
|
|
||||||
|
// USB RX queue
|
||||||
|
static _queue_t _rx_queue;
|
||||||
|
static void addBufferRxQueue(const uint8_t* data, uint16_t length);
|
||||||
|
bool isRxQueueEmpty();
|
||||||
|
void loadNextRxBuffer(uint8_t** receiveBuffer, uint16_t* receiveBufferLength);
|
||||||
|
|
||||||
|
void handleKnxHidReport(uint8_t const* data, uint16_t bufSize);
|
||||||
|
void handleBusAccessServerProtocol(const uint8_t* requestData, uint16_t packetLength);
|
||||||
|
void sendKnxTunnelHidReport(uint8_t* data, uint16_t length);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user