cec: removed no longer used CCECBusScan
authorLars Op den Kamp <lars@opdenkamp.eu>
Tue, 24 Apr 2012 20:30:41 +0000 (22:30 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Tue, 24 Apr 2012 20:34:40 +0000 (22:34 +0200)
src/lib/CECProcessor.cpp
src/lib/CECProcessor.h

index 9cf771bda124bda87edc00b93e607c398e29cb6d..9f0274b491c1a29768d6b240757346cda4575e04 100644 (file)
@@ -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)
index 3bb56fd54ba8cb453ca382c523969b6ec82870e4..ce5909806fc64a6fa5921d6c6f917f20a329623a 100644 (file)
@@ -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;
-  };
 };