aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARM7-AT91SAM7X-WEB-GCC/web
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-05-27 09:30:20 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-05-27 09:30:20 +0000
commitd8e1d5a103aa5cd43e4d7e2437448327aa06ff08 (patch)
tree155d45d623093cdd96cd104b6fe25eb69f6981a0 /demos/ARM7-AT91SAM7X-WEB-GCC/web
parente13185058d7fdb390de10325a21730ab3b0d3ded (diff)
downloadChibiOS-d8e1d5a103aa5cd43e4d7e2437448327aa06ff08.tar.gz
ChibiOS-d8e1d5a103aa5cd43e4d7e2437448327aa06ff08.tar.bz2
ChibiOS-d8e1d5a103aa5cd43e4d7e2437448327aa06ff08.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@310 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARM7-AT91SAM7X-WEB-GCC/web')
-rw-r--r--demos/ARM7-AT91SAM7X-WEB-GCC/web/cc-arch.h9
-rw-r--r--demos/ARM7-AT91SAM7X-WEB-GCC/web/uip-conf.h9
-rw-r--r--demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c8
3 files changed, 17 insertions, 9 deletions
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/web/cc-arch.h b/demos/ARM7-AT91SAM7X-WEB-GCC/web/cc-arch.h
new file mode 100644
index 000000000..744cf56ef
--- /dev/null
+++ b/demos/ARM7-AT91SAM7X-WEB-GCC/web/cc-arch.h
@@ -0,0 +1,9 @@
+#ifndef __CC_ARCH_H__
+#define __CC_ARCH_H__
+
+#define PACK_STRUCT_FIELD(x) x __attribute__((packed))
+#define PACK_STRUCT_STRUCT __attribute__((packed))
+#define PACK_STRUCT_BEGIN
+#define PACK_STRUCT_END
+
+#endif /* __CC_ARCH_H__ */
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/web/uip-conf.h b/demos/ARM7-AT91SAM7X-WEB-GCC/web/uip-conf.h
index 273b7cb71..b6a17c970 100644
--- a/demos/ARM7-AT91SAM7X-WEB-GCC/web/uip-conf.h
+++ b/demos/ARM7-AT91SAM7X-WEB-GCC/web/uip-conf.h
@@ -57,6 +57,8 @@
#include <stdint.h>
+#include <cc-arch.h> /* patched */
+
/**
* 8 bit datatype
*
@@ -86,13 +88,6 @@ typedef uint16_t u16_t;
typedef unsigned short uip_stats_t;
/**
- * Modifier for packed structures.
- *
- * \hideinitializer
- */
-#define UIP_CONF_PACKED __attribute__((packed))
-
-/**
* Maximum number of TCP connections.
*
* \hideinitializer
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c b/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c
index 2a45309f5..425a6366d 100644
--- a/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c
+++ b/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c
@@ -29,6 +29,10 @@
#include <timer.h>
#include <clock-arch.h>
+//#define IPADDR0 192
+//#define IPADDR1 168
+//#define IPADDR2 1
+//#define IPADDR3 20
#define IPADDR0 10
#define IPADDR1 151
#define IPADDR2 218
@@ -130,7 +134,7 @@ msg_t WebThread(void *p) {
while (TRUE) {
uip_len = network_device_read();
if (uip_len > 0) {
- if (BUF->type == htons(UIP_ETHTYPE_IP)) {
+ if (BUF->type == HTONS(UIP_ETHTYPE_IP)) {
uip_arp_ipin();
uip_input();
if (uip_len > 0) {
@@ -138,7 +142,7 @@ msg_t WebThread(void *p) {
network_device_send();
}
}
- else if (BUF->type == htons(UIP_ETHTYPE_ARP)) {
+ else if (BUF->type == HTONS(UIP_ETHTYPE_ARP)) {
uip_arp_arpin();
if (uip_len > 0)
network_device_send();