diff options
| author | WBI\nxf44444 <[email protected]> | 2022-01-26 01:43:05 +0800 |
|---|---|---|
| committer | WBI\nxf44444 <[email protected]> | 2022-01-26 01:43:05 +0800 |
| commit | 8b0f50b7e211ee32ab08ba085ecd74588c3a3c63 (patch) | |
| tree | 75440be5ecd30cc1403a9387851c0530ed057981 /components/drivers/phy | |
| parent | 3be35fecae513b07c35bd6f3992bf7824434bdd6 (diff) | |
| parent | 32a5668593c578b85560338c29d76f3a252c8dbc (diff) | |
Update i2c driver, add read ACK and BUS status check
Diffstat (limited to 'components/drivers/phy')
| -rw-r--r-- | components/drivers/phy/phy.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/drivers/phy/phy.c b/components/drivers/phy/phy.c index 3ed4a1a265..8e91aea99f 100644 --- a/components/drivers/phy/phy.c +++ b/components/drivers/phy/phy.c @@ -1,6 +1,6 @@ /* - * Copyright (c) 2006-2020, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -8,7 +8,7 @@ * Date Author Notes * 2020-09-27 wangqiang first version */ - +#include <stddef.h> #include <rthw.h> #include <rtthread.h> #include <rtdevice.h> @@ -34,9 +34,9 @@ static rt_size_t phy_device_write(rt_device_t dev, rt_off_t pos, const void *buf #ifdef RT_USING_DEVICE_OPS -const static struct rt_device_ops phy_ops = +const static struct rt_device_ops phy_ops = { - RT_NULL, + RT_NULL, RT_NULL, RT_NULL, phy_device_read, @@ -60,7 +60,7 @@ rt_err_t rt_hw_phy_register(struct rt_phy_device *phy, const char *name) device->tx_complete = RT_NULL; #ifdef RT_USING_DEVICE_OPS - device->ops = phy_ops; + device->ops = &phy_ops; #else device->init = NULL; device->open = NULL; |
