mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-29 10:30:24 +00:00
[DeviceDrivers] change cmd type.
1. Change 'rt_uint8_t' type of cmd to 'int'; 2. Add waitqueue; 3. Split device ipc header files;
This commit is contained in:
@@ -343,7 +343,7 @@ static rt_err_t enc28j60_init(rt_device_t dev)
|
||||
}
|
||||
|
||||
/* control the interface */
|
||||
static rt_err_t enc28j60_control(rt_device_t dev, rt_uint8_t cmd, void *args)
|
||||
static rt_err_t enc28j60_control(rt_device_t dev, int cmd, void *args)
|
||||
{
|
||||
struct net_device * enc28j60 = (struct net_device *)dev;
|
||||
switch(cmd)
|
||||
|
||||
@@ -54,7 +54,7 @@ static rt_size_t _spi_bus_device_write(rt_device_t dev,
|
||||
}
|
||||
|
||||
static rt_err_t _spi_bus_device_control(rt_device_t dev,
|
||||
rt_uint8_t cmd,
|
||||
int cmd,
|
||||
void *args)
|
||||
{
|
||||
/* TODO: add control command handle */
|
||||
@@ -120,7 +120,7 @@ static rt_size_t _spidev_device_write(rt_device_t dev,
|
||||
}
|
||||
|
||||
static rt_err_t _spidev_device_control(rt_device_t dev,
|
||||
rt_uint8_t cmd,
|
||||
int cmd,
|
||||
void *args)
|
||||
{
|
||||
switch (cmd)
|
||||
|
||||
@@ -117,7 +117,7 @@ static rt_err_t AT45DB_flash_close(rt_device_t dev)
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
static rt_err_t AT45DB_flash_control(rt_device_t dev, rt_uint8_t cmd, void *args)
|
||||
static rt_err_t AT45DB_flash_control(rt_device_t dev, int cmd, void *args)
|
||||
{
|
||||
RT_ASSERT(dev != RT_NULL);
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ static rt_err_t w25qxx_flash_close(rt_device_t dev)
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
static rt_err_t w25qxx_flash_control(rt_device_t dev, rt_uint8_t cmd, void *args)
|
||||
static rt_err_t w25qxx_flash_control(rt_device_t dev, int cmd, void *args)
|
||||
{
|
||||
RT_ASSERT(dev != RT_NULL);
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ static char log_buf[RT_CONSOLEBUF_SIZE];
|
||||
|
||||
void sfud_log_debug(const char *file, const long line, const char *format, ...);
|
||||
|
||||
static rt_err_t rt_sfud_control(rt_device_t dev, rt_uint8_t cmd, void *args) {
|
||||
static rt_err_t rt_sfud_control(rt_device_t dev, int cmd, void *args) {
|
||||
RT_ASSERT(dev != RT_NULL);
|
||||
|
||||
switch (cmd) {
|
||||
|
||||
@@ -173,7 +173,7 @@ static rt_err_t sst25vfxx_flash_close(rt_device_t dev)
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
static rt_err_t sst25vfxx_flash_control(rt_device_t dev, rt_uint8_t cmd, void *args)
|
||||
static rt_err_t sst25vfxx_flash_control(rt_device_t dev, int cmd, void *args)
|
||||
{
|
||||
struct spi_flash_sst25vfxx * spi_flash;
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ static rt_err_t w25qxx_flash_close(rt_device_t dev)
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
static rt_err_t w25qxx_flash_control(rt_device_t dev, rt_uint8_t cmd, void *args)
|
||||
static rt_err_t w25qxx_flash_control(rt_device_t dev, int cmd, void *args)
|
||||
{
|
||||
RT_ASSERT(dev != RT_NULL);
|
||||
|
||||
|
||||
@@ -530,7 +530,7 @@ static rt_size_t rw009_wifi_write(rt_device_t dev, rt_off_t pos, const void *buf
|
||||
return 0;
|
||||
}
|
||||
|
||||
static rt_err_t rw009_wifi_control(rt_device_t dev, rt_uint8_t cmd, void *args)
|
||||
static rt_err_t rw009_wifi_control(rt_device_t dev, int cmd, void *args)
|
||||
{
|
||||
struct rw009_wifi *wifi_device = (struct rw009_wifi *)dev;
|
||||
rt_err_t result = RT_EOK;
|
||||
|
||||
Reference in New Issue
Block a user