cc3200: Correct MAKE_SOCKADDR and UNPACK_SOCKADDR byte order.

This commit is contained in:
Daniel Campora 2015-04-25 17:54:48 +02:00
parent 8b85d14b92
commit 7c8b4c1a8b
1 changed files with 8 additions and 8 deletions

View File

@ -137,16 +137,16 @@ typedef struct _wlan_obj_t {
addr.sa_family = AF_INET; \
addr.sa_data[0] = port >> 8; \
addr.sa_data[1] = port; \
addr.sa_data[2] = ip[0]; \
addr.sa_data[3] = ip[1]; \
addr.sa_data[4] = ip[2]; \
addr.sa_data[5] = ip[3];
addr.sa_data[2] = ip[3]; \
addr.sa_data[3] = ip[2]; \
addr.sa_data[4] = ip[1]; \
addr.sa_data[5] = ip[0];
#define UNPACK_SOCKADDR(addr, ip, port) port = (addr.sa_data[0] << 8) | addr.sa_data[1]; \
ip[0] = addr.sa_data[2]; \
ip[1] = addr.sa_data[3]; \
ip[2] = addr.sa_data[4]; \
ip[3] = addr.sa_data[5];
ip[0] = addr.sa_data[5]; \
ip[1] = addr.sa_data[4]; \
ip[2] = addr.sa_data[3]; \
ip[3] = addr.sa_data[2];
/******************************************************************************
DECLARE PRIVATE DATA