File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
targets/hal/TARGET_NXP/TARGET_LPC176X Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -26,5 +26,5 @@ void wait_ms(int ms) {
26
26
27
27
void wait_us (int us ) {
28
28
uint32_t start = us_ticker_read ();
29
- while ((us_ticker_read () - start ) < us );
29
+ while ((us_ticker_read () - start ) < ( uint32_t ) us );
30
30
}
Original file line number Diff line number Diff line change @@ -697,7 +697,7 @@ int ethernet_receive() {
697
697
if (receive_idx == -1 ) {
698
698
receive_idx = LPC_EMAC -> RxConsumeIndex ;
699
699
} else {
700
- while (!(rxstat [receive_idx ].Info & RINFO_LAST_FLAG ) && (receive_idx != LPC_EMAC -> RxProduceIndex )) {
700
+ while (!(rxstat [receive_idx ].Info & RINFO_LAST_FLAG ) && (( uint32_t ) receive_idx != LPC_EMAC -> RxProduceIndex )) {
701
701
receive_idx = rinc (receive_idx , NUM_RX_FRAG );
702
702
}
703
703
unsigned int info = rxstat [receive_idx ].Info ;
@@ -713,7 +713,7 @@ int ethernet_receive() {
713
713
LPC_EMAC -> RxConsumeIndex = receive_idx ;
714
714
}
715
715
716
- if (receive_idx == LPC_EMAC -> RxProduceIndex ) {
716
+ if (( uint32_t ) receive_idx == LPC_EMAC -> RxProduceIndex ) {
717
717
receive_idx = -1 ;
718
718
return 0 ;
719
719
}
@@ -762,7 +762,7 @@ int ethernet_read(char *data, int dlen) {
762
762
void * pdst , * psrc ;
763
763
int doff = 0 ;
764
764
765
- if (receive_idx == LPC_EMAC -> RxProduceIndex || receive_idx == -1 ) {
765
+ if (( uint32_t ) receive_idx == LPC_EMAC -> RxProduceIndex || receive_idx == -1 ) {
766
766
return 0 ;
767
767
}
768
768
You can’t perform that action at this time.
0 commit comments