configuration for serial has been changed.

This commit is contained in:
matsutsuka 2007-09-19 12:44:45 +00:00
parent eb39a24ad8
commit b2a6d163fc
4 changed files with 34 additions and 14 deletions

View file

@ -2,7 +2,7 @@
# Makefile for PC-6001 using z80/SDCC # Makefile for PC-6001 using z80/SDCC
# @author Takahide Matsutsuka <markn@markn.org> # @author Takahide Matsutsuka <markn@markn.org>
# #
# $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 = ../.. CONTIKI = ../..
@ -43,7 +43,7 @@ minimal:
serial: serial:
rm -f contiki.ihex; 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: rom:
rm -f contiki.ihex; rm -f contiki.ihex;
@ -51,5 +51,8 @@ rom:
slip: slip:
rm -f contiki.ihex; rm -f contiki.ihex;
make contiki APPS="$(APPS_NETWORK)" PLATFORM_APPS="$(PLATFORM_APPS_NETWORK)" CONTIKI_TARGET_MAIN=contiki-slip-main.c 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 include $(CONTIKI)/Makefile.include

View file

@ -2,7 +2,7 @@
# Makefile for PC-6001 using z80/SDCC # Makefile for PC-6001 using z80/SDCC
# @author Takahide Matsutsuka <markn@markn.org> # @author Takahide Matsutsuka <markn@markn.org>
# #
# $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 ifndef CONTIKI
@ -27,7 +27,7 @@ endif
PLATFORM = $(CONTIKI)/platform/$(TARGET) PLATFORM = $(CONTIKI)/platform/$(TARGET)
CONTIKI_TARGET_DIRS = . ctk dev loader CONTIKI_TARGET_DIRS = . ctk dev loader
CFLAGS += -DMEMORY_$(MEMORY) -DARCH_$(ARCH) 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) ifeq ($(MEMORY),16K)
LDFLAGS += --code-loc 0xc41d --data-loc LDFLAGS += --code-loc 0xc41d --data-loc
@ -57,17 +57,18 @@ endif
CONTIKI_TARGET_SOURCEFILES = \ CONTIKI_TARGET_SOURCEFILES = \
$(CTK) cfs-ram.c serial.c slip.c \ $(CTK) cfs-ram.c serial.c slip.c \
ctk-conio_arch.c libconio.c ctk-conio_arch.c libconio.c
# ctk-conio.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 #ctk-conio_arch-source.c
CONTIKI_ASMFILES += getkey.S isprint_arch.S clock.S rs232-asm.S 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) 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 contiki: contiki.p6

View file

@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 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 #endif
/* uIP configuration */ /* uIP configuration */
#define UIP_CONF_MAX_CONNECTIONS 10 #define UIP_CONF_MAX_CONNECTIONS 2
#define UIP_CONF_MAX_LISTENPORTS 10 #define UIP_CONF_MAX_LISTENPORTS 2
#define UIP_CONF_BUFFER_SIZE 300 #define UIP_CONF_BUFFER_SIZE 200
#define UIP_CONF_BYTE_ORDER LITTLE_ENDIAN #define UIP_CONF_BYTE_ORDER LITTLE_ENDIAN
//#define UIP_CONF_TCP_SPLIT 1 //#define UIP_CONF_TCP_SPLIT 1
#define UIP_CONF_TCP_SPLIT 0 #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 1
#define UIP_CONF_UDP_CHECKSUMS 0 #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 */ /* Web sever configuration */
#undef WEBSERVER_CONF_LOG_ENABLED #undef WEBSERVER_CONF_LOG_ENABLED

View file

@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 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 */ /* devices */
#include "dev/serial.h" #include "dev/serial.h"
#include "dev/rs232.h"
#include "lib/libconio.h" #include "lib/libconio.h"
#include "log.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 static void
rs232_print(char* str) { rs232_print(char* str) {
@ -63,6 +69,9 @@ PROCESS_THREAD(stest_process, ev, data)
clrscr(); clrscr();
gotoxy(0, 0); gotoxy(0, 0);
#ifdef RS232_INTR
rs232_arch_init(serial_input_byte, 0);
#endif
etimer_set(&timer, CLOCK_SECOND); etimer_set(&timer, CLOCK_SECOND);
@ -93,7 +102,9 @@ main(void)
/* start services */ /* start services */
process_start(&etimer_process, NULL); process_start(&etimer_process, NULL);
process_start(&serial_process, NULL); process_start(&serial_process, NULL);
#ifndef RS232_INTR
process_start(&rs232_process, NULL); process_start(&rs232_process, NULL);
#endif
process_start(&stest_process, NULL); process_start(&stest_process, NULL);
while(1) { while(1) {