diff options
| author | Man, Jianting (Meco) <[email protected]> | 2022-05-30 06:05:05 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-05-30 18:05:05 +0800 |
| commit | c52c1c5521e95b103686f8b78640168e3b2d4c4b (patch) | |
| tree | 6cdcd50e70ab897ddf5bb15aa1f1dc81bcffc17e /components | |
| parent | 577d619d4c7d3cb4db1e3741f4657dd527eca371 (diff) | |
[spi device] remove _spi_bus_device_control (#5898)
Diffstat (limited to 'components')
| -rw-r--r-- | components/drivers/spi/spi_dev.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/components/drivers/spi/spi_dev.c b/components/drivers/spi/spi_dev.c index 264f5d1856..4b21466b0d 100644 --- a/components/drivers/spi/spi_dev.c +++ b/components/drivers/spi/spi_dev.c @@ -39,22 +39,6 @@ static rt_size_t _spi_bus_device_write(rt_device_t dev, return rt_spi_transfer(bus->owner, buffer, RT_NULL, size); } -static rt_err_t _spi_bus_device_control(rt_device_t dev, - int cmd, - void *args) -{ - /* TODO: add control command handle */ - switch (cmd) - { - case 0: /* set device */ - break; - case 1: - break; - } - - return RT_EOK; -} - #ifdef RT_USING_DEVICE_OPS const static struct rt_device_ops spi_bus_ops = { @@ -63,7 +47,7 @@ const static struct rt_device_ops spi_bus_ops = RT_NULL, _spi_bus_device_read, _spi_bus_device_write, - _spi_bus_device_control + RT_NULL }; #endif @@ -85,7 +69,7 @@ rt_err_t rt_spi_bus_device_init(struct rt_spi_bus *bus, const char *name) device->close = RT_NULL; device->read = _spi_bus_device_read; device->write = _spi_bus_device_write; - device->control = _spi_bus_device_control; + device->control = RT_NULL; #endif /* register to device manager */ |
