mbed library sources

Dependents:   frdm_kl05z_gpio_test

Fork of mbed-src by mbed official

Revision:
29:6ac4027eff2b
Parent:
22:dbd009839d5e
Child:
250:a49055e7a707
--- a/targets/hal/TARGET_NXP/TARGET_LPC408X/ethernet_api.c	Fri Sep 20 10:00:04 2013 +0100
+++ b/targets/hal/TARGET_NXP/TARGET_LPC408X/ethernet_api.c	Mon Sep 23 11:30:07 2013 +0100
@@ -722,7 +722,7 @@
     if(receive_idx == -1) {
       receive_idx = LPC_EMAC->RxConsumeIndex;
     } else {
-        while(!(rxstat[receive_idx].Info & RINFO_LAST_FLAG) && (receive_idx != LPC_EMAC->RxProduceIndex)) {
+        while(!(rxstat[receive_idx].Info & RINFO_LAST_FLAG) && ((uint32_t)receive_idx != LPC_EMAC->RxProduceIndex)) {
             receive_idx  = rinc(receive_idx, NUM_RX_FRAG);
         }
         unsigned int info =   rxstat[receive_idx].Info;
@@ -738,7 +738,7 @@
         LPC_EMAC->RxConsumeIndex = receive_idx;
     }
 
-    if(receive_idx == LPC_EMAC->RxProduceIndex) {
+    if((uint32_t)receive_idx == LPC_EMAC->RxProduceIndex) {
         receive_idx = -1;
         return 0;
     }
@@ -787,7 +787,7 @@
     void        *pdst, *psrc;
     int          doff = 0;
 
-    if(receive_idx == LPC_EMAC->RxProduceIndex || receive_idx == -1) {
+    if((uint32_t)receive_idx == LPC_EMAC->RxProduceIndex || receive_idx == -1) {
         return 0;
     }