Skip to content

Commit 4cbbf8f

Browse files
committed
Update eth_static_mac_address from mbed master
2 parents 74a34c8 + 5ae0e91 commit 4cbbf8f

File tree

18 files changed

+26
-23
lines changed

18 files changed

+26
-23
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ uVision Project/
4545

4646
*.bak
4747
debug.log
48+
49+
# Ignore OS X Desktop Services Store files
50+
.DS_Store

libraries/mbed/common/pinmap_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ uint32_t pinmap_merge(uint32_t a, uint32_t b) {
4545
}
4646

4747
uint32_t pinmap_peripheral(PinName pin, const PinMap* map) {
48-
if (pin == (uint32_t)NC)
48+
if (pin == (PinName)NC)
4949
return (uint32_t)NC;
5050

5151
while (map->pin != NC) {

libraries/mbed/common/wait_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ void wait_ms(int ms) {
2626

2727
void wait_us(int us) {
2828
uint32_t start = us_ticker_read();
29-
while ((us_ticker_read() - start) < us);
29+
while ((us_ticker_read() - start) < (uint32_t)us);
3030
}

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KL25Z/analogin_api.c

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

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

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KL25Z/analogout_api.c

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

2929
void analogout_init(dac_t *obj, PinName pin) {
3030
obj->dac = (DACName)pinmap_peripheral(pin, PinMap_DAC);
31-
if (obj->dac == (uint32_t)NC) {
31+
if (obj->dac == (DACName)NC) {
3232
error("DAC pin mapping failed");
3333
}
3434

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KL25Z/i2c_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ void i2c_frequency(i2c_t *obj, int hz) {
215215
for (i = 1; i < 5; i*=2) {
216216
for (j = 0; j < 0x40; j++) {
217217
ref = PCLK / (i*ICR[j]);
218-
if (ref > hz)
218+
if (ref > (uint32_t)hz)
219219
continue;
220220
error = hz - ref;
221221
if (error < p_error) {
@@ -392,7 +392,7 @@ int i2c_slave_read(i2c_t *obj, char *data, int length) {
392392
}
393393

394394
int i2c_slave_write(i2c_t *obj, const char *data, int length) {
395-
uint32_t i, count = 0;
395+
int i, count = 0;
396396

397397
// set tx mode
398398
obj->i2c->C1 |= I2C_C1_TX_MASK;

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KL25Z/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 port_n = (uint32_t)pin >> PORT_SHIFT;
2323
uint32_t pin_n = (uint32_t)(pin & 0x7C) >> 2;
@@ -30,7 +30,7 @@ void pin_function(PinName pin, int function) {
3030
}
3131

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

3535
__IO uint32_t* pin_pcr = (__IO uint32_t*)(PORTA_BASE + pin);
3636

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KL25Z/pwmout_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static const PinMap PinMap_PWM[] = {
4848
void pwmout_init(pwmout_t* obj, PinName pin) {
4949
// determine the channel
5050
PWMName pwm = (PWMName)pinmap_peripheral(pin, PinMap_PWM);
51-
if (pwm == (uint32_t)NC)
51+
if (pwm == (PWMName)NC)
5252
error("PwmOut pin mapping failed");
5353

5454
unsigned int port = (unsigned int)pin >> PORT_SHIFT;

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KL25Z/spi_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ void spi_frequency(spi_t *obj, int hz) {
153153
divisor = 2;
154154
for (spr = 0; spr <= 8; spr++, divisor *= 2) {
155155
ref = PCLK / (prescaler*divisor);
156-
if (ref > hz)
156+
if (ref > (uint32_t)hz)
157157
continue;
158158
error = hz - ref;
159159
if (error < p_error) {

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

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

4747
void analogin_init(analogin_t *obj, PinName pin) {
4848
obj->adc = (ADCName)pinmap_peripheral(pin, PinMap_ADC);
49-
if (obj->adc == (uint32_t)NC) {
49+
if (obj->adc == (ADCName)NC) {
5050
error("ADC pin mapping failed");
5151
}
5252

0 commit comments

Comments
 (0)