Modify code format

This commit is contained in:
dejavudwh 2023-06-14 16:42:00 +08:00 committed by Man, Jianting (Meco)
parent 0131018884
commit 49ae4ab614
1 changed files with 119 additions and 118 deletions

View File

@ -127,7 +127,8 @@ void luminaryif_isr(void)
/* a frame has been received */
result = eth_device_ready((struct eth_device *)&(luminaryif_dev->parent));
if(result != RT_EOK) rt_set_errno(-RT_ERROR);
if (result != RT_EOK)
rt_set_errno(-RT_ERROR);
//
// Disable Ethernet RX Interrupt.
@ -139,7 +140,6 @@ void luminaryif_isr(void)
/* A frame has been transmitted. */
rt_sem_release(&tx_sem);
}
}
/* control the interface */
@ -149,8 +149,10 @@ rt_err_t luminaryif_control(rt_device_t dev, int cmd, void *args)
{
case NIOCTL_GADDR:
/* get mac address */
if(args) rt_memcpy(args, luminaryif_dev_entry.dev_addr, 6);
else return -RT_ERROR;
if (args)
rt_memcpy(args, luminaryif_dev_entry.dev_addr, 6);
else
return -RT_ERROR;
break;
default:
@ -492,4 +494,3 @@ int rt_hw_luminaryif_init(void)
return result;
}