Commit 6220aea1 authored by Simon Duquennoy's avatar Simon Duquennoy
Browse files

Removing Rime, old platforms, old MAC layers, LLSEC (as a layer), some examples and apps

parent 8a384685
......@@ -9,7 +9,7 @@
*.ihex
*.pyc
*.redbee-econotag
*.econotag
*.econotag
*.native
*.z1
*.minimal-net
......
......@@ -10,10 +10,6 @@
[submodule "cpu/cc26xx-cc13xx/lib/cc13xxware"]
path = cpu/cc26xx-cc13xx/lib/cc13xxware
url = https://github.com/contiki-os/cc13xxware.git
[submodule "platform/stm32nucleo-spirit1/stm32cube-lib"]
path = platform/stm32nucleo-spirit1/stm32cube-lib
url = https://github.com/STclab/stm32nucleo-spirit1-lib
[submodule "tools/sensniff"]
path = tools/sensniff
url = https://github.com/g-oikonomou/sensniff.git
......@@ -14,7 +14,7 @@ before_script:
## Install doxygen
- if [ ${BUILD_CATEGORY:-0} = doxygen ] ; then
sudo add-apt-repository ppa:libreoffice/libreoffice-4-4 -y && sudo apt-get -qq update &&
sudo add-apt-repository ppa:libreoffice/ppa -y && sudo apt-get -qq update &&
sudo apt-get --no-install-suggests --no-install-recommends -qq install doxygen &&
doxygen --version ;
fi
......@@ -27,27 +27,10 @@ before_script:
rm -rf /tmp/msp430 mspgcc*.tar.bz2 &&
msp430-gcc --version
## Install avr toolchain
- $WGET http://atiselsts.github.io/resources/avr-gcc-4.9.2-compiled.tar.bz2 &&
tar xjf avr-gcc*.tar.bz2 -C /tmp/ &&
sudo cp -f -r /tmp/avr-gcc/* /usr/local/ &&
rm -rf /tmp/avr-gcc avr-gcc*.tar.bz2 &&
avr-gcc --version
## Install 32-bit compatibility libraries
- sudo apt-get -qq install libc6:i386 libgcc1:i386 gcc-4.6-base:i386
libstdc++5:i386 libstdc++6:i386
## Install old APCS ARM toolchain for mc1233x and mbxxx
- if [ ${BUILD_ARCH:-0} = arm-apcs ] ; then
$WGET https://raw.githubusercontent.com/wiki/malvira/libmc1322x/files/arm-2008q3-66-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 &&
tar xjf arm-2008q3*.tar.bz2 -C /tmp/ &&
sudo cp -f -r /tmp/arm-2008q3/* /usr/ &&
rm -rf /tmp/arm-2008q3 arm-2008q3*.tar.bz2 &&
sudo apt-get -qq install libconfig-dev uuid-dev libqrencode-dev &&
arm-none-eabi-gcc --version ;
fi
## Install mainline ARM toolchain and srecord.
- if [ ${BUILD_ARCH:-0} = arm-aapcs ] ; then
sudo apt-get -qq install srecord &&
......@@ -58,29 +41,6 @@ before_script:
arm-none-eabi-gcc --version ;
fi
## Install RL78 GCC toolchain
- sudo apt-get install libncurses5:i386 zlib1g:i386
- $WGET http://adamdunkels.github.io/contiki-fork/gnurl78-v13.02-elf_1-2_i386.deb &&
sudo dpkg -i gnurl78*.deb
## Install SDCC from a purpose-built bundle
- if [ ${BUILD_ARCH:-0} = 8051 ] ; then
$WGET https://raw.githubusercontent.com/wiki/g-oikonomou/contiki-sensinode/files/sdcc.tar.gz &&
tar xzf sdcc.tar.gz -C /tmp/ &&
sudo cp -f -r /tmp/sdcc/* /usr/local/ &&
rm -rf /tmp/sdcc sdcc.tar.gz &&
sdcc --version &&
sudo apt-get -qq install srecord ;
fi
## Clone and build cc65 when testing 6502 ports
- if [ ${BUILD_ARCH:-0} = 6502 ] ; then
git clone https://github.com/cc65/cc65 /tmp/cc65 &&
make -C /tmp/cc65 bin apple2enh atarixl c64 c128 &&
sudo make -C /tmp/cc65 avail &&
cc65 --version ;
fi
## Install NXP toolchain
- if [ ${BUILD_ARCH:-0} = jn516x ] ; then
$WGET http://simonduq.github.io/resources/ba-elf-gcc-4.7.4-part1.tar.bz2 &&
......@@ -96,7 +56,7 @@ before_script:
rm -rf /tmp/ba-elf-gcc* /tmp/jn516x-sdk* &&
ba-elf-gcc --version ;
fi
## Install mainline ARM toolchain and download nRF52 SDK
- if [ ${BUILD_ARCH:-0} = nrf52dk ] ; then
sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa &&
......@@ -135,32 +95,15 @@ env:
## of environment variable defined below
- BUILD_TYPE='doxygen' BUILD_CATEGORY='doxygen'
- BUILD_TYPE='compile-base' BUILD_CATEGORY='compile'
- BUILD_TYPE='compile-tools' BUILD_CATEGORY='compile'
- BUILD_TYPE='collect'
- BUILD_TYPE='collect-lossy'
- BUILD_TYPE='rpl'
- BUILD_TYPE='rpl-non-storing'
- BUILD_TYPE='large-rpl'
- BUILD_TYPE='rime'
- BUILD_TYPE='ipv6'
- BUILD_TYPE='ip64' MAKE_TARGETS='cooja'
- BUILD_TYPE='hello-world'
- BUILD_TYPE='base'
# XXX: netperf disabled b/c it's flaky
# - BUILD_TYPE='netperf' MAKE_TARGETS='cooja'
- BUILD_TYPE='shell'
- BUILD_TYPE='elfloader'
# Tests under the ipv4 dir are individually disabled. Thus the entire job can be off
# - BUILD_TYPE='ipv4'
- BUILD_TYPE='ipv6-apps'
- BUILD_TYPE='compile-8051-ports' BUILD_CATEGORY='compile' BUILD_ARCH='8051'
- BUILD_TYPE='compile-arm-apcs-ports' BUILD_CATEGORY='compile' BUILD_ARCH='arm-apcs'
- BUILD_TYPE='compile-6502-ports' BUILD_CATEGORY='compile' BUILD_ARCH='6502'
- BUILD_TYPE='compile-arm-ports' BUILD_CATEGORY='compile' BUILD_ARCH='arm-aapcs'
- BUILD_TYPE='compile-nxp-ports' BUILD_CATEGORY='compile' BUILD_ARCH='jn516x'
- BUILD_TYPE='compile-nrf52-ports' BUILD_CATEGORY='compile' BUILD_ARCH='nrf52dk'
- BUILD_TYPE='compile-tools' BUILD_CATEGORY='compile'
- BUILD_TYPE='hello-world'
- BUILD_TYPE='base'
- BUILD_TYPE='ipv6'
- BUILD_TYPE='ip64' MAKE_TARGETS='cooja'
- BUILD_TYPE='slip-radio' MAKE_TARGETS='cooja'
- BUILD_TYPE='llsec' MAKE_TARGETS='cooja'
- BUILD_TYPE='compile-avr' BUILD_CATEGORY='compile' BUILD_ARCH='avr-rss2'
- BUILD_TYPE='ieee802154'
- BUILD_TYPE='tsch'
- BUILD_TYPE='rpl-non-storing'
......@@ -72,12 +72,6 @@ ifeq ($(CONTIKI_WITH_IPV4),1)
MODULES += core/net/ipv4 core/net/ip
endif
ifeq ($(CONTIKI_WITH_RIME),1)
HAS_STACK = 1
CFLAGS += -DNETSTACK_CONF_WITH_RIME=1
MODULES += core/net/rime
endif
# Make IPv6 the default stack
ifeq ($(HAS_STACK),0)
ifneq ($(CONTIKI_WITH_IPV6),0)
......@@ -102,8 +96,8 @@ endif
CONTIKI_SOURCEFILES += $(CONTIKIFILES)
CONTIKIDIRS += ${addprefix $(CONTIKI)/core/,dev lib net net/llsec net/mac net/rime \
net/rpl sys cfs ctk lib/ctk loader . }
CONTIKIDIRS += ${addprefix $(CONTIKI)/core/,dev lib net net/mac \
net/rpl sys cfs . }
oname = ${patsubst %.c,%.o,${patsubst %.S,%.o,$(1)}}
......@@ -127,8 +121,7 @@ ifdef APPS
APPINCLUDES = ${foreach APP, $(APPS), ${wildcard ${foreach DIR, $(APPDS), $(DIR)/Makefile.$(APP)}}}
-include $(APPINCLUDES)
APP_SOURCES = ${foreach APP, $(APPS), $($(APP)_src)}
DSC_SOURCES = ${foreach APP, $(APPS), $($(APP)_dsc)}
CONTIKI_SOURCEFILES += $(APP_SOURCES) $(DSC_SOURCES)
CONTIKI_SOURCEFILES += $(APP_SOURCES)
endif
### Include target makefile (TODO Unsafe?)
......
about_src = about.c
about_dsc = about-dsc.c
/*
* Copyright (c) 2003, Adam Dunkels.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This file is part of the Contiki desktop environment
*
*
*/
#include "sys/dsc.h"
/*-----------------------------------------------------------------------------------*/
#if CTK_CONF_ICON_BITMAPS
static unsigned char abouticon_bitmap[3*3*8] = {
0x00, 0x7f, 0x43, 0x4c, 0x58, 0x53, 0x60, 0x6f,
0x00, 0xff, 0x00, 0x7e, 0x00, 0xff, 0x00, 0xff,
0x00, 0xfe, 0xc2, 0x32, 0x1a, 0xca, 0x06, 0xf6,
0x40, 0x5f, 0x40, 0x5f, 0x40, 0x5f, 0x40, 0x4f,
0x00, 0xff, 0x00, 0xff, 0x00, 0xfc, 0x01, 0xf3,
0x02, 0xfa, 0x02, 0x82, 0x3e, 0xfe, 0xfe, 0xfe,
0x60, 0x67, 0x50, 0x59, 0x4c, 0x43, 0x7f, 0x00,
0x07, 0xe7, 0x0f, 0xef, 0x0f, 0x0f, 0xff, 0x00,
0x8e, 0x06, 0x06, 0x06, 0x8e, 0xfe, 0xfe, 0x00
};
#endif /* CTK_CONF_ICON_BITMAPS */
#if CTK_CONF_ICON_TEXTMAPS
static char abouticon_textmap[9] = {
' ', ' ', 'c',
' ', '?', ' ',
'.', ' ', ' '
};
#endif /* CTK_CONF_ICON_TEXTMAPS */
#if CTK_CONF_ICONS
static struct ctk_icon about_icon =
{CTK_ICON("About Contiki", abouticon_bitmap, abouticon_textmap)};
#endif /* CTK_CONF_ICONS */
/*-----------------------------------------------------------------------------------*/
DSC(about_dsc,
"About Contiki",
"about.prg",
about_process,
&about_icon);
/*-----------------------------------------------------------------------------------*/
/*
* Copyright (c) 2003, Adam Dunkels.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This file is part of the Contiki desktop environment
*
*
*/
#ifndef ABOUT_DSC_H_
#define ABOUT_DSC_H_
#include "sys/dsc.h"
DSC_HEADER(about_dsc);
#endif /* ABOUT_DSC_H_ */
/*
* Copyright (c) 2002, Adam Dunkels.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This file is part of the Contiki desktop environment
*
*
*/
#include <string.h>
#include "contiki.h"
#include "ctk/ctk.h"
#include "lib/petsciiconv.h"
static struct ctk_window aboutdialog;
static struct ctk_label aboutlabel1 =
{CTK_LABEL(2, 0, 28, 1, "The Contiki Operating System")};
static struct ctk_label aboutlabel2 =
{CTK_LABEL(3, 2, 28, 1, "A modern, Internet-enabled")};
static struct ctk_label aboutlabel3 =
{CTK_LABEL(6, 3, 20, 1, "operating system and")};
static struct ctk_label aboutlabel4 =
{CTK_LABEL(6, 4, 20, 1, "desktop environment.")};
static char abouturl_petscii[] = "http://www.sics.se/~adam/contiki/";
static char abouturl_ascii[40];
static struct ctk_hyperlink abouturl =
{CTK_HYPERLINK(0, 6, 32, "http://www.sics.se/~adam/contiki/",
abouturl_ascii)};
static struct ctk_button aboutclose =
{CTK_BUTTON(12, 8, 5, "Close")};
PROCESS(about_process, "About Contiki");
AUTOSTART_PROCESSES(&about_process);
/*-----------------------------------------------------------------------------------*/
static void
about_quit(void)
{
ctk_dialog_close();
process_exit(&about_process);
LOADER_UNLOAD();
}
/*-----------------------------------------------------------------------------------*/
PROCESS_THREAD(about_process, ev, data)
{
unsigned char width;
PROCESS_BEGIN();
width = ctk_desktop_width(NULL);
strcpy(abouturl_ascii, abouturl_petscii);
petsciiconv_toascii(abouturl_ascii, sizeof(abouturl_ascii));
if(width > 34) {
ctk_dialog_new(&aboutdialog, 32, 9);
} else {
ctk_dialog_new(&aboutdialog, width - 2, 9);
}
CTK_WIDGET_ADD(&aboutdialog, &aboutlabel1);
CTK_WIDGET_ADD(&aboutdialog, &aboutlabel2);
CTK_WIDGET_ADD(&aboutdialog, &aboutlabel3);
CTK_WIDGET_ADD(&aboutdialog, &aboutlabel4);
if(width > 34) {
CTK_WIDGET_ADD(&aboutdialog, &abouturl);
CTK_WIDGET_SET_FLAG(&abouturl, CTK_WIDGET_FLAG_MONOSPACE);
} else {
CTK_WIDGET_SET_XPOS(&aboutlabel1, 0);
CTK_WIDGET_SET_XPOS(&aboutlabel2, 0);
CTK_WIDGET_SET_XPOS(&aboutlabel3, 0);
CTK_WIDGET_SET_XPOS(&aboutlabel4, 0);
CTK_WIDGET_SET_XPOS(&aboutclose, 0);
}
CTK_WIDGET_ADD(&aboutdialog, &aboutclose);
CTK_WIDGET_FOCUS(&aboutdialog, &aboutclose);
ctk_dialog_open(&aboutdialog);
while(1) {
PROCESS_WAIT_EVENT();
if(ev == PROCESS_EVENT_EXIT) {
about_quit();
PROCESS_EXIT();
} else if(ev == ctk_signal_button_activate) {
if(data == (process_data_t)&aboutclose) {
about_quit();
PROCESS_EXIT();
}
} else if(ev == ctk_signal_hyperlink_activate) {
if((struct ctk_widget *)data == (struct ctk_widget *)&abouturl) {
about_quit();
PROCESS_EXIT();
}
}
}
PROCESS_END();
}
/*-----------------------------------------------------------------------------------*/
antelope_src = antelope.c aql-adt.c aql-exec.c aql-lexer.c aql-parser.c \
index.c index-inline.c index-maxheap.c lvm.c relation.c \
result.c storage-cfs.c
antelope_dsc =
calc_src = calc.c
calc_dsc = calc-dsc.c
/*
* Copyright (c) 2003, Adam Dunkels.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This file is part of the Contiki desktop environment
*
*
*/
#include "sys/dsc.h"
/*-----------------------------------------------------------------------------------*/
#if CTK_CONF_ICON_BITMAPS
static unsigned char calcicon_bitmap[3*3*8] = {
0x00, 0x7f, 0x43, 0x4c, 0x58, 0x53, 0x60, 0x6f,
0x00, 0xff, 0x00, 0x7e, 0x00, 0xff, 0x00, 0xff,
0x00, 0xfe, 0xc2, 0x32, 0x1a, 0xca, 0x06, 0xf6,
0x40, 0x5f, 0x40, 0x5f, 0x40, 0x5f, 0x40, 0x4f,
0x00, 0xff, 0x00, 0xff, 0x00, 0xfc, 0x01, 0xf3,
0x02, 0xfa, 0x02, 0x82, 0x3e, 0xfe, 0xfe, 0xfe,
0x60, 0x67, 0x50, 0x59, 0x4c, 0x43, 0x7f, 0x00,
0x07, 0xe7, 0x0f, 0xef, 0x0f, 0x0f, 0xff, 0x00,
0x8e, 0x06, 0x06, 0x06, 0x8e, 0xfe, 0xfe, 0x00
};
#endif /* CTK_CONF_ICON_BITMAPS */
#if CTK_CONF_ICON_TEXTMAPS
static char calcicon_textmap[9] = {
'+', ' ', '-',
' ', '*', ' ',
'=', ' ', '/'
};
#endif /* CTK_CONF_ICON_TEXTMAPS */
#if CTK_CONF_ICONS
static struct ctk_icon calc_icon =
{CTK_ICON("Calculator", calcicon_bitmap, calcicon_textmap)};
#endif /* CTK_CONF_ICONS */
/*-----------------------------------------------------------------------------------*/
DSC(calc_dsc,
"Simple calculator",
"calc.prg",
calc_process,
&calc_icon);
/*-----------------------------------------------------------------------------------*/
/*
* Copyright (c) 2003, Adam Dunkels.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This file is part of the Contiki desktop environment
*
*
*/
#ifndef CALC_DSC_H_
#define CALC_DSC_H_
#include "sys/dsc.h"
DSC_HEADER(calc_dsc);
#endif /* CALC_DSC_H_ */
/*
* Copyright (c) 2003, Adam Dunkels.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This an example program for the Contiki desktop OS
*
*
*/
#include <stddef.h>
#include "contiki.h"
#include "ctk/ctk.h"
static struct ctk_window window;
static char input[16];
static struct ctk_label inputlabel =
{CTK_LABEL(0, 0, 12, 1, input)};
static struct ctk_button button7 =
{CTK_BUTTON(0, 3, 1, "7")};
static struct ctk_button button8 =
{CTK_BUTTON(3, 3, 1, "8")};
static struct ctk_button button9 =
{CTK_BUTTON(6, 3, 1, "9")};
static struct ctk_button button4 =
{CTK_BUTTON(0, 4, 1, "4")};
static struct ctk_button button5 =
{CTK_BUTTON(3, 4, 1, "5")};
static struct ctk_button button6 =
{CTK_BUTTON(6, 4, 1, "6")};
static struct ctk_button button1 =
{CTK_BUTTON(0, 5, 1, "1")};
static struct ctk_button button2 =
{CTK_BUTTON(3, 5, 1, "2")};
static struct ctk_button button3 =
{CTK_BUTTON(6, 5, 1, "3")};
static struct ctk_button button0 =
{CTK_BUTTON(0, 6, 3, " 0 ")};
static struct ctk_button cbutton =
{CTK_BUTTON(0, 2, 1, "C")};
static struct ctk_button divbutton =
{CTK_BUTTON(9, 2, 1, "/")};
static struct ctk_button mulbutton =
{CTK_BUTTON(9, 3, 1, "*")};
static struct ctk_button subbutton =
{CTK_BUTTON(9, 4, 1, "-")};
static struct ctk_button addbutton =
{CTK_BUTTON(9, 5, 1, "+")};
static struct ctk_button calcbutton =
{CTK_BUTTON(9, 6, 1, "=")};
PROCESS(calc_process, "Calculator");
AUTOSTART_PROCESSES(&calc_process);
static unsigned long operand1, operand2;