From c67a4155d560d7fd9a1989942f0ea46edc77c685 Mon Sep 17 00:00:00 2001 From: nifi Date: Fri, 5 Feb 2010 15:16:02 +0000 Subject: [PATCH] Changed to use tcpip_icmp6_event for ICMP notifications. --- platform/avr-raven/apps/raven-ipso/raven-ipso.c | 7 +++++-- platform/avr-raven/apps/raven-lcd-interface/raven-lcd.c | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/platform/avr-raven/apps/raven-ipso/raven-ipso.c b/platform/avr-raven/apps/raven-ipso/raven-ipso.c index 7effa38ce..3e6cda0a7 100644 --- a/platform/avr-raven/apps/raven-ipso/raven-ipso.c +++ b/platform/avr-raven/apps/raven-ipso/raven-ipso.c @@ -149,8 +149,8 @@ send_frame(uint8_t cmd, uint8_t len, uint8_t *payload) static u8_t raven_gui_loop(process_event_t ev, process_data_t data) { - - switch (ev){ + if(ev == tcpip_icmp6_event) { + switch(*((uint8_t *)data)){ case ICMP6_ECHO_REQUEST: /* We have received a ping request over the air. Send frame back to 3290 */ @@ -161,6 +161,9 @@ raven_gui_loop(process_event_t ev, process_data_t data) Send frame back to 3290 */ send_frame(PING_REPLY, 1, &seqno); break; + } + } else { + switch(ev){ case SERIAL_CMD: /* Check for command from serial port, execute it. */ if (cmd.done){ diff --git a/platform/avr-raven/apps/raven-lcd-interface/raven-lcd.c b/platform/avr-raven/apps/raven-lcd-interface/raven-lcd.c index e1b8f5863..17cb69ccc 100644 --- a/platform/avr-raven/apps/raven-lcd-interface/raven-lcd.c +++ b/platform/avr-raven/apps/raven-lcd-interface/raven-lcd.c @@ -28,7 +28,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $Id: raven-lcd.c,v 1.2 2009/07/08 15:26:17 dak664 Exp $ + * $Id: raven-lcd.c,v 1.3 2010/02/05 15:16:02 nifi Exp $ */ /** @@ -167,8 +167,8 @@ send_frame(uint8_t cmd, uint8_t len, uint8_t *payload) static u8_t raven_gui_loop(process_event_t ev, process_data_t data) { - - switch (ev){ + if(ev == tcpip_icmp6_event) { + switch(*((uint8_t *)data)) { case ICMP6_ECHO_REQUEST: /* We have received a ping request over the air. Send frame back to 3290 */ send_frame(PING_REQUEST, 0, 0); @@ -177,6 +177,9 @@ raven_gui_loop(process_event_t ev, process_data_t data) /* We have received a ping reply over the air. Send frame back to 3290 */ send_frame(PING_REPLY, 1, &seqno); break; + } + } else { + switch(ev){ case SERIAL_CMD: /* Check for command from serial port, execute it. */ if (cmd.done){