[BSP] change the type of cmd.

1. Change the type of cmd to 'int';
2. Remove RT_LWIP_USING_RT_MEM macro;
This commit is contained in:
bernard 2017-10-16 13:23:03 +08:00
parent 68d01f8261
commit 5e3b3b19a6
120 changed files with 99 additions and 141 deletions

View File

@ -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; 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) switch(cmd)
{ {

View File

@ -540,7 +540,7 @@ static rt_size_t rt_macb_write (rt_device_t dev, rt_off_t pos, const void* buffe
return 0; 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) switch(cmd)
{ {

View File

@ -1623,7 +1623,7 @@ static rt_size_t rt_davinci_emac_write (rt_device_t dev, rt_off_t pos, const voi
return 0; 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; struct emac_priv *priv = dev->user_data;
switch(cmd) switch(cmd)

View File

@ -154,7 +154,6 @@
/* Trace LwIP protocol */ /* Trace LwIP protocol */
/* #define RT_LWIP_DEBUG */ /* #define RT_LWIP_DEBUG */
//#define RT_LWIP_USING_RT_MEM
//#define RT_LWIP_REASSEMBLY_FRAG //#define RT_LWIP_REASSEMBLY_FRAG
#define SO_REUSE 1 #define SO_REUSE 1

View File

@ -364,7 +364,7 @@ static void efm32_spiLcd_drawVLine(rtgui_color_t *c, int x , int y1, int y2)
* @return * @return
* Error code * 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) switch (cmd)
{ {

View File

@ -83,7 +83,7 @@ static rt_size_t rt_rtc_read(
* @return * @return
* Error code * 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); RT_ASSERT(dev != RT_NULL);

View File

@ -293,8 +293,6 @@
//#define RT_USING_LWIP //#define RT_USING_LWIP
//#define RT_USING_NETUTILS //#define RT_USING_NETUTILS
//#define RT_LWIP_DHCP //#define RT_LWIP_DHCP
/* LwIP uses RT-Thread Memory Management */
#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/ /* Enable ICMP protocol*/
#define RT_LWIP_ICMP #define RT_LWIP_ICMP
/* Enable ICMP protocol*/ /* Enable ICMP protocol*/

View File

@ -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; struct fh_audio_cfg_arg *cfg;

View File

@ -135,7 +135,7 @@ static rt_err_t fh_pwm_close(rt_device_t dev)
return 0; 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; int ret = 0;
struct pwm_device *pwm; struct pwm_device *pwm;

View File

@ -201,7 +201,7 @@ static rt_err_t fh_sadc_close(rt_device_t dev)
return RT_EOK; 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; rt_uint32_t control_reg;

View File

@ -241,7 +241,7 @@ static rt_size_t k64_emac_write (rt_device_t dev, rt_off_t pos, const void* buff
return 0; 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; struct emac_device *emac;

View File

@ -103,8 +103,6 @@
#define RT_USING_LWIP #define RT_USING_LWIP
/* Enable LwIP debug output */ /* Enable LwIP debug output */
//#define RT_LWIP_DEBUG //#define RT_LWIP_DEBUG
/* LwIP uses RT-Thread Memory Management */
#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/ /* Enable ICMP protocol*/
#define RT_LWIP_ICMP #define RT_LWIP_ICMP
/* Enable UDP protocol*/ /* Enable UDP protocol*/

View File

@ -216,7 +216,7 @@ static rt_size_t gd32_emac_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0; 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; struct gd32_emac * gd32_emac_device = (struct gd32_emac *)dev;

View File

@ -205,7 +205,7 @@ static void tli_config(void)
tli_layer_init(LAYER0, &tli_layer_init_struct); 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) switch (cmd)
{ {

View File

@ -156,8 +156,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */ /* SECTION: lwip, a lighwight TCP/IP protocol stack */
#define RT_USING_LWIP #define RT_USING_LWIP
/* LwIP uses RT-Thread Memory Management */
#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/ /* Enable ICMP protocol*/
#define RT_LWIP_ICMP #define RT_LWIP_ICMP
/* Enable UDP protocol*/ /* Enable UDP protocol*/

View File

@ -128,7 +128,7 @@ static rt_size_t imx_emac_write (rt_device_t dev, rt_off_t pos, const void* buff
return 0; 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; struct emac_device *emac;

View File

@ -142,7 +142,7 @@ void luminaryif_isr(void)
} }
/* control the interface */ /* 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) switch(cmd)
{ {

View File

@ -719,7 +719,7 @@ static rt_size_t rt_sdcard_write (rt_device_t dev, rt_off_t pos, const void* buf
return size; 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; return RT_EOK;
} }

View File

@ -183,7 +183,7 @@ static rt_err_t rt_serial_close(rt_device_t dev)
return RT_EOK; 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; return RT_EOK;
} }

View File

@ -93,8 +93,6 @@
/* Trace LwIP protocol*/ /* Trace LwIP protocol*/
/* #define RT_LWIP_DEBUG */ /* #define RT_LWIP_DEBUG */
#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/ /* Enable ICMP protocol*/
#define RT_LWIP_ICMP #define RT_LWIP_ICMP

View File

@ -141,7 +141,7 @@ void luminaryif_isr(void)
} }
/* control the interface */ /* 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) switch(cmd)
{ {

View File

@ -719,7 +719,7 @@ static rt_size_t rt_sdcard_write (rt_device_t dev, rt_off_t pos, const void* buf
return size; 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; return RT_EOK;
} }

View File

@ -183,7 +183,7 @@ static rt_err_t rt_serial_close(rt_device_t dev)
return RT_EOK; 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; return RT_EOK;
} }

View File

@ -93,8 +93,6 @@
/* Trace LwIP protocol*/ /* Trace LwIP protocol*/
/* #define RT_LWIP_DEBUG */ /* #define RT_LWIP_DEBUG */
#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/ /* Enable ICMP protocol*/
#define RT_LWIP_ICMP #define RT_LWIP_ICMP

View File

@ -141,7 +141,7 @@ void luminaryif_isr(void)
} }
/* control the interface */ /* 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) switch(cmd)
{ {

View File

@ -183,7 +183,7 @@ static rt_err_t rt_serial_close(rt_device_t dev)
return RT_EOK; 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; return RT_EOK;
} }

View File

@ -94,8 +94,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */ /* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* #define RT_USING_LWIP */ /* #define RT_USING_LWIP */
/* LwIP uses RT-Thread Memory Management */
#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/ /* Enable ICMP protocol*/
#define RT_LWIP_ICMP #define RT_LWIP_ICMP
/* Enable UDP protocol*/ /* Enable UDP protocol*/

View File

@ -346,7 +346,7 @@ static rt_size_t lpc17xx_emac_write (rt_device_t dev, rt_off_t pos, const void*
return 0; 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) switch (cmd)
{ {

View File

@ -454,7 +454,7 @@ static rt_size_t rt_sdcard_write(rt_device_t dev, rt_off_t pos, const void *buff
return 0; 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) if (cmd == RT_DEVICE_CTRL_BLK_GETGEOME)
{ {

View File

@ -370,7 +370,7 @@ static rt_size_t lpc17xx_emac_write (rt_device_t dev, rt_off_t pos, const void*
return 0; 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) switch (cmd)
{ {

View File

@ -29,7 +29,7 @@ static rt_err_t rt_lcd_init (rt_device_t dev)
return RT_EOK; 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) switch (cmd)
{ {

View File

@ -64,7 +64,7 @@ static rt_size_t rt_dm9000_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0; 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) switch(cmd)
{ {

View File

@ -38,7 +38,7 @@ static rt_size_t rt_sdcard_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0; 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; return RT_EOK;
} }

View File

@ -187,7 +187,7 @@ static rt_err_t rt_serial_close(rt_device_t dev)
return RT_EOK; 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; return RT_EOK;
} }

View File

@ -160,7 +160,7 @@ static rt_err_t rt_serial_close(rt_device_t dev)
return RT_EOK; 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; return RT_EOK;
} }

View File

@ -350,7 +350,7 @@ static rt_size_t lpc_emac_write(rt_device_t dev, rt_off_t pos, const void *buffe
return 0; 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) switch (cmd)
{ {

View File

@ -102,7 +102,7 @@ static rt_size_t rt_led_write(rt_device_t dev, rt_off_t pos,
return index; 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); RT_ASSERT(dev == &led.parent);

View File

@ -371,7 +371,7 @@ static rt_size_t lpc_emac_write(rt_device_t dev, rt_off_t pos, const void *buffe
return 0; 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) switch (cmd)
{ {

View File

@ -117,7 +117,7 @@ static rt_size_t rt_led_write(rt_device_t dev, rt_off_t pos,
return index; 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); RT_ASSERT(dev == &led.parent);

View File

@ -104,7 +104,7 @@ static rt_size_t rt_led_write(rt_device_t dev, rt_off_t pos,
return index; 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; return RT_EOK;
} }

View File

@ -468,7 +468,7 @@ static rt_size_t lpc_emac_write(rt_device_t dev, rt_off_t pos, const void *buffe
return 0; 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) switch (cmd)
{ {

View File

@ -365,7 +365,7 @@ static rt_err_t rt_lcd_init(rt_device_t dev)
return RT_EOK; 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) switch (cmd)
{ {

View File

@ -116,7 +116,7 @@ static rt_size_t rt_mci_write(rt_device_t dev, rt_off_t pos, const void *buffer,
return 0; 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; struct mci_device *mci = (struct mci_device *)dev;

View File

@ -186,7 +186,7 @@ static rt_err_t rt_dc_init(rt_device_t dev)
return RT_EOK; 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) switch (cmd)
{ {

View File

@ -417,7 +417,7 @@ static rt_size_t eth_write(rt_device_t dev, rt_off_t pos, const void* buffer, rt
return 0; 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) switch (cmd)
{ {

View File

@ -141,8 +141,6 @@
#define RT_USING_GMAC_INT_MODE #define RT_USING_GMAC_INT_MODE
#define RT_USING_LWIP141 #define RT_USING_LWIP141
//#define RT_LWIP_DEBUG //#define RT_LWIP_DEBUG
#define RT_LWIP_USING_RT_MEM
// <bool name="RT_LWIP_ICMP" description="Enable ICMP protocol" default="true" /> // <bool name="RT_LWIP_ICMP" description="Enable ICMP protocol" default="true" />
#define RT_LWIP_ICMP #define RT_LWIP_ICMP

View File

@ -53,7 +53,7 @@ static rt_err_t rt_adc_init(rt_device_t dev)
return RT_EOK; 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); RT_ASSERT(dev != RT_NULL);

View File

@ -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) switch (cmd)
{ {

View File

@ -544,7 +544,7 @@ static rt_size_t rt_nand_write (rt_device_t dev, rt_off_t pos,
return size; 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; struct rt_device_nand *nand;

View File

@ -113,7 +113,7 @@ static rt_size_t rt_led_write (rt_device_t dev, rt_off_t pos,
return index; 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); RT_ASSERT(dev == &fm4_led.parent);

View File

@ -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; 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); RT_ASSERT(dev != RT_NULL);

View File

@ -115,7 +115,7 @@ static rt_size_t rt_led_write (rt_device_t dev, rt_off_t pos,
return index; 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); RT_ASSERT(dev == &fm3_led.parent);

View File

@ -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; 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); RT_ASSERT(dev != RT_NULL);

View File

@ -344,7 +344,7 @@ static rt_size_t rt_dm9000_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0; 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) switch (cmd)
{ {

View File

@ -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; 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; return RT_EOK;
} }

View File

@ -203,7 +203,7 @@ static rt_err_t rt_lcd_init (rt_device_t dev)
return RT_EOK; 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) switch (cmd)
{ {

View File

@ -204,7 +204,7 @@ static rt_err_t rt_lcd_init (rt_device_t dev)
return RT_EOK; 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) switch (cmd)
{ {

View File

@ -205,7 +205,7 @@ static rt_err_t rt_lcd_init (rt_device_t dev)
return RT_EOK; 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) switch (cmd)
{ {

View File

@ -210,7 +210,7 @@ S3C2410_LCDCON5_INVVLINE | S3C2410_LCDCON5_INVVCLK | S3C2410_LCDCON5_PWREN| S3C2
return RT_EOK; 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) switch (cmd)
{ {

View File

@ -383,7 +383,7 @@ static rt_err_t rt_sdcard_close(rt_device_t dev)
return RT_EOK; 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; return RT_EOK;
} }

View File

@ -402,7 +402,7 @@ static rt_err_t rtgui_touch_init(rt_device_t dev)
return RT_EOK; 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) switch (cmd)
{ {

View File

@ -128,8 +128,6 @@
// <section name="RT_USING_LWIP" description="lwip, a lightweight TCP/IP protocol stack" default="true" > // <section name="RT_USING_LWIP" description="lwip, a lightweight TCP/IP protocol stack" default="true" >
#define RT_USING_LWIP #define RT_USING_LWIP
// <bool name="RT_LWIP_USING_RT_MEM" description="Using RT-Thread memory management for LwIP" default="true" />
#define RT_LWIP_USING_RT_MEM
// <bool name="RT_LWIP_ICMP" description="Enable ICMP protocol" default="true" /> // <bool name="RT_LWIP_ICMP" description="Enable ICMP protocol" default="true" />
#define RT_LWIP_ICMP #define RT_LWIP_ICMP
// <bool name="RT_LWIP_IGMP" description="Enable IGMP protocol" default="false" /> // <bool name="RT_LWIP_IGMP" description="Enable IGMP protocol" default="false" />

View File

@ -526,7 +526,7 @@ static rt_size_t rt_dm9161_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0; 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; return RT_EOK;
} }

View File

@ -503,7 +503,7 @@ static rt_err_t rt_sdcard_close(rt_device_t dev)
* *
* @param hook the hook function * @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_kprintf("cmd = %d\n",cmd);
RT_ASSERT(dev != RT_NULL); RT_ASSERT(dev != RT_NULL);

View File

@ -99,8 +99,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */ /* SECTION: lwip, a lighwight TCP/IP protocol stack */
//#define RT_USING_LWIP //#define RT_USING_LWIP
/* LwIP uses RT-Thread Memory Management */
#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/ /* Enable ICMP protocol*/
#define RT_LWIP_ICMP #define RT_LWIP_ICMP
/* Enable UDP protocol*/ /* Enable UDP protocol*/

View File

@ -80,7 +80,7 @@ static rt_size_t rt_uart_write(rt_device_t dev, rt_off_t pos, const void* buffer
return size; 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; return RT_EOK;
} }

View File

@ -91,8 +91,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */ /* SECTION: lwip, a lighwight TCP/IP protocol stack */
//#define RT_USING_LWIP //#define RT_USING_LWIP
/* LwIP uses RT-Thread Memory Management */
#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/ /* Enable ICMP protocol*/
#define RT_LWIP_ICMP #define RT_LWIP_ICMP
/* Enable UDP protocol*/ /* Enable UDP protocol*/

View File

@ -101,8 +101,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */ /* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* #define RT_USING_LWIP */ /* #define RT_USING_LWIP */
/* LwIP uses RT-Thread Memory Management */
#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/ /* Enable ICMP protocol*/
#define RT_LWIP_ICMP #define RT_LWIP_ICMP
/* Enable UDP protocol*/ /* Enable UDP protocol*/

View File

@ -386,7 +386,7 @@ rt_err_t sam7xether_init(rt_device_t dev)
} }
/* control the interface */ /* 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) switch(cmd)
{ {

View File

@ -552,7 +552,7 @@ static rt_size_t rt_sdcard_write (rt_device_t dev, rt_off_t pos, const void* buf
return size; 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; return RT_EOK;
} }

View File

@ -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; 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; return RT_EOK;
} }

View File

@ -83,7 +83,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */ /* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* Using lighweight TCP/IP protocol stack*/ /* Using lighweight TCP/IP protocol stack*/
#define RT_USING_LWIP #define RT_USING_LWIP
#define RT_LWIP_USING_RT_MEM
/* Trace LwIP protocol*/ /* Trace LwIP protocol*/
/* #define RT_LWIP_DEBUG */ /* #define RT_LWIP_DEBUG */

View File

@ -574,7 +574,7 @@ static rt_size_t nop_write(rt_device_t dev,
return size; 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; return RT_EOK;
} }

View File

@ -97,7 +97,7 @@ _err:
return 0; 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; struct sdcard_device *sd;
unsigned int size; unsigned int size;

View File

@ -39,7 +39,7 @@ static rt_err_t sdlfb_close(rt_device_t dev)
} }
static rt_mutex_t sdllock; 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; struct sdlfb_device *device;

View File

@ -694,7 +694,7 @@ static rt_size_t tap_netif_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0; 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) switch (cmd)
{ {

View File

@ -176,7 +176,7 @@ static rt_size_t pcap_netif_write (rt_device_t dev, rt_off_t pos, const void* bu
return 0; 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) switch (cmd)
{ {

View File

@ -1630,7 +1630,7 @@ _exit:
return size; 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; struct msd_device * msd = (struct msd_device *)dev;

View File

@ -3178,7 +3178,7 @@ static rt_size_t rt_stm32_eth_write (rt_device_t dev, rt_off_t pos, const void*
return 0; 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) switch(cmd)
{ {

View File

@ -103,8 +103,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */ /* SECTION: lwip, a lighwight TCP/IP protocol stack */
#define RT_USING_LWIP #define RT_USING_LWIP
/* LwIP uses RT-Thread Memory Management */
#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/ /* Enable ICMP protocol*/
#define RT_LWIP_ICMP #define RT_LWIP_ICMP
/* Enable UDP protocol*/ /* Enable UDP protocol*/

View File

@ -355,7 +355,7 @@ static rt_size_t rt_dm9000_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0; 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) switch (cmd)
{ {

View File

@ -651,7 +651,7 @@ static rt_err_t lcd_close(rt_device_t dev)
return RT_EOK; 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) switch (cmd)
{ {

View File

@ -3137,7 +3137,7 @@ static rt_size_t rt_sdcard_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0; 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); RT_ASSERT(dev != RT_NULL);

View File

@ -444,7 +444,7 @@ static rt_err_t lcd_close(rt_device_t dev)
return RT_EOK; 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) switch (cmd)
{ {

View File

@ -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; 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_time_t *time;
RT_ASSERT(dev != RT_NULL); RT_ASSERT(dev != RT_NULL);

View File

@ -366,7 +366,7 @@ static rt_err_t rtgui_touch_init (rt_device_t dev)
return RT_EOK; 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) switch (cmd)
{ {

View File

@ -108,8 +108,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */ /* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* #define RT_USING_LWIP */ /* #define RT_USING_LWIP */
/* LwIP uses RT-Thread Memory Management */
#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/ /* Enable ICMP protocol*/
#define RT_LWIP_ICMP #define RT_LWIP_ICMP
/* Enable UDP protocol*/ /* Enable UDP protocol*/

View File

@ -118,7 +118,7 @@ static rt_err_t ee24LCxx_close(rt_device_t dev)
return RT_EOK; 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; return RT_EOK;
} }

View File

@ -206,7 +206,7 @@ static rt_err_t fm25_close(rt_device_t dev)
return RT_EOK; 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); RT_ASSERT(dev != RT_NULL);

View File

@ -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; 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; time_t *time;
struct tm ti,*to; struct tm ti,*to;

View File

@ -2673,7 +2673,7 @@ static rt_size_t rt_sdcard_write (rt_device_t dev, rt_off_t pos, const void* buf
return 0; 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); RT_ASSERT(dev != RT_NULL);

View File

@ -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; 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; struct stm32_serial_device* uart;

View File

@ -178,7 +178,7 @@ static rt_size_t rt_stm32_eth_write (rt_device_t dev, rt_off_t pos, const void*
return 0; 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) switch(cmd)
{ {

View File

@ -89,8 +89,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */ /* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* #define RT_USING_LWIP */ /* #define RT_USING_LWIP */
/* LwIP uses RT-Thread Memory Management */
#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/ /* Enable ICMP protocol*/
#define RT_LWIP_ICMP #define RT_LWIP_ICMP
/* Enable UDP protocol*/ /* Enable UDP protocol*/

View File

@ -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; 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_time_t *time;
RT_ASSERT(dev != RT_NULL); RT_ASSERT(dev != RT_NULL);

View File

@ -3511,7 +3511,7 @@ static rt_size_t rt_stm32_eth_write (rt_device_t dev, rt_off_t pos, const void*
return 0; 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) switch(cmd)
{ {

View File

@ -108,8 +108,6 @@
/* SECTION: lwip, a lighwight TCP/IP protocol stack */ /* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* #define RT_USING_LWIP */ /* #define RT_USING_LWIP */
/* LwIP uses RT-Thread Memory Management */
#define RT_LWIP_USING_RT_MEM
/* Enable ICMP protocol*/ /* Enable ICMP protocol*/
#define RT_LWIP_ICMP #define RT_LWIP_ICMP
/* Enable UDP protocol*/ /* Enable UDP protocol*/

View File

@ -218,7 +218,7 @@ static rt_size_t rt_stm32_eth_write (rt_device_t dev, rt_off_t pos, const void*
return 0; 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"); STM32_ETH_PRINTF("rt_stm32_eth_control...\n");
switch(cmd) switch(cmd)

View File

@ -424,7 +424,7 @@ static rt_err_t lcd_close(rt_device_t dev)
return RT_EOK; 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) switch (cmd)
{ {

View File

@ -223,7 +223,7 @@ static rt_size_t rt_rtc_read(
* @return * @return
* Error code * 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_err_t result;
RT_ASSERT(dev != RT_NULL); RT_ASSERT(dev != RT_NULL);

Some files were not shown because too many files have changed in this diff Show More