From b2a6d163fc580b7a551a6973517ea22d8be13576 Mon Sep 17 00:00:00 2001 From: matsutsuka Date: Wed, 19 Sep 2007 12:44:45 +0000 Subject: [PATCH] configuration for serial has been changed. --- platform/pc-6001/Makefile | 7 +++++-- platform/pc-6001/Makefile.pc-6001 | 11 ++++++----- platform/pc-6001/contiki-conf.h | 13 +++++++++---- platform/pc-6001/contiki-serial-main.c | 17 ++++++++++++++--- 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/platform/pc-6001/Makefile b/platform/pc-6001/Makefile index d93288b4c..70ab17b3b 100644 --- a/platform/pc-6001/Makefile +++ b/platform/pc-6001/Makefile @@ -2,7 +2,7 @@ # Makefile for PC-6001 using z80/SDCC # @author Takahide Matsutsuka # -# $Id: Makefile,v 1.1 2007/09/11 12:12:59 matsutsuka Exp $ +# $Id: Makefile,v 1.2 2007/09/19 12:44:45 matsutsuka Exp $ # CONTIKI = ../.. @@ -43,7 +43,7 @@ minimal: serial: rm -f contiki.ihex; - make contiki MEMORY=16K CONTIKI_TARGET_MAIN=contiki-serial-main.c + make contiki MEMORY=32K CONTIKI_TARGET_MAIN=contiki-serial-main.c rom: rm -f contiki.ihex; @@ -51,5 +51,8 @@ rom: slip: rm -f contiki.ihex; make contiki APPS="$(APPS_NETWORK)" PLATFORM_APPS="$(PLATFORM_APPS_NETWORK)" CONTIKI_TARGET_MAIN=contiki-slip-main.c +web: + rm -f contiki.ihex; + make contiki APPS="$(APPS_DESKTOP) $(APPS_NETWORK)" PLATFORM_APPS="$(PLATFORM_APPS_NETWORK)" CONTIKI_TARGET_MAIN=contiki-web-main.c include $(CONTIKI)/Makefile.include diff --git a/platform/pc-6001/Makefile.pc-6001 b/platform/pc-6001/Makefile.pc-6001 index bb5b27b9a..cd144932a 100644 --- a/platform/pc-6001/Makefile.pc-6001 +++ b/platform/pc-6001/Makefile.pc-6001 @@ -2,7 +2,7 @@ # Makefile for PC-6001 using z80/SDCC # @author Takahide Matsutsuka # -# $Id: Makefile.pc-6001,v 1.2 2007/09/11 12:55:35 matsutsuka Exp $ +# $Id: Makefile.pc-6001,v 1.3 2007/09/19 12:44:45 matsutsuka Exp $ # ifndef CONTIKI @@ -27,7 +27,7 @@ endif PLATFORM = $(CONTIKI)/platform/$(TARGET) CONTIKI_TARGET_DIRS = . ctk dev loader CFLAGS += -DMEMORY_$(MEMORY) -DARCH_$(ARCH) -LDFLAGS += $(CFLAGS) --opt-code-size --out-fmt-ihx +LDFLAGS += $(CFLAGS) --opt-code-size --out-fmt-ihx --main-return ifeq ($(MEMORY),16K) LDFLAGS += --code-loc 0xc41d --data-loc @@ -57,17 +57,18 @@ endif CONTIKI_TARGET_SOURCEFILES = \ $(CTK) cfs-ram.c serial.c slip.c \ ctk-conio_arch.c libconio.c + # ctk-conio.c -#you can use the below instead of ctk-conio_arch.c and ctk-conio_arch-asm.hS +#you can use the below instead of ctk-conio_arch.c and ctk-conio_arch-asm.cS #ctk-conio_arch-source.c CONTIKI_ASMFILES += getkey.S isprint_arch.S clock.S rs232-asm.S -CONTIKI_HASMFILES += ctk-conio_arch-asm.hS +CONTIKI_CASMFILES += ctk-conio_arch-asm.cS libconio_arch-asm.cS CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES) -CLEAN += *.asm *.lnk *.sym *.o *.a *.cas *.rom +CLEAN += *.asm *.lnk *.sym *.o *.a *.cas *.rom *.p6 contiki: contiki.p6 diff --git a/platform/pc-6001/contiki-conf.h b/platform/pc-6001/contiki-conf.h index b4e0f0f12..d01eaf287 100644 --- a/platform/pc-6001/contiki-conf.h +++ b/platform/pc-6001/contiki-conf.h @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: contiki-conf.h,v 1.2 2007/09/11 12:55:16 matsutsuka Exp $ + * $Id: contiki-conf.h,v 1.3 2007/09/19 12:44:45 matsutsuka Exp $ * */ @@ -129,9 +129,9 @@ typedef unsigned long clock_time_t; #endif /* uIP configuration */ -#define UIP_CONF_MAX_CONNECTIONS 10 -#define UIP_CONF_MAX_LISTENPORTS 10 -#define UIP_CONF_BUFFER_SIZE 300 +#define UIP_CONF_MAX_CONNECTIONS 2 +#define UIP_CONF_MAX_LISTENPORTS 2 +#define UIP_CONF_BUFFER_SIZE 200 #define UIP_CONF_BYTE_ORDER LITTLE_ENDIAN //#define UIP_CONF_TCP_SPLIT 1 #define UIP_CONF_TCP_SPLIT 0 @@ -139,6 +139,11 @@ typedef unsigned long clock_time_t; //#define UIP_CONF_UDP_CHECKSUMS 1 #define UIP_CONF_UDP_CHECKSUMS 0 +/* uses SLIP */ +#define UIP_CONF_UDP 1 +#define UIP_CONF_LLH_LEN 0 +#define UIP_CONF_BROADCAST 0 + /* Web sever configuration */ #undef WEBSERVER_CONF_LOG_ENABLED diff --git a/platform/pc-6001/contiki-serial-main.c b/platform/pc-6001/contiki-serial-main.c index b8ead8a92..205a72555 100644 --- a/platform/pc-6001/contiki-serial-main.c +++ b/platform/pc-6001/contiki-serial-main.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: contiki-serial-main.c,v 1.1 2007/09/11 12:12:59 matsutsuka Exp $ + * $Id: contiki-serial-main.c,v 1.2 2007/09/19 12:44:45 matsutsuka Exp $ * */ @@ -42,12 +42,18 @@ /* devices */ #include "dev/serial.h" -#include "dev/rs232.h" #include "lib/libconio.h" #include "log.h" -PROCESS(stest_process, "Serial test process"); +#undef RS232_INTR +#ifdef RS232_INTR +void rs232_arch_writeb(u8_t ch); +void rs232_arch_init(int (* callback)(unsigned char), unsigned long ubr); +#else +#include "dev/rs232.h" +#endif +PROCESS(stest_process, "Serial test process"); /*---------------------------------------------------------------------------*/ static void rs232_print(char* str) { @@ -63,6 +69,9 @@ PROCESS_THREAD(stest_process, ev, data) clrscr(); gotoxy(0, 0); +#ifdef RS232_INTR + rs232_arch_init(serial_input_byte, 0); +#endif etimer_set(&timer, CLOCK_SECOND); @@ -93,7 +102,9 @@ main(void) /* start services */ process_start(&etimer_process, NULL); process_start(&serial_process, NULL); +#ifndef RS232_INTR process_start(&rs232_process, NULL); +#endif process_start(&stest_process, NULL); while(1) {