56 #include <lib/random.h>
58 #include "dev/button-sensor.h"
59 #include "dev/battery-sensor.h"
60 #include <dev/watchdog.h>
65 #include <debug-uart.h>
75 #define PRINTF(...) printf(__VA_ARGS__)
81 #ifndef UIP_ROUTER_MODULE
82 #ifdef UIP_CONF_ROUTER_MODULE
83 #define UIP_ROUTER_MODULE UIP_CONF_ROUTER_MODULE
85 #define UIP_ROUTER_MODULE rimeroute
88 extern const struct uip_router UIP_ROUTER_MODULE;
91 SENSORS(&button_sensor);
95 print_processes(
struct process *
const processes[])
97 PRINTF(
"Starting:\n");
99 while(*processes !=
NULL) {
100 PRINTF(
" '%s'\n", (*processes)->name);
108 main(
int argc,
char **argv)
119 dbg_setup_uart(UART_DEBUG_BAUDRATE);
121 PRINTF(
"Initialising Node: %d\n", SEEDEYE_ID);
134 ENERGEST_ON(ENERGEST_TYPE_CPU);
137 SENSORS_ACTIVATE(battery_sensor);
143 init_net(SEEDEYE_ID);
148 print_processes(autostart_processes);
149 autostart_start(autostart_processes);
151 PRINTF(
"Processes running\n");
168 ENERGEST_OFF(ENERGEST_TYPE_CPU);
169 ENERGEST_ON(ENERGEST_TYPE_LPM);
172 asm volatile(
"wait");
175 ENERGEST_OFF(ENERGEST_TYPE_LPM);
176 ENERGEST_ON(ENERGEST_TYPE_CPU);
#define LEDS_RED
LED1 (Red) -> PC0.
void watchdog_start(void)
Starts the WDT in watchdog mode if enabled by user configuration, maximum interval.
void rtimer_init(void)
Initialize the real-time scheduler.
uint32_t pic32_clock_get_peripheral_clock(void)
Calculate the peripheral clock.
PIC32MX initialization routines.
#define NULL
The null pointer.
uint32_t pic32_clock_get_system_clock(void)
Calculate the system clock.
CLOCK interface for PIC32MX (pic32mx795f512l)
void clock_init(void)
Initialize the clock library.
int main(void)
This is main...
void process_init(void)
Initialize the process module.
void random_init(unsigned short seed)
Seed the cc2430 random number generator.
void watchdog_stop(void)
In watchdog mode, the WDT can not be stopped.
void watchdog_periodic(void)
Writes the WDT clear sequence.
void ctimer_init(void)
Initialize the callback timer library.
void process_start(struct process *p, process_data_t data)
Start a process.
Network initialization for the SEEDEYE port.
int process_run(void)
Run the system once - call poll handlers and process one event.
void watchdog_init(void)
Copyright (c) 2014, Analog Devices, Inc.