Skip to content

Commit ec2c155

Browse files
committed
M467: Fix EMAC compile error with IAR
1 parent 679c747 commit ec2c155

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

connectivity/drivers/emac/TARGET_NUVOTON_EMAC/TARGET_M460/m460_eth.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ void plat_delay(uint32_t delay)
5252
static void mdio_write(int addr, int reg, int data)
5353
{
5454
synopGMACdevice *gmacdev = &GMACdev[NU_M460_INTF];
55-
synopGMAC_write_phy_reg(gmacdev->MacBase, addr, reg, data);
55+
synopGMAC_write_phy_reg((u32 *) gmacdev->MacBase, addr, reg, data);
5656
}
5757

5858
static int mdio_read(int addr, int reg)
5959
{
6060
synopGMACdevice *gmacdev = &GMACdev[NU_M460_INTF];
6161
uint16_t data;
62-
synopGMAC_read_phy_reg(gmacdev->MacBase, addr, reg, &data);
62+
synopGMAC_read_phy_reg((u32 *) gmacdev->MacBase, addr, reg, &data);
6363
return data;
6464
}
6565

@@ -554,7 +554,7 @@ uint8_t *numaker_eth_get_tx_buf(void)
554554
return (NULL);
555555
} else {
556556
dump_desc(txdesc);
557-
return (txdesc->buffer1);
557+
return (uint8_t *) (txdesc->buffer1);
558558
}
559559

560560
}

connectivity/drivers/emac/TARGET_NUVOTON_EMAC/TARGET_M460/synopGMAC_network_interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ s32 synop_handle_received_data(int intf, u8 **buf) // Chris, to get RX buff
493493
#endif
494494
}
495495
#else
496-
*buf = (u32)((u64)dma_addr1);
496+
*buf = (u8 *)(u32)((u64)dma_addr1);
497497
#endif
498498
rb->rdy = 1;
499499
rb->len = len;

0 commit comments

Comments
 (0)