/*---------------------------------------------------------------------------*/ PROCESS_THREAD(stest_process, ev, data) { static struct etimer timer; PROCESS_BEGIN(); clrscr_arch(); #ifdef RS232_INTR rs232_arch_init(serial_line_input_byte, 0); #endif etimer_set(&timer, CLOCK_SECOND); log_message("Starting serial test process"); while(1) { PROCESS_WAIT_EVENT(); if (etimer_expired(&timer)) { log_message("Sending serial data now"); rs232_print("GNU's not Unix\n"); etimer_reset(&timer); } if(ev == serial_line_event_message) { log_message(data); } } PROCESS_END(); }
int main(int argc, char **argv) { msp430_init(); rs232_init(0); sensors_init(); rs232_print("uip_init()...\n"); uip_init(); /* rs232_print("resolv_init()...\n"); resolv_init();*/ #if 0 uip_ipaddr(addr, 193,10,67,150); uip_sethostaddr(addr); /* uip_ipaddr(addr, 193,10,66,195); resolv_conf(addr);*/ #else uip_ipaddr(addr, 172,16,0,2); uip_sethostaddr(addr); /* uip_ipaddr(addr, 193,10,66,195); resolv_conf(addr);*/ #endif rs232_print("dispatcher_init()...\n"); dispatcher_init(); rs232_print("slip_drv_init()...\n"); slip_drv_init(NULL); rs232_print("ctk_init()...\n"); /* ctk_init();*/ rs232_print("ctk_vncserver_init()...\n"); /* ctk_vncserver_init(NULL); */ rs232_print("program_handler_init()...\n"); /* program_handler_init();*/ /* rs232_print("processes_init()...\n"); processes_init(NULL);*/ rs232_print("webserver_init()...\n"); /* webserver_init(NULL);*/ sensorcheck_init(NULL); /* program_handler_add(&directory_dsc, "Directory", 1);*/ /* program_handler_add(&about_dsc, "About", 1);*/ /* program_handler_add(&webserver_dsc, "Web server", 1);*/ /* program_handler_add(&www_dsc, "Web browser", 1);*/ /* program_handler_add(&calc_dsc, "Calculator", 0);*/ /* program_handler_add(&processes_dsc, "Processes", 0);*/ rs232_print("program_handler_addd()...\n"); /* program_handler_add(&sensorview_dsc, "Sensors", 1);*/ rs232_print("dispatcher_run()...\n"); beep(); dispatcher_run(); return 0; argv = argv; argc = argc; }