mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_NXP/TARGET_LPC23XX/ethernet_api.c
- Revision:
- 23:8d50de55f208
- Parent:
- 13:0645d8841f51
- Child:
- 250:a49055e7a707
diff -r dbd009839d5e -r 8d50de55f208 targets/hal/TARGET_NXP/TARGET_LPC23XX/ethernet_api.c --- a/targets/hal/TARGET_NXP/TARGET_LPC23XX/ethernet_api.c Fri Sep 13 14:22:58 2013 +0100 +++ b/targets/hal/TARGET_NXP/TARGET_LPC23XX/ethernet_api.c Mon Sep 16 16:15:04 2013 +0100 @@ -697,7 +697,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; @@ -713,7 +713,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; } @@ -762,7 +762,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; }