X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fadapter%2FRPi%2FRPiCECAdapterCommunication.h;h=3cbbdde6551e612870dfbfc153049ec02c3a51a7;hb=fe6911e11baf213182f61b638a27f7cf3a22d64f;hp=c874451227ccd0ab503f3a735341995b91027765;hpb=f60ee8b35a31f8795658407a6863425a2c5c84d7;p=deb_libcec.git diff --git a/src/lib/adapter/RPi/RPiCECAdapterCommunication.h b/src/lib/adapter/RPi/RPiCECAdapterCommunication.h index c874451..3cbbdde 100644 --- a/src/lib/adapter/RPi/RPiCECAdapterCommunication.h +++ b/src/lib/adapter/RPi/RPiCECAdapterCommunication.h @@ -31,11 +31,15 @@ * http://www.pulse-eight.net/ */ +#include "env.h" #if defined(HAVE_RPI_API) #include "lib/adapter/AdapterCommunication.h" #include "lib/platform/threads/threads.h" +#define RPI_ADAPTER_VID 0x2708 +#define RPI_ADAPTER_PID 0x1001 + extern "C" { #include #include @@ -44,22 +48,9 @@ extern "C" { namespace CEC { class CRPiCECAdapterMessageQueue; - class CRPiCECAdapterCommunication; - - class CRPiCECAdapterFindNewLogicalAddress : public PLATFORM::CThread - { - public: - CRPiCECAdapterFindNewLogicalAddress(CRPiCECAdapterCommunication* communication, const cec_logical_address address); - void *Process(void); - private: - CRPiCECAdapterCommunication* m_communication; - cec_logical_address m_address; - }; class CRPiCECAdapterCommunication : public IAdapterCommunication { - friend class CRPiCECAdapterFindNewLogicalAddress; - public: /*! * @brief Create a new USB-CEC communication handler. @@ -92,6 +83,8 @@ namespace CEC cec_vendor_id GetVendorId(void) { return CEC_VENDOR_BROADCOM; } bool SupportsSourceLogicalAddress(const cec_logical_address address) { return address > CECDEVICE_TV && address < CECDEVICE_BROADCAST; } cec_adapter_type GetAdapterType(void) { return ADAPTERTYPE_RPI; }; + uint16_t GetAdapterVendorId(void) const { return RPI_ADAPTER_VID; } + uint16_t GetAdapterProductId(void) const { return RPI_ADAPTER_PID; } ///} bool IsInitialised(void); @@ -115,7 +108,7 @@ namespace CEC PLATFORM::CMutex m_mutex; VCHI_INSTANCE_T m_vchi_instance; VCHI_CONNECTION_T * m_vchi_connection; - CRPiCECAdapterFindNewLogicalAddress* m_laLost; + cec_logical_address m_previousLogicalAddress; }; };