mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2025-06-28 05:09:40 +00:00
add back
This commit is contained in:
22
IR_Encoder.h
22
IR_Encoder.h
@ -43,17 +43,19 @@ public:
|
||||
}
|
||||
|
||||
void IR_Encoder::setBlindDecoders(IR_Decoder* decoders [], uint8_t count);
|
||||
// template<typename T>
|
||||
// void sendData(uint16_t addrTo, T& data, bool needAccept = false);
|
||||
void rawSend(uint8_t* ptr, uint8_t len);
|
||||
void sendData(uint16_t addrTo, uint8_t* data, uint8_t len, bool needAccept = false);
|
||||
void sendACK(uint16_t addrTo, uint8_t addInfo = 0, bool forAll = false);
|
||||
void sendRequest(uint16_t addrTo, uint8_t addInfo = 0);
|
||||
void rawSend(uint8_t* ptr, uint8_t len);
|
||||
void sendBack(uint8_t* data = nullptr, uint8_t len = 0);
|
||||
void sendBackTo(uint16_t addrTo, uint8_t* data = nullptr, uint8_t len = 0);
|
||||
void isr();
|
||||
|
||||
~IR_Encoder();
|
||||
volatile bool ir_out_virtual;
|
||||
private:
|
||||
void IR_Encoder::_sendBack(bool isAdressed, uint16_t addrTo, uint8_t* data, uint8_t len);
|
||||
|
||||
void IR_Encoder::setDecoder_isSending();
|
||||
void sendByte(uint8_t byte, bool* prev, bool LOW_FIRST);
|
||||
void addSync(bool* prev, bool* next);
|
||||
@ -101,24 +103,10 @@ private:
|
||||
(bitPauseTakts) * 2 - 1
|
||||
};
|
||||
uint8_t* currentBitSequence = bitLow;
|
||||
|
||||
// uint8_t bitSequence[2];
|
||||
|
||||
volatile SignalPart signal;
|
||||
|
||||
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// template<typename T>
|
||||
// void IR_Encoder::sendData(uint16_t addrTo, T& data, bool needAccept = false) { // TODO: переделать логику LOW_FIRST
|
||||
// uint8_t len = sizeof(T);
|
||||
// uint8_t packSize = msgBytes + addrBytes + addrBytes + len + crcBytes;
|
||||
|
||||
// uint8_t msgType =
|
||||
// ((needAccept ? IR_MSG_DATA_ACCEPT : IR_MSG_DATA_NOACCEPT) << 5) | ((packSize - crcBytes) & IR_MASK_MSG_INFO);
|
||||
|
||||
// _sendData(addrTo, data, len, msgType);
|
||||
// }
|
||||
|
||||
|
Reference in New Issue
Block a user