From: Lars Op den Kamp Date: Fri, 27 Apr 2012 11:37:34 +0000 (+0200) Subject: replaced some more magic numbers X-Git-Tag: upstream/2.2.0~1^2~29^2^2~9 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=64ec6e7919cb9a43578156b9e24dcf2fa75c7446;p=deb_libcec.git replaced some more magic numbers --- diff --git a/include/cectypes.h b/include/cectypes.h index a90b6ff..b596113 100644 --- a/include/cectypes.h +++ b/include/cectypes.h @@ -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;