From 765681fcfcf940773e7a255a342c06c00352fb10 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Tue, 24 Apr 2012 22:30:41 +0200 Subject: [PATCH] cec: removed no longer used CCECBusScan --- src/lib/CECProcessor.cpp | 45 ---------------------------------------- src/lib/CECProcessor.h | 13 ------------ 2 files changed, 58 deletions(-) diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 9cf771b..9f0274b 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -1476,51 +1476,6 @@ const char *CCECProcessor::ToString(const cec_server_version version) } } -void *CCECBusScan::Process(void) -{ - CCECBusDevice *device(NULL); - uint8_t iCounter(0); - - while (!IsStopped()) - { - if (++iCounter < 10) - { - Sleep(1000); - continue; - } - for (unsigned int iPtr = 0; iPtr <= 11 && !IsStopped(); iPtr++) - { - device = m_processor->m_busDevices[iPtr]; - WaitUntilIdle(); - if (device && device->GetStatus(true) == CEC_DEVICE_STATUS_PRESENT) - { - WaitUntilIdle(); - if (!IsStopped()) - device->GetVendorId(); - - WaitUntilIdle(); - if (!IsStopped()) - device->GetPowerStatus(true); - } - } - } - - return NULL; -} - -void CCECBusScan::WaitUntilIdle(void) -{ - if (IsStopped()) - return; - - int32_t iWaitTime = 3000 - (int32_t)(GetTimeMs() - m_processor->GetLastTransmission()); - while (iWaitTime > 0) - { - Sleep(iWaitTime); - iWaitTime = 3000 - (int32_t)(GetTimeMs() - m_processor->GetLastTransmission()); - } -} - bool CCECProcessor::StartBootloader(const char *strPort /* = NULL */) { if (!m_communication && strPort) diff --git a/src/lib/CECProcessor.h b/src/lib/CECProcessor.h index 3bb56fd..ce59098 100644 --- a/src/lib/CECProcessor.h +++ b/src/lib/CECProcessor.h @@ -231,17 +231,4 @@ namespace CEC CCECInputBuffer m_inBuffer; libcec_configuration m_configuration; }; - - class CCECBusScan : public PLATFORM::CThread - { - public: - CCECBusScan(CCECProcessor *processor) { m_processor = processor; } - virtual ~CCECBusScan(void) { StopThread(true); } - virtual void *Process(void); - - private: - void WaitUntilIdle(void); - - CCECProcessor *m_processor; - }; }; -- 2.34.1