Fix broken macros in octypes.h
authorJohn Light <john.j.light@intel.com>
Tue, 28 Jul 2015 06:54:43 +0000 (23:54 -0700)
committerErich Keane <erich.keane@intel.com>
Thu, 30 Jul 2015 16:16:57 +0000 (16:16 +0000)
Eliminate 16-bit definition of OCConnectivityType.
Repair macros used to build OCConnectivityType.

Change-Id: Ia1ff69f6bdab5d8d728cb33ea633a4ba9c3912d7
Signed-off-by: John Light <john.j.light@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1977
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
resource/csdk/stack/include/octypes.h

index 5758bd7..12e600d 100644 (file)
@@ -402,21 +402,6 @@ typedef enum
     /** use when defaults are ok. */
     CT_DEFAULT = 0,
 
-    /** 16-bit int. */
-    #if defined (__UINT32_MAX__) && (__UINT32_MAX__ == 65535)
-
-    /** IPv4 and IPv6, including 6LoWPAN.*/
-    CT_ADAPTER_IP           = (1 << 10),
-
-    /** GATT over Bluetooth LE.*/
-    CT_ADAPTER_GATT_BTLE    = (1 << 11),
-
-    /** RFCOMM over Bluetooth EDR.*/
-    CT_ADAPTER_RFCOMM_BTEDR = (1 << 12),
-
-    /** assume 32-bit int. */
-    #else
-
     /** IPv4 and IPv6, including 6LoWPAN.*/
     CT_ADAPTER_IP           = (1 << 16),
 
@@ -431,17 +416,6 @@ typedef enum
     CT_ADAPTER_REMOTE_ACCESS = (1 << 19),
     #endif
 
-    /** bit shift required for connectivity adapter.*/
-    #define CT_ADAPTER_SHIFT 10
-
-    /** Mask Flag.*/
-    #define CT_MASK_FLAGS 0x03FF
-
-    /** Mask Adapter.*/
-    #define CT_MASK_ADAPTER 0xFC00
-
-    #endif
-
     /** Insecure transport is the default (subject to change).*/
 
     /** secure the transport path.*/
@@ -480,6 +454,15 @@ typedef enum
     CT_SCOPE_GLOBAL    = 0xE,
 } OCConnectivityType;
 
+/** bit shift required for connectivity adapter.*/
+#define CT_ADAPTER_SHIFT 16
+
+/** Mask Flag.*/
+#define CT_MASK_FLAGS 0xFFFF
+
+/** Mask Adapter.*/
+#define CT_MASK_ADAPTER 0xFFFF0000
+
 /**
  *  OCDoResource methods to dispatch the request
  */