Oliver Schmidt | 8 May 2006 01:02
Picon

contiki/apps program-handler.c,1.30,1.31

Update of /cvsroot/contiki/contiki/apps
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17426

Modified Files:
	program-handler.c 
Log Message:
Added optional 'Quit' menu entry and confirmation dialog activated by defining
PROGRAM_HANDLER_CONF_QUIT_MENU to be 1.

Index: program-handler.c
===================================================================
RCS file: /cvsroot/contiki/contiki/apps/program-handler.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** program-handler.c	12 May 2005 23:55:18 -0000	1.30
--- program-handler.c	7 May 2006 23:02:54 -0000	1.31
***************
*** 49,52 ****
--- 49,53 ----

  #include <string.h>
+ #include <stdlib.h>

  #include "ek.h"
***************
*** 76,80 ****
--- 77,103 ----
  static unsigned char contikidsclast = 0;

(Continue reading)

Oliver Schmidt | 8 May 2006 01:05
Picon

contiki-cc65/ctk ctk-mouse.c,1.1,1.2

Update of /cvsroot/contiki/contiki-cc65/ctk
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19082

Modified Files:
	ctk-mouse.c 
Log Message:
Now that we have the optional 'Quit' menu entry we should make sure to uninstall the mouse driver for
avoiding dangling interrupts.

Index: ctk-mouse.c
===================================================================
RCS file: /cvsroot/contiki/contiki-cc65/ctk/ctk-mouse.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ctk-mouse.c	9 Apr 2006 15:34:11 -0000	1.1
--- ctk-mouse.c	7 May 2006 23:05:57 -0000	1.2
***************
*** 34,37 ****
--- 34,38 ----
   */

+ #include <stdlib.h>
  #include <mouse.h>

