소스 검색

[spi device] remove _spi_bus_device_control (#5898)

Man, Jianting (Meco) 2 년 전
부모
커밋
c52c1c5521
1개의 변경된 파일2개의 추가작업 그리고 18개의 파일을 삭제
  1. 2 18
      components/drivers/spi/spi_dev.c

+ 2 - 18
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);
     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
 #ifdef RT_USING_DEVICE_OPS
 const static struct rt_device_ops spi_bus_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,
     RT_NULL,
     _spi_bus_device_read,
     _spi_bus_device_read,
     _spi_bus_device_write,
     _spi_bus_device_write,
-    _spi_bus_device_control
+    RT_NULL
 };
 };
 #endif
 #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->close   = RT_NULL;
     device->read    = _spi_bus_device_read;
     device->read    = _spi_bus_device_read;
     device->write   = _spi_bus_device_write;
     device->write   = _spi_bus_device_write;
-    device->control = _spi_bus_device_control;
+    device->control = RT_NULL;
 #endif
 #endif
 
 
     /* register to device manager */
     /* register to device manager */