59 #include "contiki-lib.h"
60 #include "contiki-net.h"
64 #include "raven-lcd.h"
76 char udp_data[data_len];
86 #define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
87 #define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len])
89 void rs232_send(uint8_t port,
unsigned char c);
98 uip_ip6addr(&ping_addr,0x2001,0x420,0x5FFF,0x7D,0x2D0,0xB7FF,0xFE23,0xE6DB);
130 send_frame(uint8_t cmd, uint8_t len, uint8_t *payload)
144 raven_gui_loop(process_event_t ev, process_data_t data)
146 if(ev == tcpip_icmp6_event) {
147 switch(*((uint8_t *)data)){
150 send_frame(REPORT_PING_BEEP, 0, 0);
154 send_frame(REPORT_PING, 1, &seqno);
166 seqno = cmd.frame[0];
171 sprintf(udp_data,
"T%s\r\n", (
char *)cmd.frame);
172 uip_udp_packet_send(udp_conn, udp_data, data_len);
192 int raven_lcd_serial_input(
unsigned char ch)
213 if (cmd.ndx >= cmd.len+3){
224 cmd.frame[cmd.ndx - 3] = ch;
235 PROCESS(raven_lcd_process,
"Raven LCD interface process");
246 uip_ip6addr(&udp_addr,0x2001,0x420,0x5FFF,0x7D,0x2D0,0xB7FF,0xFE23,0xE6DB);
253 if((error = icmp6_new(
NULL)) == 0) {
256 raven_gui_loop(ev, data);