Add template for AUTOSTART_PROCESS

This commit is contained in:
David Kopf 2011-07-11 11:34:04 -04:00
parent c699ccbe30
commit 6355545ded
2 changed files with 28 additions and 1 deletions

View file

@ -32,7 +32,26 @@
/*---------------------------------------------------------------------------*/
//#include "mac_event.h"
#include "uip.h"
//#include "uip.h"
#include <avr/pgmspace.h>
#include <stdio.h>
#include "contiki.h"
/* Template for autostarting processes.
* The AUTOSTART_PROCESS macro is enabled by the compiler switch -DAUTOSTART_ENABLE
* which is applied only to the .co file (this one).
*/
#if 0
PROCESS(hello_process, "Hello process");
AUTOSTART_PROCESSES(&hello_process);
PROCESS_THREAD(hello_process, ev, data)
{
PROCESS_BEGIN();
printf_P(PSTR("Hello!\n"));
PROCESS_END();
}
#endif

View file

@ -551,6 +551,14 @@ uint16_t p=(uint16_t)&__bss_end;
process_start(&storage_process, NULL);
#endif
/* Autostart other processes */
/* There are none in the default build so autostart_processes will be unresolved in the link. */
/* The AUTOSTART_PROCESSES macro which defines it can only be used in the .co module. */
/* See /examples/ravenusbstick/ravenusb.c for an autostart template. */
#if 0
autostart_start(autostart_processes);
#endif
#if ANNOUNCE
#if USB_CONF_RS232
PRINTA("Online.\n");