[aravis] gvcp: fix endianess of defines.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] gvcp: fix endianess of defines.
- Date: Wed, 4 May 2011 15:59:53 +0000 (UTC)
commit 2df44c75891bc7a7c30165ae7c52ab2e312630cc
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Wed May 4 17:59:17 2011 +0200
gvcp: fix endianess of defines.
docs/reference/aravis/aravis-sections.txt | 2 +-
src/arvgvcp.h | 48 ++++++++++++++--------------
src/arvgvdevice.c | 3 +-
3 files changed, 27 insertions(+), 26 deletions(-)
---
diff --git a/docs/reference/aravis/aravis-sections.txt b/docs/reference/aravis/aravis-sections.txt
index 3c02265..64a5143 100644
--- a/docs/reference/aravis/aravis-sections.txt
+++ b/docs/reference/aravis/aravis-sections.txt
@@ -803,7 +803,7 @@ ARV_GVBS_DEVICE_MAC_ADDRESS_HIGH_OFFSET
ARV_GVBS_DEVICE_MAC_ADDRESS_LOW_OFFSET
ARV_GVBS_DEVICE_MODE_CHARACTER_SET_MASK
ARV_GVBS_DEVICE_MODE_CHARACTER_SET_POS
-ARV_GVBS_DEVICE_MODE_ENDIANESS
+ARV_GVBS_DEVICE_MODE_BIG_ENDIAN
ARV_GVBS_DEVICE_MODE_OFFSET
ARV_GVBS_DEVICE_VERSION_OFFSET
ARV_GVBS_GVCP_CAPABILITY_CONCATENATION
diff --git a/src/arvgvcp.h b/src/arvgvcp.h
index fc4524f..b3bd63f 100644
--- a/src/arvgvcp.h
+++ b/src/arvgvcp.h
@@ -30,24 +30,24 @@ G_BEGIN_DECLS
#define ARV_GVCP_PORT 3956
#define ARV_GVBS_VERSION_OFFSET 0x00000000
-#define ARV_GVBS_VERSION_MINOR_MASK 0xffff0000
-#define ARV_GVBS_VERSION_MINOR_POS 16
-#define ARV_GVBS_VERSION_MAJOR_MASK 0x0000ffff
-#define ARV_GVBS_VERSION_MAJOR_POS 0
+#define ARV_GVBS_VERSION_MINOR_MASK 0x0000ffff
+#define ARV_GVBS_VERSION_MINOR_POS 0
+#define ARV_GVBS_VERSION_MAJOR_MASK 0xffff0000
+#define ARV_GVBS_VERSION_MAJOR_POS 16
#define ARV_GVBS_DEVICE_MODE_OFFSET 0x00000004
-#define ARV_GVBS_DEVICE_MODE_ENDIANESS 1 << 0
-#define ARV_GVBS_DEVICE_MODE_CHARACTER_SET_MASK 0xffff0000
-#define ARV_GVBS_DEVICE_MODE_CHARACTER_SET_POS 16
+#define ARV_GVBS_DEVICE_MODE_BIG_ENDIAN 1 << 31
+#define ARV_GVBS_DEVICE_MODE_CHARACTER_SET_MASK 0x0000ffff
+#define ARV_GVBS_DEVICE_MODE_CHARACTER_SET_POS 0
#define ARV_GVBS_DEVICE_MAC_ADDRESS_HIGH_OFFSET 0x00000008
#define ARV_GVBS_DEVICE_MAC_ADDRESS_LOW_OFFSET 0x0000000c
#define ARV_GVBS_SUPPORTED_IP_CONFIGURATION_OFFSET 0x00000010
#define ARV_GVBS_CURRENT_IP_CONFIGURATION_OFFSET 0x00000014
-#define ARV_GVBS_IP_CONFIGURATION_LLA 1 << 29
-#define ARV_GVBS_IP_CONFIGURATION_DHCP 1 << 30
-#define ARV_GVBS_IP_CONFIGURATION_PERSISTENT 1 << 31
+#define ARV_GVBS_IP_CONFIGURATION_PERSISTENT 1 << 0
+#define ARV_GVBS_IP_CONFIGURATION_DHCP 1 << 1
+#define ARV_GVBS_IP_CONFIGURATION_LLA 1 << 2
#define ARV_GVBS_CURRENT_IP_ADDRESS_OFFSET 0x00000024
#define ARV_GVBS_CURRENT_SUBNET_MASK_OFFSET 0x00000034
@@ -87,13 +87,13 @@ G_BEGIN_DECLS
#define ARV_GVBS_N_STREAM_CHANNELS_OFFSET 0x00000904
#define ARV_GVBS_GVCP_CAPABILITY_OFFSET 0x00000934
-#define ARV_GVBS_GVCP_CAPABILITY_NAME_REGISTER 1 << 0
-#define ARV_GVBS_GVCP_CAPABILITY_SERIAL_NUMBER 1 << 1
-#define ARV_GVBS_GVCP_CAPABILITY_EVENT_DATA 1 << 27
-#define ARV_GVBS_GVCP_CAPABILITY_EVENT 1 << 28
-#define ARV_GVBS_GVCP_CAPABILITY_PACKET_RESEND 1 << 29
-#define ARV_GVBS_GVCP_CAPABILITY_WRITE_MEMORY 1 << 30
-#define ARV_GVBS_GVCP_CAPABILITY_CONCATENATION 1 << 31
+#define ARV_GVBS_GVCP_CAPABILITY_CONCATENATION 1 << 0
+#define ARV_GVBS_GVCP_CAPABILITY_WRITE_MEMORY 1 << 1
+#define ARV_GVBS_GVCP_CAPABILITY_PACKET_RESEND 1 << 2
+#define ARV_GVBS_GVCP_CAPABILITY_EVENT 1 << 3
+#define ARV_GVBS_GVCP_CAPABILITY_EVENT_DATA 1 << 4
+#define ARV_GVBS_GVCP_CAPABILITY_SERIAL_NUMBER 1 << 30
+#define ARV_GVBS_GVCP_CAPABILITY_NAME_REGISTER 1 << 31
#define ARV_GVBS_HEARTBEAT_TIMEOUT_OFFSET 0x00000938
#define ARV_GVBS_TIMESTAMP_TICK_FREQUENCY_HIGH_OFFSET 0x0000093c
@@ -103,17 +103,17 @@ G_BEGIN_DECLS
#define ARV_GVBS_TIMESTAMP_LATCHED_VALUE_LOW_OFFSET 0x0000094c
#define ARV_GVBS_CONTROL_CHANNEL_PRIVILEGE_OFFSET 0x00000a00
-#define ARV_GVBS_CONTROL_CHANNEL_PRIVILEGE_CONTROL 1 << 30
-#define ARV_GVBS_CONTROL_CHANNEL_PRIVILEGE_EXCLUSIVE 1 << 31
+#define ARV_GVBS_CONTROL_CHANNEL_PRIVILEGE_CONTROL 1 << 1
+#define ARV_GVBS_CONTROL_CHANNEL_PRIVILEGE_EXCLUSIVE 1 << 0
#define ARV_GVBS_STREAM_CHANNEL_0_PORT_OFFSET 0x00000d00
#define ARV_GVBS_STREAM_CHANNEL_0_PACKET_SIZE_OFFSET 0x00000d04
-#define ARV_GVBS_STREAM_CHANNEL_0_PACKET_SIZE_MASK 0xffff0000
-#define ARV_GVBS_STREAM_CHANNEL_0_PACKET_SIZE_POS 16
-#define ARV_GVBS_STREAM_CHANNEL_0_PACKET_SIZE_FIRE_TEST 1 << 0
-#define ARV_GVBS_STREAM_CHANNEL_0_PACKET_DO_NOT_FRAGMENT 1 << 1
-#define ARV_GVBS_STREAM_CHANNEL_0_PACKET_BIG_ENDIAN 1 << 2
+#define ARV_GVBS_STREAM_CHANNEL_0_PACKET_SIZE_MASK 0x0000ffff
+#define ARV_GVBS_STREAM_CHANNEL_0_PACKET_SIZE_POS 0
+#define ARV_GVBS_STREAM_CHANNEL_0_PACKET_BIG_ENDIAN 1 << 29
+#define ARV_GVBS_STREAM_CHANNEL_0_PACKET_DO_NOT_FRAGMENT 1 << 30
+#define ARV_GVBS_STREAM_CHANNEL_0_PACKET_SIZE_FIRE_TEST 1 << 31
#define ARV_GVBS_STREAM_CHANNEL_0_PACKET_DELAY_OFFSET 0x00000d08
diff --git a/src/arvgvdevice.c b/src/arvgvdevice.c
index ffa8b72..360a4c5 100644
--- a/src/arvgvdevice.c
+++ b/src/arvgvdevice.c
@@ -290,7 +290,8 @@ static gboolean
arv_gv_device_take_control (ArvGvDevice *gv_device)
{
gv_device->priv->is_controller = arv_device_write_register (ARV_DEVICE (gv_device),
- ARV_GVBS_CONTROL_CHANNEL_PRIVILEGE_OFFSET, 2);
+ ARV_GVBS_CONTROL_CHANNEL_PRIVILEGE_OFFSET,
+ ARV_GVBS_CONTROL_CHANNEL_PRIVILEGE_CONTROL);
return gv_device->priv->is_controller;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]