Control of mbed using OSC. Based on code from the Make Controller. Right now you can turn the onboard LEDs on/off and toggle 8 digital out pins. More I/O will be done in the future.

Dependencies:   mbed

Committer:
pehrhovey
Date:
Wed Mar 17 03:17:38 2010 +0000
Revision:
0:439354122597

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pehrhovey 0:439354122597 1 #ifndef LWIPOPTS_H
pehrhovey 0:439354122597 2 #define LWIPOPTS_H
pehrhovey 0:439354122597 3
pehrhovey 0:439354122597 4 #include <string.h>
pehrhovey 0:439354122597 5 #include <stdlib.h>
pehrhovey 0:439354122597 6 //#include <mbed.h>
pehrhovey 0:439354122597 7 #include <stdio.h>
pehrhovey 0:439354122597 8
pehrhovey 0:439354122597 9 #ifdef __cplusplus
pehrhovey 0:439354122597 10 using namespace std;
pehrhovey 0:439354122597 11 #endif
pehrhovey 0:439354122597 12
pehrhovey 0:439354122597 13 // Application specific lwIP Options.
pehrhovey 0:439354122597 14 #define IPv6 0
pehrhovey 0:439354122597 15 #define NO_SYS 1
pehrhovey 0:439354122597 16 #define LWIP_ARP 1
pehrhovey 0:439354122597 17 #define LWIP_RAW 0
pehrhovey 0:439354122597 18 #define LWIP_UDP 1
pehrhovey 0:439354122597 19 #define LWIP_TCP 1
pehrhovey 0:439354122597 20 #define LWIP_DNS 1
pehrhovey 0:439354122597 21 #define LWIP_DHCP 1
pehrhovey 0:439354122597 22 #define LWIP_IGMP 0
pehrhovey 0:439354122597 23 #define LWIP_SNMP 0
pehrhovey 0:439354122597 24 #define LWIP_SOCKET 0
pehrhovey 0:439354122597 25 #define LWIP_NETCONN 0
pehrhovey 0:439354122597 26 #define LWIP_AUTOIP 0
pehrhovey 0:439354122597 27 #define LWIP_CALLBACK_API 1
pehrhovey 0:439354122597 28
pehrhovey 0:439354122597 29 #define MEM_LIBC_MALLOC 1 //had to set this to avoid malloc issues
pehrhovey 0:439354122597 30 #define MEMP_MEM_MALLOC 1
pehrhovey 0:439354122597 31 #define MEM_ALIGNMENT 4
pehrhovey 0:439354122597 32 //#define MEM_SIZE 5000
pehrhovey 0:439354122597 33 #define MEM_SIZE 10000
pehrhovey 0:439354122597 34 //#define MEM_SIZE (EMAC_MEM_SIZE - (2 * SIZEOF_STRUCT_MEM) - MEM_ALIGNMENT)
pehrhovey 0:439354122597 35 #define MEM_POSITION __attribute((section("AHBSRAM1"),aligned))
pehrhovey 0:439354122597 36 // EMAC_MEM_ADDR
pehrhovey 0:439354122597 37
pehrhovey 0:439354122597 38 #define ARP_QUEUEING 0
pehrhovey 0:439354122597 39 #define LWIP_NETIF_HOSTNAME 1
pehrhovey 0:439354122597 40
pehrhovey 0:439354122597 41 #define ARP_TABLE_SIZE 4
pehrhovey 0:439354122597 42
pehrhovey 0:439354122597 43 #define DNS_TABLE_SIZE 1
pehrhovey 0:439354122597 44 #define DNS_USES_STATIC_BUF 0
pehrhovey 0:439354122597 45 // 0 - Stack
pehrhovey 0:439354122597 46 // 1 - RW-MEM
pehrhovey 0:439354122597 47 // 2 - Heap
pehrhovey 0:439354122597 48
pehrhovey 0:439354122597 49 #define IP_FRAG_USES_STATIC_BUF 0
pehrhovey 0:439354122597 50 #define LWIP_STATS 0
pehrhovey 0:439354122597 51
pehrhovey 0:439354122597 52 #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 1
pehrhovey 0:439354122597 53
pehrhovey 0:439354122597 54 #define TCP_SND_BUF 2000
pehrhovey 0:439354122597 55 #define TCP_MSS 0x276
pehrhovey 0:439354122597 56 //0x300
pehrhovey 0:439354122597 57 //#define TCP_SND_QUEUELEN (2 * TCP_SND_BUF/TCP_MSS)
pehrhovey 0:439354122597 58 #define TCP_SND_QUEUELEN 16
pehrhovey 0:439354122597 59 #define MEMP_NUM_TCP_PCB 5
pehrhovey 0:439354122597 60 #define MEMP_NUM_TCP_PCB_LISTEN 8
pehrhovey 0:439354122597 61 #define MEMP_NUM_TCP_SEG 20
pehrhovey 0:439354122597 62 #define MEMP_NUM_PBUF 16
pehrhovey 0:439354122597 63 #define PBUF_POOL_SIZE 6
pehrhovey 0:439354122597 64
pehrhovey 0:439354122597 65 #ifndef HOSTNAME
pehrhovey 0:439354122597 66 #define HOSTNAME "chapala"
pehrhovey 0:439354122597 67 #endif
pehrhovey 0:439354122597 68 #define LWIP_DEBUG 1
pehrhovey 0:439354122597 69 #define LWIP_DBG_TYPES_ON 0x3
pehrhovey 0:439354122597 70 #define LWIP_DBG_MIN_LEVEL 0
pehrhovey 0:439354122597 71 #define MEM_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING)
pehrhovey 0:439354122597 72 //#define TCP_INPUT_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING)
pehrhovey 0:439354122597 73 //#define TCP_OUTPUT_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING)
pehrhovey 0:439354122597 74 //#define NETIF_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING)
pehrhovey 0:439354122597 75 //#define DHCP_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING)
pehrhovey 0:439354122597 76 //#define IP_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING)
pehrhovey 0:439354122597 77 //#define TCP_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING)
pehrhovey 0:439354122597 78 //#define TCP_CWND_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING)
pehrhovey 0:439354122597 79
pehrhovey 0:439354122597 80 #endif