Skip to content

Commit efbc524

Browse files
committed
LPC2368 [GCC_ARM]: Silence some warnings.
1 parent 43acaa4 commit efbc524

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/analogin_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static const PinMap PinMap_ADC[] = {
4242

4343
void analogin_init(analogin_t *obj, PinName pin) {
4444
obj->adc = (ADCName)pinmap_peripheral(pin, PinMap_ADC);
45-
if (obj->adc == (uint32_t)NC) {
45+
if (obj->adc == (ADCName)NC) {
4646
error("ADC pin mapping failed");
4747
}
4848

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/analogout_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static const PinMap PinMap_DAC[] = {
2525

2626
void analogout_init(dac_t *obj, PinName pin) {
2727
obj->dac = (DACName)pinmap_peripheral(pin, PinMap_DAC);
28-
if (obj->dac == (uint32_t)NC) {
28+
if (obj->dac == (DACName)NC) {
2929
error("DAC pin mapping failed");
3030
}
3131

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/ethernet_api.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ int ethernet_receive() {
697697
if(receive_idx == -1) {
698698
receive_idx = LPC_EMAC->RxConsumeIndex;
699699
} 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)) {
701701
receive_idx = rinc(receive_idx, NUM_RX_FRAG);
702702
}
703703
unsigned int info = rxstat[receive_idx].Info;
@@ -713,7 +713,7 @@ int ethernet_receive() {
713713
LPC_EMAC->RxConsumeIndex = receive_idx;
714714
}
715715

716-
if(receive_idx == LPC_EMAC->RxProduceIndex) {
716+
if((uint32_t)receive_idx == LPC_EMAC->RxProduceIndex) {
717717
receive_idx = -1;
718718
return 0;
719719
}
@@ -762,7 +762,7 @@ int ethernet_read(char *data, int dlen) {
762762
void *pdst, *psrc;
763763
int doff = 0;
764764

765-
if(receive_idx == LPC_EMAC->RxProduceIndex || receive_idx == -1) {
765+
if((uint32_t)receive_idx == LPC_EMAC->RxProduceIndex || receive_idx == -1) {
766766
return 0;
767767
}
768768

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/pinmap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "error.h"
1818

1919
void pin_function(PinName pin, int function) {
20-
if (pin == (uint32_t)NC) return;
20+
if (pin == (PinName)NC) return;
2121

2222
uint32_t pin_number = (uint32_t)pin - (uint32_t)P0_0;
2323
int index = pin_number >> 4;
@@ -28,7 +28,7 @@ void pin_function(PinName pin, int function) {
2828
}
2929

3030
void pin_mode(PinName pin, PinMode mode) {
31-
if (pin == (uint32_t)NC) { return; }
31+
if (pin == (PinName)NC) { return; }
3232

3333
uint32_t pin_number = (uint32_t)pin - (uint32_t)P0_0;
3434
int index = pin_number >> 5;

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/pwmout_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static unsigned int pwm_clock_mhz;
5757
void pwmout_init(pwmout_t* obj, PinName pin) {
5858
// determine the channel
5959
PWMName pwm = (PWMName)pinmap_peripheral(pin, PinMap_PWM);
60-
if (pwm == (uint32_t)NC)
60+
if (pwm == (PWMName)NC)
6161
error("PwmOut pin mapping failed");
6262

6363
obj->pwm = pwm;

0 commit comments

Comments
 (0)