X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FAdapterCommunication.h;h=fcb2817a67b3b4d7dc431bdbdbfd4010827bad3a;hb=a75a882fccb18fcf74d8df3a9306eb78cfeca619;hp=3921446597faeb5f3b73bbd15f82fd465254250a;hpb=d5bffd3c6eec0adbbb8bef6f4fd4ae484efe6f41;p=deb_libcec.git diff --git a/src/lib/AdapterCommunication.h b/src/lib/AdapterCommunication.h index 3921446..fcb2817 100644 --- a/src/lib/AdapterCommunication.h +++ b/src/lib/AdapterCommunication.h @@ -31,7 +31,7 @@ * http://www.pulse-eight.net/ */ -#include "../../include/CECExports.h" +#include #include "platform/threads.h" #include @@ -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);