***************
*** 58,62 ****
    if(okay) {
      okay = mouse_install(&mouse_def_callbacks, ctrl.module) == MOUSE_ERR_OK;
!     if(!okay) {
(Continue reading)

Oliver Schmidt | 8 May 2006 01:07
Picon

contiki-apple2/conf program-handler-conf.h,1.4,1.5

Update of /cvsroot/contiki/contiki-apple2/conf
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20178

Modified Files:
	program-handler-conf.h 
Log Message:
Activate the optional 'Quit' menu entry for the apple2enh target.

Index: program-handler-conf.h
===================================================================
RCS file: /cvsroot/contiki/contiki-apple2/conf/program-handler-conf.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** program-handler-conf.h	6 May 2005 22:39:15 -0000	1.4
--- program-handler-conf.h	7 May 2006 23:07:42 -0000	1.5
***************
*** 37,40 ****
--- 37,45 ----

  #define PROGRAM_HANDLER_CONF_MAX_NUMDSCS 4
+ #ifdef __APPLE2__
+ #define PROGRAM_HANDLER_CONF_QUIT_MENU   0
+ #else /* __APPLE2__ */
+ #define PROGRAM_HANDLER_CONF_QUIT_MENU   1
+ #endif /* __APPLE2__ */

  #endif /* __PROGRAM_HANDLER_CONF_H__ */

-------------------------------------------------------
(Continue reading)

Oliver Schmidt | 8 May 2006 01:08
Picon

contiki-apple2/conf ctk-conf.h,1.12,1.13

Update of /cvsroot/contiki/contiki-apple2/conf
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20794

Modified Files:
	ctk-conf.h 
Log Message:
Make room for the optional 'Quit' menu entry for the apple2enh target.

Index: ctk-conf.h
===================================================================
RCS file: /cvsroot/contiki/contiki-apple2/conf/ctk-conf.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** ctk-conf.h	9 Apr 2006 16:48:22 -0000	1.12
--- ctk-conf.h	7 May 2006 23:08:42 -0000	1.13
***************
*** 93,97 ****
--- 93,101 ----
  #define CTK_CONF_MENUWIDTH            16
  /* The maximum number of menu items in each menu. */
+ #ifdef __APPLE2__
  #define CTK_CONF_MAXMENUITEMS         5
+ #else /* __APPLE2__ */
+ #define CTK_CONF_MAXMENUITEMS         6
+ #endif /* __APPLE2__ */

  /* Toggles support for screen savers. */

-------------------------------------------------------
(Continue reading)

Oliver Schmidt | 8 May 2006 01:30
Picon

contiki-apple2/apps welcome.c,1.1,1.2

Update of /cvsroot/contiki/contiki-apple2/apps
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv745

Modified Files:
	welcome.c 
Log Message:
Replaced "Press any key ..." message with 'Close' button to allow for mouse operation.

Index: welcome.c
===================================================================
RCS file: /cvsroot/contiki/contiki-apple2/apps/welcome.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** welcome.c	26 Dec 2004 14:13:34 -0000	1.1
--- welcome.c	7 May 2006 23:30:50 -0000	1.2
***************
*** 56,66 ****
  static struct ctk_label welcomelabel8 =
    {CTK_LABEL(2, 16, 30, 1, "Ctrl-Reset - quit Contiki")};
! static struct ctk_label welcomelabel9 =
!   {CTK_LABEL(4, 19, 25, 1, "Press any key to continue")};
  #else /* __APPLE2__ */
  static struct ctk_label welcomelabel7 =
    {CTK_LABEL(2, 14, 30, 1, "Ctrl-Reset - quit Contiki")};
! static struct ctk_label welcomelabel8 =
!   {CTK_LABEL(4, 17, 25, 1, "Press any key to continue")};
  #endif /* __APPLE2__ */

--- 56,66 ----
(Continue reading)

Oliver Schmidt | 15 May 2006 01:34
Picon

contiki-apple2/conf program-handler-conf.h,1.5,1.6

Update of /cvsroot/contiki/contiki-apple2/conf
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv9676

Modified Files:
	program-handler-conf.h 
Log Message:
A little surprisingly MAX_NUMDSCS needs to accomodate for 'Run...' (and 'Quit').

Index: program-handler-conf.h
===================================================================
RCS file: /cvsroot/contiki/contiki-apple2/conf/program-handler-conf.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** program-handler-conf.h	7 May 2006 23:07:42 -0000	1.5
--- program-handler-conf.h	14 May 2006 23:34:13 -0000	1.6
***************
*** 36,43 ****
  #define __PROGRAM_HANDLER_CONF_H__

- #define PROGRAM_HANDLER_CONF_MAX_NUMDSCS 4
  #ifdef __APPLE2__
  #define PROGRAM_HANDLER_CONF_QUIT_MENU   0
  #else /* __APPLE2__ */
  #define PROGRAM_HANDLER_CONF_QUIT_MENU   1
  #endif /* __APPLE2__ */
--- 36,44 ----
  #define __PROGRAM_HANDLER_CONF_H__

  #ifdef __APPLE2__
(Continue reading)

Oliver Schmidt | 15 May 2006 01:23
Picon

contiki/apps program-handler.c,1.31,1.32

Update of /cvsroot/contiki/contiki/apps
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6117

Modified Files:
	program-handler.c 
Log Message:
Adjusted comment.

Index: program-handler.c
===================================================================
RCS file: /cvsroot/contiki/contiki/apps/program-handler.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** program-handler.c	7 May 2006 23:02:54 -0000	1.31
--- program-handler.c	14 May 2006 23:23:30 -0000	1.32
***************
*** 87,91 ****
  static unsigned char quitmenuitem;

! /* The "Really quit Contiki?" dialog. */
  static struct ctk_window quitdialog;
  static struct ctk_label quitdialoglabel =
--- 87,91 ----
  static unsigned char quitmenuitem;

! /* "Quit" dialog */
  static struct ctk_window quitdialog;
  static struct ctk_label quitdialoglabel =

(Continue reading)

Oliver Schmidt | 17 May 2006 17:25
Picon

contiki/uip uip.h,1.19,1.20

Update of /cvsroot/contiki/contiki/uip
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv18400

Modified Files:
	uip.h 
Log Message:
Removed the #ifdef around the htons in preparation of the upcoming Apple2 banking support.

This #ifdef isn't used in the code base and the histroy doesn't show what it is/was intended for.
Additionally I have no idea how it should be used...

Index: uip.h
===================================================================
RCS file: /cvsroot/contiki/contiki/uip/uip.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** uip.h	9 Mar 2005 10:21:04 -0000	1.19
--- uip.h	17 May 2006 15:25:15 -0000	1.20
***************
*** 989,995 ****
   * network byte order, use the HTONS() macro instead.
   */
- #ifndef htons
  u16_t htons(u16_t val);
- #endif /* htons */

  /**  <at> } */
--- 989,993 ----

(Continue reading)

Oliver Schmidt | 17 May 2006 17:27
Picon

contiki/ek ek.h,1.8,1.9

Update of /cvsroot/contiki/contiki/ek
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv19159

Modified Files:
	ek.h 
Log Message:
Allow to override the macros EK_PROCESS, EK_EVENTHANDLER, EK_POLLHANDLER and EK_PROCESS_INIT in
preparation of the upcoming Apple2 banking support.

Index: ek.h
===================================================================
RCS file: /cvsroot/contiki/contiki/ek/ek.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** ek.h	22 Feb 2005 22:46:33 -0000	1.8
--- ek.h	17 May 2006 15:27:43 -0000	1.9
***************
*** 184,189 ****
--- 184,191 ----
   * \hideinitializer
   */
+ #ifndef EK_PROCESS
  #define EK_PROCESS(name, strname, prio, eventh, pollh, stateptr)	\
    static struct ek_proc name = {NULL, EK_ID_NONE, strname, prio, eventh, pollh, stateptr}
+ #endif /* EK_PROCESS */

  struct ek_proc {
***************
*** 300,311 ****
(Continue reading)

Oliver Schmidt | 17 May 2006 17:55
Picon

contiki-apple2 Makefile.apple2,1.18,1.19 apple2.cfg,1.10,1.11 apple2enh.cfg,1.1,1.2

Update of /cvsroot/contiki/contiki-apple2
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29266

Modified Files:
	Makefile.apple2 apple2.cfg apple2enh.cfg 
Log Message:
Added banking for the apple2enh target.

The machines targeted by apple2enh mostly do have 128kB of RAM. But it's not that easy to make use of banking
in an event driver system like Contiki. Anyway I discovered one scenario feasable: The machines in
question allow to bank in just 8kB of the second 64kB into the address space (at a fixed location).

The Contiki Kernel consists of three major parts: The Event Kernel (EK) which is the base system for
everything else, the Contiki Tool Kit (CTK) which manages the GUI and the network stack (UIP) which does
the TCP/IP handling. Both CTK and UIP make use of EK, but CTK never calls into UIP and vice versa.

The CTK code is a little larger than 8kB while the UIP code (without DNS) is a little smaller than 8kB,
resulting in this setup: The UIP code is moved into the additional 8kB while making sure that the CTK code
"covers" the whole memory area used for banking.

This setup allows most calls out of UIP to go without any banking simply because all callees are always
visible. The only exception to this is ek_post_synch() because UIP uses it for the "Application Upcall"
mechanism and I didn't want to make assumptions on the application code called.

Ordinary calls into UIP are routed through banking functions by conditional name mapping via macros.
Calls into UIP via function pointers only occur for the event and poll handler. And there are fortunately
already macros in place which could be (ob)used.

This is a (working) prototype with these TODOs:
- Make sure /RAM is empty on startup
(Continue reading)


Gmane