mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-21 19:29:18 +00:00
Add template for AUTOSTART_PROCESS
This commit is contained in:
parent
c699ccbe30
commit
6355545ded
@ -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
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user