cec: refactored threading/locking - added windows native instead of pthread-win32...
[deb_libcec.git] / src / lib / platform / serialport / baudrate.h
similarity index 95%
rename from src/lib/platform/baudrate.h
rename to src/lib/platform/serialport/baudrate.h
index 98521bbb8a9361c1d6d09e19f018eaef6644787e..bfdb2d73e87e386621cc34694f521d54cea03e20 100644 (file)
 //every baudrate I could find is in here in an #ifdef block
 //so it should compile on everything
 
-#include "os-dependent.h"
-
 #ifndef __WINDOWS__
 #include <termios.h>
 #endif
 
-namespace CEC
+namespace PLATFORM
 {
   static struct sbaudrate
   {
     int32_t rate;
     int32_t symbol;
   }
+
   baudrates[] =
   {
   #ifdef B50
@@ -199,9 +198,9 @@ namespace CEC
     { -1, -1}
   };
 
-  static int32_t IntToBaudrate(uint32_t baudrate)
+  inline int32_t IntToBaudrate(uint32_t baudrate)
   {
-    for (unsigned int i = 0; i < sizeof(baudrates) / sizeof(CEC::sbaudrate) - 1; i++)
+    for (unsigned int i = 0; i < sizeof(baudrates) / sizeof(PLATFORM::sbaudrate) - 1; i++)
     {
       if (baudrates[i].rate == (int32_t) baudrate)
         return baudrates[i].symbol;