Modify code format
This commit is contained in:
parent
0131018884
commit
49ae4ab614
|
@ -127,7 +127,8 @@ void luminaryif_isr(void)
|
||||||
/* a frame has been received */
|
/* a frame has been received */
|
||||||
result = eth_device_ready((struct eth_device *)&(luminaryif_dev->parent));
|
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.
|
// Disable Ethernet RX Interrupt.
|
||||||
|
@ -139,7 +140,6 @@ void luminaryif_isr(void)
|
||||||
/* A frame has been transmitted. */
|
/* A frame has been transmitted. */
|
||||||
rt_sem_release(&tx_sem);
|
rt_sem_release(&tx_sem);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* control the interface */
|
/* control the interface */
|
||||||
|
@ -149,8 +149,10 @@ rt_err_t luminaryif_control(rt_device_t dev, int cmd, void *args)
|
||||||
{
|
{
|
||||||
case NIOCTL_GADDR:
|
case NIOCTL_GADDR:
|
||||||
/* get mac address */
|
/* get mac address */
|
||||||
if(args) rt_memcpy(args, luminaryif_dev_entry.dev_addr, 6);
|
if (args)
|
||||||
else return -RT_ERROR;
|
rt_memcpy(args, luminaryif_dev_entry.dev_addr, 6);
|
||||||
|
else
|
||||||
|
return -RT_ERROR;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -492,4 +494,3 @@ int rt_hw_luminaryif_init(void)
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue