Deleted obsolete sensinode examples
This commit is contained in:
parent
4c95be44ac
commit
e38b419e84
5 changed files with 1 additions and 144 deletions
|
@ -8,9 +8,6 @@ DEFINES+=MODEL_N740
|
||||||
# These examples don't need code banking so we turn it off
|
# These examples don't need code banking so we turn it off
|
||||||
#HAVE_BANKING=1
|
#HAVE_BANKING=1
|
||||||
|
|
||||||
CONTIKI_PROJECT = hello_world clock_test rf_test_rx rf_test_tx
|
|
||||||
|
|
||||||
# New examples added by George Oikonomou - Loughborough University
|
|
||||||
CONTIKI_PROJECT += timer-test blink-hello broadcast-rime
|
CONTIKI_PROJECT += timer-test blink-hello broadcast-rime
|
||||||
|
|
||||||
all: $(CONTIKI_PROJECT)
|
all: $(CONTIKI_PROJECT)
|
||||||
|
|
|
@ -36,13 +36,6 @@ make hello_world DEFINES=MODEL_N601
|
||||||
These make options are defined in /platform/sensinode/Makefile.sensinode
|
These make options are defined in /platform/sensinode/Makefile.sensinode
|
||||||
|
|
||||||
Descriptions of applications:
|
Descriptions of applications:
|
||||||
|
|
||||||
hello_world A simple hello world app.
|
|
||||||
clock_test Test and example of sys/clock.h related features.
|
|
||||||
rf_test_tx Test for transmitting packets
|
|
||||||
rf_test_rc Test for receiving packets
|
|
||||||
|
|
||||||
Recent Additions:
|
|
||||||
udp-ipv6 UDP client-server example over uIPv6. Uses link-local and global
|
udp-ipv6 UDP client-server example over uIPv6. Uses link-local and global
|
||||||
addresses. Button 1 on the client will send an echo request.
|
addresses. Button 1 on the client will send an echo request.
|
||||||
broadcast-rime Just a broadcast rime example, slightly modified
|
broadcast-rime Just a broadcast rime example, slightly modified
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
/**
|
|
||||||
* \file
|
|
||||||
* Basic hello world example
|
|
||||||
* \author
|
|
||||||
* Zach Shelby <zach@sensinode.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "contiki.h"
|
|
||||||
#include <stdio.h> /* For printf() */
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
PROCESS(hello_world_process, "Hello world process");
|
|
||||||
AUTOSTART_PROCESSES(&hello_world_process);
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
PROCESS_THREAD(hello_world_process, ev, data)
|
|
||||||
{
|
|
||||||
|
|
||||||
PROCESS_BEGIN();
|
|
||||||
|
|
||||||
printf("Hello World!\n");
|
|
||||||
|
|
||||||
PROCESS_END();
|
|
||||||
}
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
|
@ -1,60 +0,0 @@
|
||||||
/**
|
|
||||||
* \file
|
|
||||||
* RF test suite, receiver
|
|
||||||
* \author
|
|
||||||
* Zach Shelby <zach@sensinode.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "contiki.h"
|
|
||||||
#include "net/rime.h"
|
|
||||||
#include <stdio.h> /* For printf() */
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
PROCESS(rf_test_process, "RF test RX process");
|
|
||||||
AUTOSTART_PROCESSES(&rf_test_process);
|
|
||||||
|
|
||||||
static struct etimer et;
|
|
||||||
static struct broadcast_conn bc;
|
|
||||||
static const struct broadcast_callbacks broadcast_callbacks = {recv_bc};
|
|
||||||
static struct unicast_conn uc;
|
|
||||||
static const struct unicast_callbacks unicast_callbacks = {recv_uc};
|
|
||||||
|
|
||||||
static void
|
|
||||||
recv_bc(struct broadcast_conn *c, rimeaddr_t *from)
|
|
||||||
{
|
|
||||||
printf("broadcast from %02x.%02x len = %d buf = %s\n",
|
|
||||||
from->u8[0],
|
|
||||||
from->u8[1],
|
|
||||||
packetbuf_datalen(),
|
|
||||||
(char *)packetbuf_dataptr());
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
recv_uc(struct unicast_conn *c, rimeaddr_t *from)
|
|
||||||
{
|
|
||||||
printf("unicast from %02x.%02x len = %d buf = %s\n",
|
|
||||||
from->u8[0],
|
|
||||||
from->u8[1],
|
|
||||||
packetbuf_datalen(),
|
|
||||||
(char *)packetbuf_dataptr());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
PROCESS_THREAD(rf_test_process, ev, data)
|
|
||||||
{
|
|
||||||
|
|
||||||
PROCESS_BEGIN();
|
|
||||||
|
|
||||||
printf("\nStarting CC2430 RF test suite...\n");
|
|
||||||
|
|
||||||
broadcast_open(&bc, 128, &broadcast_callbacks);
|
|
||||||
unicast_open(&uc, 128, &unicast_callbacks);
|
|
||||||
|
|
||||||
while(1) {
|
|
||||||
etimer_set(&et, CLOCK_SECOND);
|
|
||||||
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et));
|
|
||||||
etimer_reset(&et);
|
|
||||||
}
|
|
||||||
|
|
||||||
PROCESS_END();
|
|
||||||
}
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
|
@ -1,50 +0,0 @@
|
||||||
/**
|
|
||||||
* \file
|
|
||||||
* RF test suite, transmitter
|
|
||||||
* \author
|
|
||||||
* Zach Shelby <zach@sensinode.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "contiki.h"
|
|
||||||
#include "net/rime.h"
|
|
||||||
#include <stdio.h> /* For printf() */
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
PROCESS(rf_test_process, "RF test TX process");
|
|
||||||
AUTOSTART_PROCESSES(&rf_test_process);
|
|
||||||
|
|
||||||
static struct etimer et;
|
|
||||||
static struct broadcast_conn bc;
|
|
||||||
static struct unicast_conn uc;
|
|
||||||
rimeaddr_t addr;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
PROCESS_THREAD(rf_test_process, ev, data)
|
|
||||||
{
|
|
||||||
|
|
||||||
PROCESS_BEGIN();
|
|
||||||
|
|
||||||
printf("\nStarting CC2430 RF test suite...\n");
|
|
||||||
|
|
||||||
broadcast_open(&bc, 128, 0);
|
|
||||||
unicast_open(&uc, 128, 0);
|
|
||||||
|
|
||||||
while(1) {
|
|
||||||
etimer_set(&et, CLOCK_SECOND);
|
|
||||||
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et));
|
|
||||||
etimer_reset(&et);
|
|
||||||
|
|
||||||
printf("Sending broadcast packet\n");
|
|
||||||
packetbuf_copyfrom("Hello everyone", 14);
|
|
||||||
broadcast_send(&bc);
|
|
||||||
|
|
||||||
// TODO: Fix, freezes on unicast_send()
|
|
||||||
// printf("Sending unicast packet\n");
|
|
||||||
// addr.u8[0] = 0;
|
|
||||||
// addr.u8[1] = 2;
|
|
||||||
// packetbuf_copyfrom("Hello you", 9);
|
|
||||||
// unicast_send(&uc, &addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
PROCESS_END();
|
|
||||||
}
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
Loading…
Add table
Reference in a new issue