replaced some more magic numbers
authorLars Op den Kamp <lars@opdenkamp.eu>
Fri, 27 Apr 2012 11:37:34 +0000 (13:37 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Fri, 27 Apr 2012 11:43:15 +0000 (13:43 +0200)
include/cectypes.h

index a90b6ffc42693ffe5eb9029f2f776fc2e7181eb0..b596113f883f2e7d438ffde129820d06a101ca4e 100644 (file)
@@ -73,10 +73,18 @@ namespace CEC {
 #define CEC_POWER_STATE_REFRESH_TIME 30000
 #define CEC_FW_VERSION_UNKNOWN       0xFFFF
 #define CEC_CONNECT_TRIES            3
+
 #define CEC_PHYSICAL_ADDRESS_TV      0
 #define CEC_MAX_PHYSICAL_ADDRESS     0xFFFE
 #define CEC_INVALID_PHYSICAL_ADDRESS 0xFFFF
 
+#define CEC_MIN_VENDORID             1
+#define CEC_MAX_VENDORID             0xFFFFFE
+#define CEC_INVALID_VENDORID         0xFFFFFF
+
+#define CEC_MIN_HDMI_PORTNUMBER      1
+#define CEC_MAX_HDMI_PORTNUMBER      15
+
 #define CEC_DEFAULT_SETTING_USE_TV_MENU_LANGUAGE      1
 #define CEC_DEFAULT_SETTING_ACTIVATE_SOURCE           1
 #define CEC_DEFAULT_SETTING_POWER_OFF_SHUTDOWN        1
@@ -87,6 +95,8 @@ namespace CEC {
 #define CEC_DEFAULT_SETTING_POWER_OFF_DEVICES_STANDBY 1
 #define CEC_DEFAULT_DEVICE_LANGUAGE                   "eng"
 #define CEC_DEFAULT_FIRMWARE_BUILD_DATE               0
+#define CEC_DEFAULT_SETTING_AUTODETECT_ADDRESS        1
+#define CEC_DEFAULT_SETTING_GET_SETTINGS_FROM_ROM     0
 
 #define CEC_DEFAULT_TRANSMIT_RETRY_WAIT 500
 #define CEC_DEFAULT_TRANSMIT_TIMEOUT    1000
@@ -1264,8 +1274,8 @@ typedef struct libcec_configuration
     tvVendor =              (uint64_t)CEC_VENDOR_UNKNOWN;
     clientVersion =         (uint32_t)CEC_CLIENT_VERSION_PRE_1_5;
     serverVersion =         (uint32_t)CEC_SERVER_VERSION_PRE_1_5;
-    bAutodetectAddress =              1;
-    bGetSettingsFromROM =             0;
+    bAutodetectAddress =              CEC_DEFAULT_SETTING_AUTODETECT_ADDRESS;
+    bGetSettingsFromROM =             CEC_DEFAULT_SETTING_GET_SETTINGS_FROM_ROM;
     bUseTVMenuLanguage =              CEC_DEFAULT_SETTING_USE_TV_MENU_LANGUAGE;
     bActivateSource =                 CEC_DEFAULT_SETTING_ACTIVATE_SOURCE;
     bPowerOffScreensaver =            CEC_DEFAULT_SETTING_POWER_OFF_SCREENSAVER;