diff --git a/connectivity/drivers/emac/TARGET_NUVOTON_EMAC/TARGET_M460/m460_eth.c b/connectivity/drivers/emac/TARGET_NUVOTON_EMAC/TARGET_M460/m460_eth.c index d9e3bd0468..7a69c0943a 100644 --- a/connectivity/drivers/emac/TARGET_NUVOTON_EMAC/TARGET_M460/m460_eth.c +++ b/connectivity/drivers/emac/TARGET_NUVOTON_EMAC/TARGET_M460/m460_eth.c @@ -52,14 +52,14 @@ void plat_delay(uint32_t delay) static void mdio_write(int addr, int reg, int data) { synopGMACdevice *gmacdev = &GMACdev[NU_M460_INTF]; - synopGMAC_write_phy_reg(gmacdev->MacBase, addr, reg, data); + synopGMAC_write_phy_reg((u32 *) gmacdev->MacBase, addr, reg, data); } static int mdio_read(int addr, int reg) { synopGMACdevice *gmacdev = &GMACdev[NU_M460_INTF]; uint16_t data; - synopGMAC_read_phy_reg(gmacdev->MacBase, addr, reg, &data); + synopGMAC_read_phy_reg((u32 *) gmacdev->MacBase, addr, reg, &data); return data; } @@ -554,7 +554,7 @@ uint8_t *numaker_eth_get_tx_buf(void) return (NULL); } else { dump_desc(txdesc); - return (txdesc->buffer1); + return (uint8_t *) (txdesc->buffer1); } } diff --git a/connectivity/drivers/emac/TARGET_NUVOTON_EMAC/TARGET_M460/synopGMAC_network_interface.c b/connectivity/drivers/emac/TARGET_NUVOTON_EMAC/TARGET_M460/synopGMAC_network_interface.c index 136379a4ae..53d7c3de66 100644 --- a/connectivity/drivers/emac/TARGET_NUVOTON_EMAC/TARGET_M460/synopGMAC_network_interface.c +++ b/connectivity/drivers/emac/TARGET_NUVOTON_EMAC/TARGET_M460/synopGMAC_network_interface.c @@ -493,7 +493,7 @@ s32 synop_handle_received_data(int intf, u8 **buf) // Chris, to get RX buff #endif } #else - *buf = (u32)((u64)dma_addr1); + *buf = (u8 *)(u32)((u64)dma_addr1); #endif rb->rdy = 1; rb->len = len;