X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FAdapterCommunication.h;h=934915ba336782e4ee55f1fa7619e1f8cfe6099c;hb=cc30d5c98c157ee57c5c16b4ce40924ac7ca8bc2;hp=3921446597faeb5f3b73bbd15f82fd465254250a;hpb=d5bffd3c6eec0adbbb8bef6f4fd4ae484efe6f41;p=deb_libcec.git diff --git a/src/lib/AdapterCommunication.h b/src/lib/AdapterCommunication.h index 3921446..934915b 100644 --- a/src/lib/AdapterCommunication.h +++ b/src/lib/AdapterCommunication.h @@ -47,8 +47,8 @@ namespace CEC virtual ~CAdapterCommunication(); bool Open(const char *strPort, uint16_t iBaudRate = 38400, uint32_t iTimeoutMs = 10000); - bool Read(cec_frame &msg, uint32_t iTimeout = 1000); - bool Write(const cec_frame &frame); + bool Read(cec_adapter_message &msg, uint32_t iTimeout = 1000); + bool Write(const cec_adapter_message &frame); bool PingAdapter(void); void Close(void); bool IsOpen(void) const; @@ -58,7 +58,9 @@ namespace CEC bool StartBootloader(void); bool SetAckMask(uint16_t iMask); - static void PushEscaped(cec_frame &vec, uint8_t byte); + static void PushEscaped(cec_adapter_message &vec, uint8_t byte); + static void FormatAdapterMessage(const cec_command &command, cec_adapter_message &packet); + private: void AddData(uint8_t *data, uint8_t iLen); bool ReadFromDevice(uint32_t iTimeout);