Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions components/drivers/spi/spi_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
{
Expand All @@ -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

Expand All @@ -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 */
Expand Down