diff --git a/bsp/CME_M7/drivers/emac.c b/bsp/CME_M7/drivers/emac.c
index a8837d44c..5f732a8c5 100644
--- a/bsp/CME_M7/drivers/emac.c
+++ b/bsp/CME_M7/drivers/emac.c
@@ -240,7 +240,7 @@ static rt_size_t rt_cme_eth_write (rt_device_t dev, rt_off_t pos, const void* bu
return 0;
}
-static rt_err_t rt_cme_eth_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_cme_eth_control(rt_device_t dev, int cmd, void *args)
{
switch(cmd)
{
diff --git a/bsp/at91sam9260/drivers/macb.c b/bsp/at91sam9260/drivers/macb.c
index 57631185a..be665e09c 100644
--- a/bsp/at91sam9260/drivers/macb.c
+++ b/bsp/at91sam9260/drivers/macb.c
@@ -540,7 +540,7 @@ static rt_size_t rt_macb_write (rt_device_t dev, rt_off_t pos, const void* buffe
return 0;
}
-static rt_err_t rt_macb_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_macb_control(rt_device_t dev, int cmd, void *args)
{
switch(cmd)
{
diff --git a/bsp/dm365/drivers/davinci_emac.c b/bsp/dm365/drivers/davinci_emac.c
index 495785f1f..312f79bc6 100644
--- a/bsp/dm365/drivers/davinci_emac.c
+++ b/bsp/dm365/drivers/davinci_emac.c
@@ -1623,7 +1623,7 @@ static rt_size_t rt_davinci_emac_write (rt_device_t dev, rt_off_t pos, const voi
return 0;
}
-static rt_err_t rt_davinci_emac_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_davinci_emac_control(rt_device_t dev, int cmd, void *args)
{
struct emac_priv *priv = dev->user_data;
switch(cmd)
diff --git a/bsp/dm365/rtconfig.h b/bsp/dm365/rtconfig.h
index b1ed235a0..08843c77d 100644
--- a/bsp/dm365/rtconfig.h
+++ b/bsp/dm365/rtconfig.h
@@ -154,7 +154,6 @@
/* Trace LwIP protocol */
/* #define RT_LWIP_DEBUG */
-//#define RT_LWIP_USING_RT_MEM
//#define RT_LWIP_REASSEMBLY_FRAG
#define SO_REUSE 1
diff --git a/bsp/efm32/dev_lcd.c b/bsp/efm32/dev_lcd.c
index e3b7fd2ef..0a2d469d7 100644
--- a/bsp/efm32/dev_lcd.c
+++ b/bsp/efm32/dev_lcd.c
@@ -364,7 +364,7 @@ static void efm32_spiLcd_drawVLine(rtgui_color_t *c, int x , int y1, int y2)
* @return
* Error code
******************************************************************************/
-static rt_err_t efm32_spiLcd_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t efm32_spiLcd_control (rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/efm32/drv_rtc.c b/bsp/efm32/drv_rtc.c
index 82e9b5869..16604a391 100644
--- a/bsp/efm32/drv_rtc.c
+++ b/bsp/efm32/drv_rtc.c
@@ -83,7 +83,7 @@ static rt_size_t rt_rtc_read(
* @return
* Error code
******************************************************************************/
-static rt_err_t rt_rtc_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_rtc_control(rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev != RT_NULL);
diff --git a/bsp/efm32/rtconfig.h b/bsp/efm32/rtconfig.h
index 91b1e08b8..882e36f39 100644
--- a/bsp/efm32/rtconfig.h
+++ b/bsp/efm32/rtconfig.h
@@ -293,8 +293,6 @@
//#define RT_USING_LWIP
//#define RT_USING_NETUTILS
//#define RT_LWIP_DHCP
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable ICMP protocol*/
diff --git a/bsp/fh8620/drivers/acw.c b/bsp/fh8620/drivers/acw.c
index 1d73f1fec..49e10a3bd 100644
--- a/bsp/fh8620/drivers/acw.c
+++ b/bsp/fh8620/drivers/acw.c
@@ -745,7 +745,7 @@ void reset_dma_buff(enum audio_type type, struct fh_audio_cfg *audio_config)
}
-static rt_err_t fh_audio_ioctl(rt_device_t dev, rt_uint8_t cmd, void *arg)
+static rt_err_t fh_audio_ioctl(rt_device_t dev, int cmd, void *arg)
{
struct fh_audio_cfg_arg *cfg;
diff --git a/bsp/fh8620/drivers/pwm.c b/bsp/fh8620/drivers/pwm.c
index c6c20a259..a9d264563 100644
--- a/bsp/fh8620/drivers/pwm.c
+++ b/bsp/fh8620/drivers/pwm.c
@@ -135,7 +135,7 @@ static rt_err_t fh_pwm_close(rt_device_t dev)
return 0;
}
-static rt_err_t fh_pwm_ioctl(rt_device_t dev, rt_uint8_t cmd, void *arg)
+static rt_err_t fh_pwm_ioctl(rt_device_t dev, int cmd, void *arg)
{
int ret = 0;
struct pwm_device *pwm;
diff --git a/bsp/fh8620/drivers/sadc.c b/bsp/fh8620/drivers/sadc.c
index bc994e521..b1654d295 100644
--- a/bsp/fh8620/drivers/sadc.c
+++ b/bsp/fh8620/drivers/sadc.c
@@ -201,7 +201,7 @@ static rt_err_t fh_sadc_close(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t fh_sadc_ioctl(rt_device_t dev, rt_uint8_t cmd, void *arg)
+static rt_err_t fh_sadc_ioctl(rt_device_t dev, int cmd, void *arg)
{
rt_uint32_t control_reg;
diff --git a/bsp/frdm-k64f/board/drv_emac.c b/bsp/frdm-k64f/board/drv_emac.c
index 01843dc93..b70fb1c31 100644
--- a/bsp/frdm-k64f/board/drv_emac.c
+++ b/bsp/frdm-k64f/board/drv_emac.c
@@ -241,7 +241,7 @@ static rt_size_t k64_emac_write (rt_device_t dev, rt_off_t pos, const void* buff
return 0;
}
-static rt_err_t k64_emac_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t k64_emac_control(rt_device_t dev, int cmd, void *args)
{
struct emac_device *emac;
diff --git a/bsp/frdm-k64f/rtconfig.h b/bsp/frdm-k64f/rtconfig.h
index 5eb4ee030..1cb5eca25 100644
--- a/bsp/frdm-k64f/rtconfig.h
+++ b/bsp/frdm-k64f/rtconfig.h
@@ -103,8 +103,6 @@
#define RT_USING_LWIP
/* Enable LwIP debug output */
//#define RT_LWIP_DEBUG
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable UDP protocol*/
diff --git a/bsp/gd32450z-eval/drivers/drv_enet.c b/bsp/gd32450z-eval/drivers/drv_enet.c
index bbc28f2f5..0f8ce72db 100644
--- a/bsp/gd32450z-eval/drivers/drv_enet.c
+++ b/bsp/gd32450z-eval/drivers/drv_enet.c
@@ -216,7 +216,7 @@ static rt_size_t gd32_emac_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0;
}
-static rt_err_t gd32_emac_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t gd32_emac_control(rt_device_t dev, int cmd, void *args)
{
struct gd32_emac * gd32_emac_device = (struct gd32_emac *)dev;
diff --git a/bsp/gd32450z-eval/drivers/drv_lcd.c b/bsp/gd32450z-eval/drivers/drv_lcd.c
index fd7880f73..b7f97bd14 100644
--- a/bsp/gd32450z-eval/drivers/drv_lcd.c
+++ b/bsp/gd32450z-eval/drivers/drv_lcd.c
@@ -205,7 +205,7 @@ static void tli_config(void)
tli_layer_init(LAYER0, &tli_layer_init_struct);
}
-static rt_err_t rt_lcd_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_lcd_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/gd32450z-eval/rtconfig.h b/bsp/gd32450z-eval/rtconfig.h
index 30614c937..074a5a9fe 100644
--- a/bsp/gd32450z-eval/rtconfig.h
+++ b/bsp/gd32450z-eval/rtconfig.h
@@ -156,8 +156,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
#define RT_USING_LWIP
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable UDP protocol*/
diff --git a/bsp/imx6sx/cortex-a9/drivers/emac_drv.c b/bsp/imx6sx/cortex-a9/drivers/emac_drv.c
index 931fced66..ae61d2601 100644
--- a/bsp/imx6sx/cortex-a9/drivers/emac_drv.c
+++ b/bsp/imx6sx/cortex-a9/drivers/emac_drv.c
@@ -128,7 +128,7 @@ static rt_size_t imx_emac_write (rt_device_t dev, rt_off_t pos, const void* buff
return 0;
}
-static rt_err_t imx_emac_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t imx_emac_control(rt_device_t dev, int cmd, void *args)
{
struct emac_device *emac;
diff --git a/bsp/lm3s8962/drivers/luminaryif.c b/bsp/lm3s8962/drivers/luminaryif.c
index 0c2e4f929..b37497d60 100644
--- a/bsp/lm3s8962/drivers/luminaryif.c
+++ b/bsp/lm3s8962/drivers/luminaryif.c
@@ -142,7 +142,7 @@ void luminaryif_isr(void)
}
/* control the interface */
-rt_err_t luminaryif_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+rt_err_t luminaryif_control(rt_device_t dev, int cmd, void *args)
{
switch(cmd)
{
diff --git a/bsp/lm3s8962/drivers/sdcard.c b/bsp/lm3s8962/drivers/sdcard.c
index 6316b1baf..55bec7463 100644
--- a/bsp/lm3s8962/drivers/sdcard.c
+++ b/bsp/lm3s8962/drivers/sdcard.c
@@ -719,7 +719,7 @@ static rt_size_t rt_sdcard_write (rt_device_t dev, rt_off_t pos, const void* buf
return size;
}
-static rt_err_t rt_sdcard_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_sdcard_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/lm3s8962/drivers/serial.c b/bsp/lm3s8962/drivers/serial.c
index 857281492..35060f826 100644
--- a/bsp/lm3s8962/drivers/serial.c
+++ b/bsp/lm3s8962/drivers/serial.c
@@ -183,7 +183,7 @@ static rt_err_t rt_serial_close(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rt_serial_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/lm3s8962/rtconfig.h b/bsp/lm3s8962/rtconfig.h
index d86802cca..ae7bd5f3d 100644
--- a/bsp/lm3s8962/rtconfig.h
+++ b/bsp/lm3s8962/rtconfig.h
@@ -93,8 +93,6 @@
/* Trace LwIP protocol*/
/* #define RT_LWIP_DEBUG */
-#define RT_LWIP_USING_RT_MEM
-
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
diff --git a/bsp/lm3s9b9x/drivers/luminaryif.c b/bsp/lm3s9b9x/drivers/luminaryif.c
index 4f260dd92..7e161772a 100644
--- a/bsp/lm3s9b9x/drivers/luminaryif.c
+++ b/bsp/lm3s9b9x/drivers/luminaryif.c
@@ -141,7 +141,7 @@ void luminaryif_isr(void)
}
/* control the interface */
-rt_err_t luminaryif_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+rt_err_t luminaryif_control(rt_device_t dev, int cmd, void *args)
{
switch(cmd)
{
diff --git a/bsp/lm3s9b9x/drivers/sdcard.c b/bsp/lm3s9b9x/drivers/sdcard.c
index 6316b1baf..55bec7463 100644
--- a/bsp/lm3s9b9x/drivers/sdcard.c
+++ b/bsp/lm3s9b9x/drivers/sdcard.c
@@ -719,7 +719,7 @@ static rt_size_t rt_sdcard_write (rt_device_t dev, rt_off_t pos, const void* buf
return size;
}
-static rt_err_t rt_sdcard_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_sdcard_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/lm3s9b9x/drivers/serial.c b/bsp/lm3s9b9x/drivers/serial.c
index 857281492..35060f826 100644
--- a/bsp/lm3s9b9x/drivers/serial.c
+++ b/bsp/lm3s9b9x/drivers/serial.c
@@ -183,7 +183,7 @@ static rt_err_t rt_serial_close(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rt_serial_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/lm3s9b9x/rtconfig.h b/bsp/lm3s9b9x/rtconfig.h
index 3b22f3f90..7a0185fc4 100644
--- a/bsp/lm3s9b9x/rtconfig.h
+++ b/bsp/lm3s9b9x/rtconfig.h
@@ -93,8 +93,6 @@
/* Trace LwIP protocol*/
/* #define RT_LWIP_DEBUG */
-#define RT_LWIP_USING_RT_MEM
-
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
diff --git a/bsp/lm4f232/drivers/luminaryif.c b/bsp/lm4f232/drivers/luminaryif.c
index 4511924aa..9ca62fdba 100644
--- a/bsp/lm4f232/drivers/luminaryif.c
+++ b/bsp/lm4f232/drivers/luminaryif.c
@@ -141,7 +141,7 @@ void luminaryif_isr(void)
}
/* control the interface */
-rt_err_t luminaryif_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+rt_err_t luminaryif_control(rt_device_t dev, int cmd, void *args)
{
switch(cmd)
{
diff --git a/bsp/lm4f232/drivers/serial.c b/bsp/lm4f232/drivers/serial.c
index 857281492..35060f826 100644
--- a/bsp/lm4f232/drivers/serial.c
+++ b/bsp/lm4f232/drivers/serial.c
@@ -183,7 +183,7 @@ static rt_err_t rt_serial_close(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rt_serial_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/lm4f232/rtconfig.h b/bsp/lm4f232/rtconfig.h
index 723077dd5..75a826ff4 100644
--- a/bsp/lm4f232/rtconfig.h
+++ b/bsp/lm4f232/rtconfig.h
@@ -94,8 +94,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* #define RT_USING_LWIP */
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable UDP protocol*/
diff --git a/bsp/lpc176x/drivers/emac.c b/bsp/lpc176x/drivers/emac.c
index 5fbcda9c2..fd2df23ec 100644
--- a/bsp/lpc176x/drivers/emac.c
+++ b/bsp/lpc176x/drivers/emac.c
@@ -346,7 +346,7 @@ static rt_size_t lpc17xx_emac_write (rt_device_t dev, rt_off_t pos, const void*
return 0;
}
-static rt_err_t lpc17xx_emac_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t lpc17xx_emac_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/lpc176x/drivers/sd.c b/bsp/lpc176x/drivers/sd.c
index 08eb2201f..6c6c4ef4b 100644
--- a/bsp/lpc176x/drivers/sd.c
+++ b/bsp/lpc176x/drivers/sd.c
@@ -454,7 +454,7 @@ static rt_size_t rt_sdcard_write(rt_device_t dev, rt_off_t pos, const void *buff
return 0;
}
-static rt_err_t rt_sdcard_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_sdcard_control(rt_device_t dev, int cmd, void *args)
{
if (cmd == RT_DEVICE_CTRL_BLK_GETGEOME)
{
diff --git a/bsp/lpc178x/drivers/emac.c b/bsp/lpc178x/drivers/emac.c
index db857b04e..283b00243 100644
--- a/bsp/lpc178x/drivers/emac.c
+++ b/bsp/lpc178x/drivers/emac.c
@@ -370,7 +370,7 @@ static rt_size_t lpc17xx_emac_write (rt_device_t dev, rt_off_t pos, const void*
return 0;
}
-static rt_err_t lpc17xx_emac_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t lpc17xx_emac_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/lpc178x/drivers/lpc17xx_lcd.c b/bsp/lpc178x/drivers/lpc17xx_lcd.c
index c63eeac63..09208e893 100644
--- a/bsp/lpc178x/drivers/lpc17xx_lcd.c
+++ b/bsp/lpc178x/drivers/lpc17xx_lcd.c
@@ -29,7 +29,7 @@ static rt_err_t rt_lcd_init (rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rt_lcd_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_lcd_control (rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/lpc2148/drivers/dm9000.c b/bsp/lpc2148/drivers/dm9000.c
index 8e12670e2..478de46df 100644
--- a/bsp/lpc2148/drivers/dm9000.c
+++ b/bsp/lpc2148/drivers/dm9000.c
@@ -64,7 +64,7 @@ static rt_size_t rt_dm9000_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0;
}
-static rt_err_t rt_dm9000_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_dm9000_control(rt_device_t dev, int cmd, void *args)
{
switch(cmd)
{
diff --git a/bsp/lpc2148/drivers/sd.c b/bsp/lpc2148/drivers/sd.c
index 8fce2fac6..95be32631 100644
--- a/bsp/lpc2148/drivers/sd.c
+++ b/bsp/lpc2148/drivers/sd.c
@@ -38,7 +38,7 @@ static rt_size_t rt_sdcard_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0;
}
-static rt_err_t rt_sdcard_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_sdcard_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/lpc2148/drivers/serial.c b/bsp/lpc2148/drivers/serial.c
index e8dcda2d0..5ad31af34 100644
--- a/bsp/lpc2148/drivers/serial.c
+++ b/bsp/lpc2148/drivers/serial.c
@@ -187,7 +187,7 @@ static rt_err_t rt_serial_close(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rt_serial_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/lpc2478/drivers/serial.c b/bsp/lpc2478/drivers/serial.c
index 9bb95f2e0..37c0d0c2c 100644
--- a/bsp/lpc2478/drivers/serial.c
+++ b/bsp/lpc2478/drivers/serial.c
@@ -160,7 +160,7 @@ static rt_err_t rt_serial_close(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rt_serial_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/lpc408x/drivers/drv_emac.c b/bsp/lpc408x/drivers/drv_emac.c
index 2b6293a95..9f1e9920c 100644
--- a/bsp/lpc408x/drivers/drv_emac.c
+++ b/bsp/lpc408x/drivers/drv_emac.c
@@ -350,7 +350,7 @@ static rt_size_t lpc_emac_write(rt_device_t dev, rt_off_t pos, const void *buffe
return 0;
}
-static rt_err_t lpc_emac_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t lpc_emac_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/lpc408x/drivers/drv_led.c b/bsp/lpc408x/drivers/drv_led.c
index e00f3a2fb..2103e934f 100644
--- a/bsp/lpc408x/drivers/drv_led.c
+++ b/bsp/lpc408x/drivers/drv_led.c
@@ -102,7 +102,7 @@ static rt_size_t rt_led_write(rt_device_t dev, rt_off_t pos,
return index;
}
-static rt_err_t rt_led_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_led_control(rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev == &led.parent);
diff --git a/bsp/lpc43xx/drivers/drv_emac.c b/bsp/lpc43xx/drivers/drv_emac.c
index 80aecff13..a339bdb36 100644
--- a/bsp/lpc43xx/drivers/drv_emac.c
+++ b/bsp/lpc43xx/drivers/drv_emac.c
@@ -371,7 +371,7 @@ static rt_size_t lpc_emac_write(rt_device_t dev, rt_off_t pos, const void *buffe
return 0;
}
-static rt_err_t lpc_emac_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t lpc_emac_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/lpc43xx/drivers/drv_led.c b/bsp/lpc43xx/drivers/drv_led.c
index 21b4514fd..d67344e54 100644
--- a/bsp/lpc43xx/drivers/drv_led.c
+++ b/bsp/lpc43xx/drivers/drv_led.c
@@ -117,7 +117,7 @@ static rt_size_t rt_led_write(rt_device_t dev, rt_off_t pos,
return index;
}
-static rt_err_t rt_led_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_led_control(rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev == &led.parent);
diff --git a/bsp/lpc5410x/drivers/drv_led.c b/bsp/lpc5410x/drivers/drv_led.c
index 59a123a32..d2b778a7d 100644
--- a/bsp/lpc5410x/drivers/drv_led.c
+++ b/bsp/lpc5410x/drivers/drv_led.c
@@ -104,7 +104,7 @@ static rt_size_t rt_led_write(rt_device_t dev, rt_off_t pos,
return index;
}
-static rt_err_t rt_led_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_led_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/lpc54608-LPCXpresso/drivers/drv_emac.c b/bsp/lpc54608-LPCXpresso/drivers/drv_emac.c
index a4787ec86..ffa4dafa1 100644
--- a/bsp/lpc54608-LPCXpresso/drivers/drv_emac.c
+++ b/bsp/lpc54608-LPCXpresso/drivers/drv_emac.c
@@ -468,7 +468,7 @@ static rt_size_t lpc_emac_write(rt_device_t dev, rt_off_t pos, const void *buffe
return 0;
}
-static rt_err_t lpc_emac_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t lpc_emac_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/lpc54608-LPCXpresso/drivers/drv_lcd.c b/bsp/lpc54608-LPCXpresso/drivers/drv_lcd.c
index 5ec421db1..4b6b805f6 100644
--- a/bsp/lpc54608-LPCXpresso/drivers/drv_lcd.c
+++ b/bsp/lpc54608-LPCXpresso/drivers/drv_lcd.c
@@ -365,7 +365,7 @@ static rt_err_t rt_lcd_init(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rt_lcd_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_lcd_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/lpc54608-LPCXpresso/drivers/drv_sd.c b/bsp/lpc54608-LPCXpresso/drivers/drv_sd.c
index d0866ef57..d0b957304 100644
--- a/bsp/lpc54608-LPCXpresso/drivers/drv_sd.c
+++ b/bsp/lpc54608-LPCXpresso/drivers/drv_sd.c
@@ -116,7 +116,7 @@ static rt_size_t rt_mci_write(rt_device_t dev, rt_off_t pos, const void *buffer,
return 0;
}
-static rt_err_t rt_mci_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_mci_control(rt_device_t dev, int cmd, void *args)
{
struct mci_device *mci = (struct mci_device *)dev;
diff --git a/bsp/ls1bdev/drivers/display_controller.c b/bsp/ls1bdev/drivers/display_controller.c
index 1c91ebf8d..060bd0a04 100644
--- a/bsp/ls1bdev/drivers/display_controller.c
+++ b/bsp/ls1bdev/drivers/display_controller.c
@@ -186,7 +186,7 @@ static rt_err_t rt_dc_init(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rt_dc_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_dc_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/ls1cdev/drivers/net/synopGMAC.c b/bsp/ls1cdev/drivers/net/synopGMAC.c
index a092fe66a..930967d79 100644
--- a/bsp/ls1cdev/drivers/net/synopGMAC.c
+++ b/bsp/ls1cdev/drivers/net/synopGMAC.c
@@ -417,7 +417,7 @@ static rt_size_t eth_write(rt_device_t dev, rt_off_t pos, const void* buffer, rt
return 0;
}
-static rt_err_t eth_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t eth_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/ls1cdev/rtconfig.h b/bsp/ls1cdev/rtconfig.h
index 8f8749787..07eed9e2b 100644
--- a/bsp/ls1cdev/rtconfig.h
+++ b/bsp/ls1cdev/rtconfig.h
@@ -141,8 +141,6 @@
#define RT_USING_GMAC_INT_MODE
#define RT_USING_LWIP141
//#define RT_LWIP_DEBUG
-#define RT_LWIP_USING_RT_MEM
-
//
#define RT_LWIP_ICMP
diff --git a/bsp/mb9bf500r/adc.c b/bsp/mb9bf500r/adc.c
index bda08427d..85b4dc36e 100644
--- a/bsp/mb9bf500r/adc.c
+++ b/bsp/mb9bf500r/adc.c
@@ -53,7 +53,7 @@ static rt_err_t rt_adc_init(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rt_adc_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_adc_control(rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev != RT_NULL);
diff --git a/bsp/mb9bf500r/lcd.c b/bsp/mb9bf500r/lcd.c
index f2c0d6374..db2f272a8 100644
--- a/bsp/mb9bf500r/lcd.c
+++ b/bsp/mb9bf500r/lcd.c
@@ -420,7 +420,7 @@ void LCD_PutString(unsigned long x, unsigned long y, char *str)
}
}
-static rt_err_t rt_lcd_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_lcd_control (rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/mb9bf506r/drivers/nand.c b/bsp/mb9bf506r/drivers/nand.c
index ada61e3f9..22427a3d5 100644
--- a/bsp/mb9bf506r/drivers/nand.c
+++ b/bsp/mb9bf506r/drivers/nand.c
@@ -544,7 +544,7 @@ static rt_size_t rt_nand_write (rt_device_t dev, rt_off_t pos,
return size;
}
-static rt_err_t rt_nand_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_nand_control (rt_device_t dev, int cmd, void *args)
{
struct rt_device_nand *nand;
diff --git a/bsp/mb9bf568r/drivers/led.c b/bsp/mb9bf568r/drivers/led.c
index 8a36db40e..20e015cdc 100644
--- a/bsp/mb9bf568r/drivers/led.c
+++ b/bsp/mb9bf568r/drivers/led.c
@@ -113,7 +113,7 @@ static rt_size_t rt_led_write (rt_device_t dev, rt_off_t pos,
return index;
}
-static rt_err_t rt_led_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_led_control (rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev == &fm4_led.parent);
diff --git a/bsp/mb9bf568r/drivers/serial.c b/bsp/mb9bf568r/drivers/serial.c
index 8400445fa..b4d42d510 100644
--- a/bsp/mb9bf568r/drivers/serial.c
+++ b/bsp/mb9bf568r/drivers/serial.c
@@ -230,7 +230,7 @@ static rt_size_t rt_serial_write (rt_device_t dev, rt_off_t pos,
return (rt_uint32_t)ptr - (rt_uint32_t)buffer;
}
-static rt_err_t rt_serial_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control (rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev != RT_NULL);
diff --git a/bsp/mb9bf618s/drivers/led.c b/bsp/mb9bf618s/drivers/led.c
index 15fe12b4f..e36e70ca4 100644
--- a/bsp/mb9bf618s/drivers/led.c
+++ b/bsp/mb9bf618s/drivers/led.c
@@ -115,7 +115,7 @@ static rt_size_t rt_led_write (rt_device_t dev, rt_off_t pos,
return index;
}
-static rt_err_t rt_led_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_led_control (rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev == &fm3_led.parent);
diff --git a/bsp/mb9bf618s/drivers/serial.c b/bsp/mb9bf618s/drivers/serial.c
index 6d63daebb..50e3d3782 100644
--- a/bsp/mb9bf618s/drivers/serial.c
+++ b/bsp/mb9bf618s/drivers/serial.c
@@ -230,7 +230,7 @@ static rt_size_t rt_serial_write (rt_device_t dev, rt_off_t pos,
return (rt_uint32_t)ptr - (rt_uint32_t)buffer;
}
-static rt_err_t rt_serial_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control (rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev != RT_NULL);
diff --git a/bsp/mini2440/drivers/dm9000.c b/bsp/mini2440/drivers/dm9000.c
index 527be3b7b..e3f1f0d63 100644
--- a/bsp/mini2440/drivers/dm9000.c
+++ b/bsp/mini2440/drivers/dm9000.c
@@ -344,7 +344,7 @@ static rt_size_t rt_dm9000_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0;
}
-static rt_err_t rt_dm9000_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_dm9000_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/mini2440/drivers/key.c b/bsp/mini2440/drivers/key.c
index 22e0b3e88..3c73c7a78 100644
--- a/bsp/mini2440/drivers/key.c
+++ b/bsp/mini2440/drivers/key.c
@@ -201,7 +201,7 @@ static rt_size_t rt_key_read (rt_device_t dev, rt_off_t pos, void* buffer, rt_si
return (rt_uint32_t)ptr - (rt_uint32_t)buffer;
}
-static rt_err_t rt_key_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_key_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/mini2440/drivers/lcd_a70.c b/bsp/mini2440/drivers/lcd_a70.c
index 583513dc6..02a89b9d4 100644
--- a/bsp/mini2440/drivers/lcd_a70.c
+++ b/bsp/mini2440/drivers/lcd_a70.c
@@ -203,7 +203,7 @@ static rt_err_t rt_lcd_init (rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rt_lcd_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_lcd_control (rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/mini2440/drivers/lcd_n35.c b/bsp/mini2440/drivers/lcd_n35.c
index 3aac4209b..bcd3b85b8 100644
--- a/bsp/mini2440/drivers/lcd_n35.c
+++ b/bsp/mini2440/drivers/lcd_n35.c
@@ -204,7 +204,7 @@ static rt_err_t rt_lcd_init (rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rt_lcd_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_lcd_control (rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/mini2440/drivers/lcd_t35.c b/bsp/mini2440/drivers/lcd_t35.c
index 7f63bb3f9..ef424a7bf 100644
--- a/bsp/mini2440/drivers/lcd_t35.c
+++ b/bsp/mini2440/drivers/lcd_t35.c
@@ -205,7 +205,7 @@ static rt_err_t rt_lcd_init (rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rt_lcd_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_lcd_control (rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/mini2440/drivers/lcd_x35.c b/bsp/mini2440/drivers/lcd_x35.c
index f67c5b554..679d433f9 100644
--- a/bsp/mini2440/drivers/lcd_x35.c
+++ b/bsp/mini2440/drivers/lcd_x35.c
@@ -210,7 +210,7 @@ S3C2410_LCDCON5_INVVLINE | S3C2410_LCDCON5_INVVCLK | S3C2410_LCDCON5_PWREN| S3C2
return RT_EOK;
}
-static rt_err_t rt_lcd_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_lcd_control (rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/mini2440/drivers/sdcard.c b/bsp/mini2440/drivers/sdcard.c
index e75e98380..4d26676cd 100644
--- a/bsp/mini2440/drivers/sdcard.c
+++ b/bsp/mini2440/drivers/sdcard.c
@@ -383,7 +383,7 @@ static rt_err_t rt_sdcard_close(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rt_sdcard_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_sdcard_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/mini2440/drivers/touch.c b/bsp/mini2440/drivers/touch.c
index 49d5f713a..08d41080b 100644
--- a/bsp/mini2440/drivers/touch.c
+++ b/bsp/mini2440/drivers/touch.c
@@ -402,7 +402,7 @@ static rt_err_t rtgui_touch_init(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rtgui_touch_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rtgui_touch_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/mini2440/rtconfig.h b/bsp/mini2440/rtconfig.h
index 78f5c51f6..cbe7e4c99 100644
--- a/bsp/mini2440/rtconfig.h
+++ b/bsp/mini2440/rtconfig.h
@@ -128,8 +128,6 @@
//
#define RT_USING_LWIP
-//
-#define RT_LWIP_USING_RT_MEM
//
#define RT_LWIP_ICMP
//
diff --git a/bsp/mini4020/drivers/dm9161.c b/bsp/mini4020/drivers/dm9161.c
index 2b02650dd..cae98435e 100644
--- a/bsp/mini4020/drivers/dm9161.c
+++ b/bsp/mini4020/drivers/dm9161.c
@@ -526,7 +526,7 @@ static rt_size_t rt_dm9161_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0;
}
-static rt_err_t rt_dm9161_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_dm9161_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/mini4020/drivers/sdcard.c b/bsp/mini4020/drivers/sdcard.c
index af3e3fd41..77983c36b 100644
--- a/bsp/mini4020/drivers/sdcard.c
+++ b/bsp/mini4020/drivers/sdcard.c
@@ -503,7 +503,7 @@ static rt_err_t rt_sdcard_close(rt_device_t dev)
*
* @param hook the hook function
*/
-static rt_err_t rt_sdcard_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_sdcard_control(rt_device_t dev, int cmd, void *args)
{
rt_kprintf("cmd = %d\n",cmd);
RT_ASSERT(dev != RT_NULL);
diff --git a/bsp/nios_ii/rtconfig.h b/bsp/nios_ii/rtconfig.h
index 527a8523a..700907e98 100644
--- a/bsp/nios_ii/rtconfig.h
+++ b/bsp/nios_ii/rtconfig.h
@@ -99,8 +99,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
//#define RT_USING_LWIP
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable UDP protocol*/
diff --git a/bsp/nios_ii/uart.c b/bsp/nios_ii/uart.c
index 002499272..65a22db34 100644
--- a/bsp/nios_ii/uart.c
+++ b/bsp/nios_ii/uart.c
@@ -80,7 +80,7 @@ static rt_size_t rt_uart_write(rt_device_t dev, rt_off_t pos, const void* buffer
return size;
}
-static rt_err_t rt_uart_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_uart_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/pic32ethernet/rtconfig.h b/bsp/pic32ethernet/rtconfig.h
index 271e4fa87..6bd11bfe2 100644
--- a/bsp/pic32ethernet/rtconfig.h
+++ b/bsp/pic32ethernet/rtconfig.h
@@ -91,8 +91,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
//#define RT_USING_LWIP
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable UDP protocol*/
diff --git a/bsp/rx/rtconfig.h b/bsp/rx/rtconfig.h
index 69d71c241..e1d6cb3fe 100644
--- a/bsp/rx/rtconfig.h
+++ b/bsp/rx/rtconfig.h
@@ -101,8 +101,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* #define RT_USING_LWIP */
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable UDP protocol*/
diff --git a/bsp/sam7x/drivers/sam7x_emac.c b/bsp/sam7x/drivers/sam7x_emac.c
index 72c979459..14f8ab281 100644
--- a/bsp/sam7x/drivers/sam7x_emac.c
+++ b/bsp/sam7x/drivers/sam7x_emac.c
@@ -386,7 +386,7 @@ rt_err_t sam7xether_init(rt_device_t dev)
}
/* control the interface */
-rt_err_t sam7xether_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+rt_err_t sam7xether_control(rt_device_t dev, int cmd, void *args)
{
switch(cmd)
{
diff --git a/bsp/sam7x/drivers/sd.c b/bsp/sam7x/drivers/sd.c
index 22ee7f125..f024f017a 100644
--- a/bsp/sam7x/drivers/sd.c
+++ b/bsp/sam7x/drivers/sd.c
@@ -552,7 +552,7 @@ static rt_size_t rt_sdcard_write (rt_device_t dev, rt_off_t pos, const void* buf
return size;
}
-static rt_err_t rt_sdcard_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_sdcard_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/sam7x/drivers/serial.c b/bsp/sam7x/drivers/serial.c
index 2267ed3c2..48fe49fed 100644
--- a/bsp/sam7x/drivers/serial.c
+++ b/bsp/sam7x/drivers/serial.c
@@ -335,7 +335,7 @@ static rt_size_t rt_serial_write (rt_device_t dev, rt_off_t pos, const void* buf
return (rt_size_t)ptr - (rt_size_t)buffer;
}
-static rt_err_t rt_serial_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control (rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/sam7x/rtconfig.h b/bsp/sam7x/rtconfig.h
index 84f2a4452..a1c31bc3c 100644
--- a/bsp/sam7x/rtconfig.h
+++ b/bsp/sam7x/rtconfig.h
@@ -83,7 +83,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* Using lighweight TCP/IP protocol stack*/
#define RT_USING_LWIP
-#define RT_LWIP_USING_RT_MEM
/* Trace LwIP protocol*/
/* #define RT_LWIP_DEBUG */
diff --git a/bsp/simulator/drivers/dfs_win32.c b/bsp/simulator/drivers/dfs_win32.c
index a0ebcf5e6..68ac54177 100644
--- a/bsp/simulator/drivers/dfs_win32.c
+++ b/bsp/simulator/drivers/dfs_win32.c
@@ -574,7 +574,7 @@ static rt_size_t nop_write(rt_device_t dev,
return size;
}
-static rt_err_t nop_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t nop_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/simulator/drivers/sd_sim.c b/bsp/simulator/drivers/sd_sim.c
index 866acecd4..77adfba02 100755
--- a/bsp/simulator/drivers/sd_sim.c
+++ b/bsp/simulator/drivers/sd_sim.c
@@ -97,7 +97,7 @@ _err:
return 0;
}
-static rt_err_t rt_sdcard_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_sdcard_control(rt_device_t dev, int cmd, void *args)
{
struct sdcard_device *sd;
unsigned int size;
diff --git a/bsp/simulator/drivers/sdl_fb.c b/bsp/simulator/drivers/sdl_fb.c
index 198b85d0d..bd43a633b 100755
--- a/bsp/simulator/drivers/sdl_fb.c
+++ b/bsp/simulator/drivers/sdl_fb.c
@@ -39,7 +39,7 @@ static rt_err_t sdlfb_close(rt_device_t dev)
}
static rt_mutex_t sdllock;
-static rt_err_t sdlfb_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t sdlfb_control(rt_device_t dev, int cmd, void *args)
{
struct sdlfb_device *device;
diff --git a/bsp/simulator/drivers/tap_netif.c b/bsp/simulator/drivers/tap_netif.c
index 59a5d12e6..a8cd865c5 100644
--- a/bsp/simulator/drivers/tap_netif.c
+++ b/bsp/simulator/drivers/tap_netif.c
@@ -694,7 +694,7 @@ static rt_size_t tap_netif_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0;
}
-static rt_err_t tap_netif_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t tap_netif_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/simulator/pcap/pcap_netif.c b/bsp/simulator/pcap/pcap_netif.c
index 58bc89f7b..d6572c304 100644
--- a/bsp/simulator/pcap/pcap_netif.c
+++ b/bsp/simulator/pcap/pcap_netif.c
@@ -176,7 +176,7 @@ static rt_size_t pcap_netif_write (rt_device_t dev, rt_off_t pos, const void* bu
return 0;
}
-static rt_err_t pcap_netif_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t pcap_netif_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/stm32f107/drivers/msd.c b/bsp/stm32f107/drivers/msd.c
index 3b4e721f1..dc0480403 100644
--- a/bsp/stm32f107/drivers/msd.c
+++ b/bsp/stm32f107/drivers/msd.c
@@ -1630,7 +1630,7 @@ _exit:
return size;
}
-static rt_err_t rt_msd_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_msd_control(rt_device_t dev, int cmd, void *args)
{
struct msd_device * msd = (struct msd_device *)dev;
diff --git a/bsp/stm32f107/drivers/stm32_eth.c b/bsp/stm32f107/drivers/stm32_eth.c
index 13ddb8deb..886ed5765 100644
--- a/bsp/stm32f107/drivers/stm32_eth.c
+++ b/bsp/stm32f107/drivers/stm32_eth.c
@@ -3178,7 +3178,7 @@ static rt_size_t rt_stm32_eth_write (rt_device_t dev, rt_off_t pos, const void*
return 0;
}
-static rt_err_t rt_stm32_eth_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_stm32_eth_control(rt_device_t dev, int cmd, void *args)
{
switch(cmd)
{
diff --git a/bsp/stm32f107/rtconfig.h b/bsp/stm32f107/rtconfig.h
index 914cdd52c..f6e28a521 100644
--- a/bsp/stm32f107/rtconfig.h
+++ b/bsp/stm32f107/rtconfig.h
@@ -103,8 +103,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
#define RT_USING_LWIP
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable UDP protocol*/
diff --git a/bsp/stm32f10x/drivers/dm9000a.c b/bsp/stm32f10x/drivers/dm9000a.c
index a42219a63..a622122c5 100644
--- a/bsp/stm32f10x/drivers/dm9000a.c
+++ b/bsp/stm32f10x/drivers/dm9000a.c
@@ -355,7 +355,7 @@ static rt_size_t rt_dm9000_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0;
}
-static rt_err_t rt_dm9000_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_dm9000_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/stm32f10x/drivers/ili_lcd_general.c b/bsp/stm32f10x/drivers/ili_lcd_general.c
index 75e85a25e..aa90bceb4 100644
--- a/bsp/stm32f10x/drivers/ili_lcd_general.c
+++ b/bsp/stm32f10x/drivers/ili_lcd_general.c
@@ -651,7 +651,7 @@ static rt_err_t lcd_close(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t lcd_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t lcd_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/stm32f10x/drivers/sdcard.c b/bsp/stm32f10x/drivers/sdcard.c
index 5d64bddfc..1aa0c4295 100644
--- a/bsp/stm32f10x/drivers/sdcard.c
+++ b/bsp/stm32f10x/drivers/sdcard.c
@@ -3137,7 +3137,7 @@ static rt_size_t rt_sdcard_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0;
}
-static rt_err_t rt_sdcard_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_sdcard_control(rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev != RT_NULL);
diff --git a/bsp/stm32f10x/drivers/ssd1289.c b/bsp/stm32f10x/drivers/ssd1289.c
index f5bde872f..5a0cf03e4 100644
--- a/bsp/stm32f10x/drivers/ssd1289.c
+++ b/bsp/stm32f10x/drivers/ssd1289.c
@@ -444,7 +444,7 @@ static rt_err_t lcd_close(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t lcd_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t lcd_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/stm32f10x/drivers/stm32f1_rtc.c b/bsp/stm32f10x/drivers/stm32f1_rtc.c
index 2376a0329..68fab1ce0 100644
--- a/bsp/stm32f10x/drivers/stm32f1_rtc.c
+++ b/bsp/stm32f10x/drivers/stm32f1_rtc.c
@@ -34,7 +34,7 @@ static rt_size_t rt_rtc_read(rt_device_t dev, rt_off_t pos, void* buffer, rt_siz
return 0;
}
-static rt_err_t rt_rtc_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_rtc_control(rt_device_t dev, int cmd, void *args)
{
rt_time_t *time;
RT_ASSERT(dev != RT_NULL);
diff --git a/bsp/stm32f10x/drivers/touch.c b/bsp/stm32f10x/drivers/touch.c
index f457b5bc1..2096c4510 100644
--- a/bsp/stm32f10x/drivers/touch.c
+++ b/bsp/stm32f10x/drivers/touch.c
@@ -366,7 +366,7 @@ static rt_err_t rtgui_touch_init (rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rtgui_touch_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rtgui_touch_control (rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/stm32f10x/rtconfig.h b/bsp/stm32f10x/rtconfig.h
index 2cda86f2a..c81e3ccc7 100644
--- a/bsp/stm32f10x/rtconfig.h
+++ b/bsp/stm32f10x/rtconfig.h
@@ -108,8 +108,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* #define RT_USING_LWIP */
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable UDP protocol*/
diff --git a/bsp/stm32f20x/Drivers/24LCxx.c b/bsp/stm32f20x/Drivers/24LCxx.c
index ceeff7227..1142a69aa 100644
--- a/bsp/stm32f20x/Drivers/24LCxx.c
+++ b/bsp/stm32f20x/Drivers/24LCxx.c
@@ -118,7 +118,7 @@ static rt_err_t ee24LCxx_close(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t ee24LCxx_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t ee24LCxx_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/stm32f20x/Drivers/FM25Lx.c b/bsp/stm32f20x/Drivers/FM25Lx.c
index 359c04092..b1437d770 100644
--- a/bsp/stm32f20x/Drivers/FM25Lx.c
+++ b/bsp/stm32f20x/Drivers/FM25Lx.c
@@ -206,7 +206,7 @@ static rt_err_t fm25_close(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t fm25_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t fm25_control(rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev != RT_NULL);
diff --git a/bsp/stm32f20x/Drivers/rtc.c b/bsp/stm32f20x/Drivers/rtc.c
index 9517bba9b..0811b337a 100644
--- a/bsp/stm32f20x/Drivers/rtc.c
+++ b/bsp/stm32f20x/Drivers/rtc.c
@@ -77,7 +77,7 @@ static rt_size_t rt_rtc_read(rt_device_t dev, rt_off_t pos, void* buffer, rt_siz
return 0;
}
-static rt_err_t rt_rtc_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_rtc_control(rt_device_t dev, int cmd, void *args)
{
time_t *time;
struct tm ti,*to;
diff --git a/bsp/stm32f20x/Drivers/sdio_sd.c b/bsp/stm32f20x/Drivers/sdio_sd.c
index 87ab0b62a..4c0689768 100644
--- a/bsp/stm32f20x/Drivers/sdio_sd.c
+++ b/bsp/stm32f20x/Drivers/sdio_sd.c
@@ -2673,7 +2673,7 @@ static rt_size_t rt_sdcard_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0;
}
-static rt_err_t rt_sdcard_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_sdcard_control(rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev != RT_NULL);
diff --git a/bsp/stm32f20x/Drivers/serial.c b/bsp/stm32f20x/Drivers/serial.c
index 381fd842b..644f1a2a5 100644
--- a/bsp/stm32f20x/Drivers/serial.c
+++ b/bsp/stm32f20x/Drivers/serial.c
@@ -253,7 +253,7 @@ static rt_size_t rt_serial_write (rt_device_t dev, rt_off_t pos, const void* buf
return (rt_uint32_t)ptr - (rt_uint32_t)buffer;
}
-static rt_err_t rt_serial_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control (rt_device_t dev, int cmd, void *args)
{
struct stm32_serial_device* uart;
diff --git a/bsp/stm32f20x/Drivers/stm32f2_eth.c b/bsp/stm32f20x/Drivers/stm32f2_eth.c
index 52b5729b8..1876c5bca 100644
--- a/bsp/stm32f20x/Drivers/stm32f2_eth.c
+++ b/bsp/stm32f20x/Drivers/stm32f2_eth.c
@@ -178,7 +178,7 @@ static rt_size_t rt_stm32_eth_write (rt_device_t dev, rt_off_t pos, const void*
return 0;
}
-static rt_err_t rt_stm32_eth_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_stm32_eth_control(rt_device_t dev, int cmd, void *args)
{
switch(cmd)
{
diff --git a/bsp/stm32f20x/rtconfig.h b/bsp/stm32f20x/rtconfig.h
index b26b736f7..ef3725d49 100644
--- a/bsp/stm32f20x/rtconfig.h
+++ b/bsp/stm32f20x/rtconfig.h
@@ -89,8 +89,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* #define RT_USING_LWIP */
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable UDP protocol*/
diff --git a/bsp/stm32f40x/drivers/stm32f4_rtc.c b/bsp/stm32f40x/drivers/stm32f4_rtc.c
index b949f4510..f44949d59 100644
--- a/bsp/stm32f40x/drivers/stm32f4_rtc.c
+++ b/bsp/stm32f40x/drivers/stm32f4_rtc.c
@@ -42,7 +42,7 @@ static rt_size_t rt_rtc_read(rt_device_t dev, rt_off_t pos, void* buffer, rt_siz
return 0;
}
-static rt_err_t rt_rtc_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_rtc_control(rt_device_t dev, int cmd, void *args)
{
rt_time_t *time;
RT_ASSERT(dev != RT_NULL);
diff --git a/bsp/stm32f40x/drivers/stm32f4xx_eth.c b/bsp/stm32f40x/drivers/stm32f4xx_eth.c
index 028e00bd0..dea2f4833 100644
--- a/bsp/stm32f40x/drivers/stm32f4xx_eth.c
+++ b/bsp/stm32f40x/drivers/stm32f4xx_eth.c
@@ -3511,7 +3511,7 @@ static rt_size_t rt_stm32_eth_write (rt_device_t dev, rt_off_t pos, const void*
return 0;
}
-static rt_err_t rt_stm32_eth_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_stm32_eth_control(rt_device_t dev, int cmd, void *args)
{
switch(cmd)
{
diff --git a/bsp/stm32f40x/rtconfig.h b/bsp/stm32f40x/rtconfig.h
index 86c1669d3..df90336d9 100644
--- a/bsp/stm32f40x/rtconfig.h
+++ b/bsp/stm32f40x/rtconfig.h
@@ -108,8 +108,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* #define RT_USING_LWIP */
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable UDP protocol*/
diff --git a/bsp/stm32f429-apollo/drivers/drv_eth.c b/bsp/stm32f429-apollo/drivers/drv_eth.c
index 980083f39..c5538d1c8 100644
--- a/bsp/stm32f429-apollo/drivers/drv_eth.c
+++ b/bsp/stm32f429-apollo/drivers/drv_eth.c
@@ -218,7 +218,7 @@ static rt_size_t rt_stm32_eth_write (rt_device_t dev, rt_off_t pos, const void*
return 0;
}
-static rt_err_t rt_stm32_eth_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_stm32_eth_control(rt_device_t dev, int cmd, void *args)
{
STM32_ETH_PRINTF("rt_stm32_eth_control...\n");
switch(cmd)
diff --git a/bsp/stm32f429-apollo/drivers/drv_lcd.c b/bsp/stm32f429-apollo/drivers/drv_lcd.c
index 21d1a0b0d..2608081ac 100644
--- a/bsp/stm32f429-apollo/drivers/drv_lcd.c
+++ b/bsp/stm32f429-apollo/drivers/drv_lcd.c
@@ -424,7 +424,7 @@ static rt_err_t lcd_close(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t lcd_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t lcd_control(rt_device_t dev, int cmd, void *args)
{
switch (cmd)
{
diff --git a/bsp/stm32f429-apollo/drivers/drv_rtc.c b/bsp/stm32f429-apollo/drivers/drv_rtc.c
index 27f479b05..3318606e8 100644
--- a/bsp/stm32f429-apollo/drivers/drv_rtc.c
+++ b/bsp/stm32f429-apollo/drivers/drv_rtc.c
@@ -223,7 +223,7 @@ static rt_size_t rt_rtc_read(
* @return
* Error code
******************************************************************************/
-static rt_err_t rt_rtc_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_rtc_control(rt_device_t dev, int cmd, void *args)
{
rt_err_t result;
RT_ASSERT(dev != RT_NULL);
diff --git a/bsp/stm32f429-apollo/drivers/drv_sdio_sd.c b/bsp/stm32f429-apollo/drivers/drv_sdio_sd.c
index e0ae1793d..d37543e23 100644
--- a/bsp/stm32f429-apollo/drivers/drv_sdio_sd.c
+++ b/bsp/stm32f429-apollo/drivers/drv_sdio_sd.c
@@ -10,7 +10,7 @@ DMA_HandleTypeDef SDTxDMAHandler,SDRxDMAHandler; //SD
//SD卡初始化
//返回值:0 初始化正确;其他值,初始化错误
- rt_uint8_t SD_Init(void)
+rt_uint8_t SD_Init(void)
{
rt_uint8_t SD_Error;
@@ -320,7 +320,7 @@ static rt_size_t rt_sdcard_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0;
}
-static rt_err_t rt_sdcard_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_sdcard_control(rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev != RT_NULL);
diff --git a/bsp/stm32f429-disco/rtconfig.h b/bsp/stm32f429-disco/rtconfig.h
index d1f72833c..7324ce037 100644
--- a/bsp/stm32f429-disco/rtconfig.h
+++ b/bsp/stm32f429-disco/rtconfig.h
@@ -113,8 +113,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* #define RT_USING_LWIP */
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable UDP protocol*/
diff --git a/bsp/stm32l475-iot-disco/rtconfig.h b/bsp/stm32l475-iot-disco/rtconfig.h
index cf4a69a4a..89428e1cf 100644
--- a/bsp/stm32l475-iot-disco/rtconfig.h
+++ b/bsp/stm32l475-iot-disco/rtconfig.h
@@ -110,8 +110,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* #define RT_USING_LWIP */
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable UDP protocol*/
diff --git a/bsp/stm32l476-nucleo/rtconfig.h b/bsp/stm32l476-nucleo/rtconfig.h
index cf4a69a4a..89428e1cf 100644
--- a/bsp/stm32l476-nucleo/rtconfig.h
+++ b/bsp/stm32l476-nucleo/rtconfig.h
@@ -110,8 +110,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* #define RT_USING_LWIP */
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable UDP protocol*/
diff --git a/bsp/taihu/rtconfig.h b/bsp/taihu/rtconfig.h
index 9e410bc0b..2437f6b2a 100644
--- a/bsp/taihu/rtconfig.h
+++ b/bsp/taihu/rtconfig.h
@@ -76,8 +76,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* #define RT_USING_LWIP */
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable UDP protocol*/
diff --git a/bsp/tm4c129x/drivers/drv_eth.c b/bsp/tm4c129x/drivers/drv_eth.c
index 9d68a5d71..1076aea40 100644
--- a/bsp/tm4c129x/drivers/drv_eth.c
+++ b/bsp/tm4c129x/drivers/drv_eth.c
@@ -1320,7 +1320,7 @@ static rt_err_t eth_dev_init(rt_device_t device)
}
/* control the interface */
-static rt_err_t eth_dev_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t eth_dev_control(rt_device_t dev, int cmd, void *args)
{
switch(cmd)
{
diff --git a/bsp/x86/drivers/console.c b/bsp/x86/drivers/console.c
index 1c1eb05e0..f5c4fe530 100644
--- a/bsp/x86/drivers/console.c
+++ b/bsp/x86/drivers/console.c
@@ -154,7 +154,7 @@ static rt_err_t rt_console_close(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rt_console_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_console_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/bsp/x86/drivers/floppy.c b/bsp/x86/drivers/floppy.c
index 058bf1b94..c7876a68f 100644
--- a/bsp/x86/drivers/floppy.c
+++ b/bsp/x86/drivers/floppy.c
@@ -303,7 +303,7 @@ static rt_size_t rt_floppy_write(rt_device_t device, rt_off_t position, const vo
return size;
}
-static rt_err_t rt_floppy_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_floppy_control(rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev != RT_NULL);
diff --git a/bsp/x86/rtconfig.h b/bsp/x86/rtconfig.h
index 780a1abc9..4ca8423a6 100644
--- a/bsp/x86/rtconfig.h
+++ b/bsp/x86/rtconfig.h
@@ -101,8 +101,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
//#define RT_USING_LWIP
-/* LwIP uses RT-Thread Memory Management */
-#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/
#define RT_LWIP_ICMP
/* Enable UDP protocol*/
diff --git a/bsp/xplorer4330/drivers/drv_led.c b/bsp/xplorer4330/drivers/drv_led.c
index d7e14eb19..48cbd089b 100644
--- a/bsp/xplorer4330/drivers/drv_led.c
+++ b/bsp/xplorer4330/drivers/drv_led.c
@@ -118,7 +118,7 @@ static rt_size_t rt_led_write(rt_device_t dev, rt_off_t pos,
return index;
}
-static rt_err_t rt_led_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_led_control(rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev == &led.parent);
diff --git a/components/utilities/logtrace/log_file.c b/components/utilities/logtrace/log_file.c
index 7a7700879..4e4e15896 100644
--- a/components/utilities/logtrace/log_file.c
+++ b/components/utilities/logtrace/log_file.c
@@ -93,7 +93,7 @@ static rt_size_t fdevice_write(rt_device_t dev, rt_off_t pos, const void *buffer
return write(fdev->fd, buffer, size);
}
-static rt_err_t fdevice_control(rt_device_t dev, rt_uint8_t cmd, void *arg)
+static rt_err_t fdevice_control(rt_device_t dev, int cmd, void *arg)
{
struct file_device *fdev = (struct file_device *)dev;
diff --git a/libcpu/arm/AT91SAM7S/serial.c b/libcpu/arm/AT91SAM7S/serial.c
index 77a7bd860..ede8683b3 100644
--- a/libcpu/arm/AT91SAM7S/serial.c
+++ b/libcpu/arm/AT91SAM7S/serial.c
@@ -333,7 +333,7 @@ static rt_size_t rt_serial_write (rt_device_t dev, rt_off_t pos, const void* buf
return (rt_size_t)ptr - (rt_size_t)buffer;
}
-static rt_err_t rt_serial_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control (rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/libcpu/arm/s3c24x0/rtc.c b/libcpu/arm/s3c24x0/rtc.c
index 0f05acd68..601f3dda9 100644
--- a/libcpu/arm/s3c24x0/rtc.c
+++ b/libcpu/arm/s3c24x0/rtc.c
@@ -127,7 +127,7 @@ static rt_size_t rtc_read(rt_device_t dev, rt_off_t pos, void* buffer, rt_size_t
return RT_EOK;
}
-static rt_err_t rtc_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rtc_control(rt_device_t dev, int cmd, void *args)
{
struct tm tm, *tm_ptr;
time_t *time;
diff --git a/libcpu/arm/s3c24x0/serial.c b/libcpu/arm/s3c24x0/serial.c
index 9229805d2..ddf303da4 100644
--- a/libcpu/arm/s3c24x0/serial.c
+++ b/libcpu/arm/s3c24x0/serial.c
@@ -222,7 +222,7 @@ static rt_size_t rt_serial_write(rt_device_t dev, rt_off_t pos, const void* buff
return (rt_uint32_t)ptr - (rt_uint32_t)buffer;
}
-static rt_err_t rt_serial_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control(rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev != RT_NULL);
diff --git a/libcpu/arm/sep4020/serial.c b/libcpu/arm/sep4020/serial.c
index 728f7dc1e..3f484ee92 100644
--- a/libcpu/arm/sep4020/serial.c
+++ b/libcpu/arm/sep4020/serial.c
@@ -208,7 +208,7 @@ static rt_size_t rt_serial_write (rt_device_t dev, rt_off_t pos, const void* buf
return (rt_uint32_t)ptr - (rt_uint32_t)buffer;
}
-static rt_err_t rt_serial_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control (rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev != RT_NULL);
diff --git a/libcpu/avr32/uc3/serial.c b/libcpu/avr32/uc3/serial.c
index 4deac6b4a..14ef86544 100644
--- a/libcpu/avr32/uc3/serial.c
+++ b/libcpu/avr32/uc3/serial.c
@@ -172,7 +172,7 @@ static rt_size_t rt_serial_write (rt_device_t dev, rt_off_t pos, const void* buf
return (rt_uint32_t)ptr - (rt_uint32_t)buffer;
}
-static rt_err_t rt_serial_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control (rt_device_t dev, int cmd, void *args)
{
struct avr32_serial_device* uart;
diff --git a/libcpu/blackfin/bf53x/serial.c b/libcpu/blackfin/bf53x/serial.c
index e5547fb88..b8a4c5257 100644
--- a/libcpu/blackfin/bf53x/serial.c
+++ b/libcpu/blackfin/bf53x/serial.c
@@ -211,7 +211,7 @@ static rt_size_t rt_serial_write (rt_device_t dev, rt_off_t pos, const void* buf
return (rt_uint32_t)ptr - (rt_uint32_t)buffer;
}
-static rt_err_t rt_serial_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control (rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev != RT_NULL);
diff --git a/libcpu/ppc/ppc405/serial.c b/libcpu/ppc/ppc405/serial.c
index f682796f6..ac68a1374 100644
--- a/libcpu/ppc/ppc405/serial.c
+++ b/libcpu/ppc/ppc405/serial.c
@@ -94,7 +94,7 @@ static rt_err_t rt_serial_close(rt_device_t dev)
return RT_EOK;
}
-static rt_err_t rt_serial_control(rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control(rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}
diff --git a/libcpu/unicore32/sep6200/serial.c b/libcpu/unicore32/sep6200/serial.c
index 4be71127d..518257b61 100644
--- a/libcpu/unicore32/sep6200/serial.c
+++ b/libcpu/unicore32/sep6200/serial.c
@@ -216,7 +216,7 @@ static rt_size_t rt_serial_write (rt_device_t dev, rt_off_t pos, const void* buf
return (rt_uint32_t)ptr - (rt_uint32_t)buffer;
}
-static rt_err_t rt_serial_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control (rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev != RT_NULL);
diff --git a/libcpu/xilinx/microblaze/serial.c b/libcpu/xilinx/microblaze/serial.c
index cd73051f6..17cca9f84 100755
--- a/libcpu/xilinx/microblaze/serial.c
+++ b/libcpu/xilinx/microblaze/serial.c
@@ -266,7 +266,7 @@ static rt_size_t rt_serial_write (rt_device_t dev, rt_off_t pos, const void* buf
return (rt_size_t)ptr - (rt_size_t)buffer;
}
-static rt_err_t rt_serial_control (rt_device_t dev, rt_uint8_t cmd, void *args)
+static rt_err_t rt_serial_control (rt_device_t dev, int cmd, void *args)
{
return RT_EOK;
}