diff options
| author | bernard.xiong <[email protected]> | 2010-11-29 07:49:59 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-11-29 07:49:59 +0000 |
| commit | 4d88d694d53b3bd3388226433634d7a7e4b1d895 (patch) | |
| tree | 5833d139eb0527c767ccc488b84e0937b43ad5b2 | |
| parent | 5d8c15c4bbe91ffe3cf35461e7a8a9b527c18d22 (diff) | |
rename the private field in device to user_data.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1135 bbd45198-f89e-11dd-88c7-29a3b14d5316
| -rw-r--r-- | bsp/dev3210/uart.c | 2 | ||||
| -rwxr-xr-x | bsp/evb4020/src/dm9161.c | 2 | ||||
| -rwxr-xr-x | bsp/evb4020/src/serial.c | 10 | ||||
| -rw-r--r-- | bsp/jz47xx/uart.c | 2 | ||||
| -rw-r--r-- | bsp/lm3s/sdcard.c | 2 | ||||
| -rw-r--r-- | bsp/lpc1114/uart.c | 2 | ||||
| -rw-r--r-- | bsp/lpc176x/emac.c | 2 | ||||
| -rw-r--r-- | bsp/lpc176x/sd.c | 2 | ||||
| -rw-r--r-- | bsp/lpc176x/spi.c | 33 | ||||
| -rw-r--r-- | bsp/lpc176x/uart.c | 2 | ||||
| -rw-r--r-- | bsp/lpc2148/dm9000.c | 2 | ||||
| -rw-r--r-- | bsp/lpc2148/sd.c | 2 | ||||
| -rw-r--r-- | bsp/m16c62p/uart.c | 2 | ||||
| -rw-r--r-- | bsp/mini2440/dm9000.c | 2 | ||||
| -rw-r--r-- | bsp/mini2440/sdcard.c | 8 | ||||
| -rw-r--r-- | bsp/mini2440/touch.c | 2 | ||||
| -rw-r--r-- | bsp/nuc140/uart.c | 2 | ||||
| -rw-r--r-- | bsp/sam7x/sd.c | 2 | ||||
| -rw-r--r-- | bsp/stm3210/dm9000a.c | 2 | ||||
| -rw-r--r-- | bsp/stm3210/msd.c | 2 | ||||
| -rw-r--r-- | bsp/stm3210/rtc.c | 2 | ||||
| -rw-r--r-- | bsp/stm3210/sdcard.c | 2 | ||||
| -rw-r--r-- | bsp/stm3210/stm32_eth.c | 2 | ||||
| -rw-r--r-- | bsp/upd70f3454/uart.c | 2 |
24 files changed, 62 insertions, 31 deletions
diff --git a/bsp/dev3210/uart.c b/bsp/dev3210/uart.c index 8851678e68..22c2486e98 100644 --- a/bsp/dev3210/uart.c +++ b/bsp/dev3210/uart.c @@ -272,7 +272,7 @@ void rt_hw_uart_init(void) uart->parent.read = rt_uart_read;
uart->parent.write = rt_uart_write;
uart->parent.control = RT_NULL;
- uart->parent.private = RT_NULL;
+ uart->parent.user_data = RT_NULL;
rt_device_register(&uart->parent,
"uart", RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_STREAM | RT_DEVICE_FLAG_INT_RX);
diff --git a/bsp/evb4020/src/dm9161.c b/bsp/evb4020/src/dm9161.c index 04428df8aa..e189f4b4cd 100755 --- a/bsp/evb4020/src/dm9161.c +++ b/bsp/evb4020/src/dm9161.c @@ -677,7 +677,7 @@ void rt_hw_dm9161_init() dm9161_device.parent.parent.read = rt_dm9161_read;
dm9161_device.parent.parent.write = rt_dm9161_write;
dm9161_device.parent.parent.control = rt_dm9161_control;
- dm9161_device.parent.parent.private = RT_NULL;
+ dm9161_device.parent.parent.user_data = RT_NULL;
dm9161_device.parent.eth_rx = rt_dm9161_rx;
dm9161_device.parent.eth_tx = rt_dm9161_tx;
diff --git a/bsp/evb4020/src/serial.c b/bsp/evb4020/src/serial.c index cd480e3bf7..c9dbc3c025 100755 --- a/bsp/evb4020/src/serial.c +++ b/bsp/evb4020/src/serial.c @@ -28,7 +28,7 @@ */
static rt_err_t rt_serial_init (rt_device_t dev)
{
- struct serial_device* uart = (struct serial_device*) dev->private;
+ struct serial_device* uart = (struct serial_device*) dev->user_data;
if (!(dev->flag & RT_DEVICE_FLAG_ACTIVATED))
{
@@ -98,7 +98,7 @@ static rt_size_t rt_serial_read (rt_device_t dev, rt_off_t pos, void* buffer, rt ptr = buffer;
err_code = RT_EOK;
- uart = (struct serial_device*)dev->private;
+ uart = (struct serial_device*)dev->user_data;
if (dev->flag & RT_DEVICE_FLAG_INT_RX)
{
@@ -156,7 +156,7 @@ static rt_size_t rt_serial_write (rt_device_t dev, rt_off_t pos, const void* buf err_code = RT_EOK;
ptr = (rt_uint8_t*)buffer;
- uart = (struct serial_device*)dev->private;
+ uart = (struct serial_device*)dev->user_data;
if (dev->flag & RT_DEVICE_FLAG_INT_TX)
{
@@ -244,7 +244,7 @@ rt_err_t rt_hw_serial_register(rt_device_t device, const char* name, rt_uint32_t device->read = rt_serial_read;
device->write = rt_serial_write;
device->control = rt_serial_control;
- device->private = serial;
+ device->user_data = serial;
/* register a character device */
return rt_device_register(device, name, RT_DEVICE_FLAG_RDWR | flag);
@@ -253,7 +253,7 @@ rt_err_t rt_hw_serial_register(rt_device_t device, const char* name, rt_uint32_t /* ISR for serial interrupt */
void rt_hw_serial_isr(rt_device_t device)
{
- struct serial_device* uart = (struct serial_device*) device->private;
+ struct serial_device* uart = (struct serial_device*) device->user_data;
/* interrupt mode receive */
RT_ASSERT(device->flag & RT_DEVICE_FLAG_INT_RX);
diff --git a/bsp/jz47xx/uart.c b/bsp/jz47xx/uart.c index d3aa84a150..b42ca4b9cd 100644 --- a/bsp/jz47xx/uart.c +++ b/bsp/jz47xx/uart.c @@ -361,7 +361,7 @@ void rt_hw_uart_init(void) uart->parent.read = rt_uart_read;
uart->parent.write = rt_uart_write;
uart->parent.control = RT_NULL;
- uart->parent.private = RT_NULL;
+ uart->parent.user_data = RT_NULL;
rt_device_register(&uart->parent,
"uart", RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_STREAM | RT_DEVICE_FLAG_INT_RX);
diff --git a/bsp/lm3s/sdcard.c b/bsp/lm3s/sdcard.c index d4a5e96a68..7a7688de9b 100644 --- a/bsp/lm3s/sdcard.c +++ b/bsp/lm3s/sdcard.c @@ -770,7 +770,7 @@ void rt_hw_sdcard_init(void) sdcard_device.control = rt_sdcard_control;
/* no private */
- sdcard_device.private = RT_NULL;
+ sdcard_device.user_data = RT_NULL;
rt_device_register(&sdcard_device, "sd0",
RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_REMOVABLE | RT_DEVICE_FLAG_STANDALONE);
diff --git a/bsp/lpc1114/uart.c b/bsp/lpc1114/uart.c index da1d3b2ec7..c593bfb7c5 100644 --- a/bsp/lpc1114/uart.c +++ b/bsp/lpc1114/uart.c @@ -253,7 +253,7 @@ void rt_hw_uart_init(void) uart->parent.read = rt_uart_read;
uart->parent.write = rt_uart_write;
uart->parent.control = RT_NULL;
- uart->parent.private = RT_NULL;
+ uart->parent.user_data = RT_NULL;
rt_device_register(&uart->parent,
"uart", RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_STREAM | RT_DEVICE_FLAG_INT_RX);
diff --git a/bsp/lpc176x/emac.c b/bsp/lpc176x/emac.c index a39f21e9cb..5f82cf76a4 100644 --- a/bsp/lpc176x/emac.c +++ b/bsp/lpc176x/emac.c @@ -455,7 +455,7 @@ void lpc17xx_emac_hw_init(void) lpc17xx_emac_device.parent.parent.read = lpc17xx_emac_read;
lpc17xx_emac_device.parent.parent.write = lpc17xx_emac_write;
lpc17xx_emac_device.parent.parent.control = lpc17xx_emac_control;
- lpc17xx_emac_device.parent.parent.private = RT_NULL;
+ lpc17xx_emac_device.parent.parent.user_data = RT_NULL;
lpc17xx_emac_device.parent.eth_rx = lpc17xx_emac_rx;
lpc17xx_emac_device.parent.eth_tx = lpc17xx_emac_tx;
diff --git a/bsp/lpc176x/sd.c b/bsp/lpc176x/sd.c index 7362a40fdb..61d663faf3 100644 --- a/bsp/lpc176x/sd.c +++ b/bsp/lpc176x/sd.c @@ -446,7 +446,7 @@ void rt_hw_sdcard_init() sdcard_device.control = rt_sdcard_control;
/* no private */
- sdcard_device.private = &SDCfg;
+ sdcard_device.user_data = &SDCfg;
rt_device_register(&sdcard_device, "sd0",
RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_REMOVABLE | RT_DEVICE_FLAG_STANDALONE);
diff --git a/bsp/lpc176x/spi.c b/bsp/lpc176x/spi.c index cd9b14a68c..4f544c5d77 100644 --- a/bsp/lpc176x/spi.c +++ b/bsp/lpc176x/spi.c @@ -25,6 +25,7 @@ void LPC17xx_SPI_Init (void) dummy = dummy; // avoid warning
+#if 0
/* Initialize and enable the SSP0 Interface module. */
LPC_SC->PCONP |= (1 << 21); /* Enable power to SSPI0 block */
@@ -38,6 +39,24 @@ void LPC17xx_SPI_Init (void) LPC_PINCON->PINSEL0 |= (2UL<<30); /* P0.15 SCK0 */
LPC_PINCON->PINSEL1 &= ~((3<<2) | (3<<4)); /* P0.17, P0.18 cleared */
LPC_PINCON->PINSEL1 |= ((2<<2) | (2<<4)); /* P0.17 MISO0, P0.18 MOSI0 */
+#else
+ LPC_SC->PCONP |= (1 << 21); /* Enable power to SSPI0 block */
+
+ /* SSEL is GPIO, output set to high. */
+ LPC_GPIO1->FIODIR |= (1<<21); /* P1.21 is output */
+ LPC_GPIO1->FIOPIN |= (1<<21); /* set P1.21 high (SSEL inact.)*/
+ LPC_PINCON->PINSEL3 &= ~(0<<10); /* P1.21 SSEL (used as GPIO) */
+
+ /* P3.26 is SD Card Power Supply Enable Pin */
+ LPC_GPIO3->FIODIR |= (1<<26); /* P3.26 is output */
+ LPC_GPIO3->FIOPIN &= ~(1<<26); /* set P3.26 low(enable power) */
+
+ /* SCK, MISO, MOSI are SSP pins. */
+ LPC_PINCON->PINSEL3 &= ~(3UL<<8); /* P1.20 cleared */
+ LPC_PINCON->PINSEL3 |= (3UL<<8); /* P1.20 SCK0 */
+ LPC_PINCON->PINSEL3 &= ~((3<<14) | (3<<16)); /* P1.23, P1.24 cleared */
+ LPC_PINCON->PINSEL3 |= ((3<<14) | (3<<16)); /* P1.23 MISO0, P1.24 MOSI0 */
+#endif
/* PCLK_SSP0=CCLK */
LPC_SC->PCLKSEL1 &= ~(3<<10); /* PCLKSP0 = CCLK/4 (18MHz) */
@@ -64,9 +83,14 @@ void LPC17xx_SPI_DeInit( void ) // disable SPI
LPC_SSP0->CR1 = 0;
+#if 0
// Pins to GPIO
LPC_PINCON->PINSEL0 &= ~(3UL<<30);
LPC_PINCON->PINSEL1 &= ~((3<<2) | (3<<4));
+#else
+ LPC_PINCON->PINSEL3 &= ~(3UL<<8); /* P1.20 cleared */
+ LPC_PINCON->PINSEL3 &= ~((3<<14) | (3<<16)); /* P1.23, P1.24 cleared */
+#endif
// disable SSP power
LPC_SC->PCONP &= ~(1 << 21);
@@ -85,13 +109,21 @@ void LPC17xx_SPI_SetSpeed (uint8_t speed) /* SSEL: low */
void LPC17xx_SPI_Select ()
{
+#if 0
LPC_GPIO0->FIOPIN &= ~(1<<16);
+#else
+ LPC_GPIO1->FIOPIN &= ~(1<<21); /* SSEL is GPIO, set to high. */
+#endif
}
/* SSEL: high */
void LPC17xx_SPI_DeSelect ()
{
+#if 0
LPC_GPIO0->FIOPIN |= (1<<16);
+#else
+ LPC_GPIO1->FIOPIN |= (1<<21); /* SSEL is GPIO, set to high. */
+#endif
}
/* Send one byte then recv one byte of response. */
@@ -101,7 +133,6 @@ static uint8_t LPC17xx_SPI_SendRecvByte (uint8_t byte_s) LPC_SSP0->DR = byte_s;
while (LPC_SSP0->SR & (1 << SSPSR_BSY) /*BSY*/); /* Wait for transfer to finish */
-// while( !( LPC_SSP0->SR & ( 1 << SSPSR_RNE ) ) ); /* Wait untill the Rx FIFO is not empty */
byte_r = LPC_SSP0->DR;
return byte_r; /* Return received value */
diff --git a/bsp/lpc176x/uart.c b/bsp/lpc176x/uart.c index d56cf6f14b..dd52c0fadc 100644 --- a/bsp/lpc176x/uart.c +++ b/bsp/lpc176x/uart.c @@ -312,7 +312,7 @@ void rt_hw_uart_init(void) uart->parent.read = rt_uart_read;
uart->parent.write = rt_uart_write;
uart->parent.control = RT_NULL;
- uart->parent.private = RT_NULL;
+ uart->parent.user_data = RT_NULL;
rt_device_register(&uart->parent,
"uart0", RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_STREAM | RT_DEVICE_FLAG_INT_RX);
diff --git a/bsp/lpc2148/dm9000.c b/bsp/lpc2148/dm9000.c index f64dbde160..9108cf2987 100644 --- a/bsp/lpc2148/dm9000.c +++ b/bsp/lpc2148/dm9000.c @@ -147,7 +147,7 @@ void rt_hw_dm9000_init() dm9000_device.parent.parent.read = rt_dm9000_read;
dm9000_device.parent.parent.write = rt_dm9000_write;
dm9000_device.parent.parent.control = rt_dm9000_control;
- dm9000_device.parent.parent.private = RT_NULL;
+ dm9000_device.parent.parent.user_data = RT_NULL;
dm9000_device.parent.eth_rx = rt_dm9000_rx;
dm9000_device.parent.eth_tx = rt_dm9000_tx;
diff --git a/bsp/lpc2148/sd.c b/bsp/lpc2148/sd.c index 9961cee5ec..118fb42833 100644 --- a/bsp/lpc2148/sd.c +++ b/bsp/lpc2148/sd.c @@ -57,7 +57,7 @@ void rt_hw_sdcard_init() sd.read = rt_sdcard_read;
sd.write = rt_sdcard_write;
sd.control = rt_sdcard_control;
- sd.private = RT_NULL;
+ sd.user_data = RT_NULL;
/* get the first sector to read partition table */
sector = (rt_uint8_t*) rt_malloc (512);
diff --git a/bsp/m16c62p/uart.c b/bsp/m16c62p/uart.c index 8379e26e68..bff75724d5 100644 --- a/bsp/m16c62p/uart.c +++ b/bsp/m16c62p/uart.c @@ -277,7 +277,7 @@ void rt_hw_uart_init(void) uart->parent.read = rt_uart_read;
uart->parent.write = rt_uart_write;
uart->parent.control = RT_NULL;
- uart->parent.private = RT_NULL;
+ uart->parent.user_data = RT_NULL;
rt_device_register(&uart->parent,
"uart0", RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_STREAM | RT_DEVICE_FLAG_INT_RX);
diff --git a/bsp/mini2440/dm9000.c b/bsp/mini2440/dm9000.c index eb2d2332b8..234728c32c 100644 --- a/bsp/mini2440/dm9000.c +++ b/bsp/mini2440/dm9000.c @@ -629,7 +629,7 @@ void rt_hw_dm9000_init() dm9000_device.parent.parent.read = rt_dm9000_read;
dm9000_device.parent.parent.write = rt_dm9000_write;
dm9000_device.parent.parent.control = rt_dm9000_control;
- dm9000_device.parent.parent.private = RT_NULL;
+ dm9000_device.parent.parent.user_data = RT_NULL;
dm9000_device.parent.eth_rx = rt_dm9000_rx;
dm9000_device.parent.eth_tx = rt_dm9000_tx;
diff --git a/bsp/mini2440/sdcard.c b/bsp/mini2440/sdcard.c index 5dfc45a2f7..59c2987ca1 100644 --- a/bsp/mini2440/sdcard.c +++ b/bsp/mini2440/sdcard.c @@ -361,7 +361,7 @@ static rt_err_t rt_sdcard_control(rt_device_t dev, rt_uint8_t cmd, void *args) static rt_size_t rt_sdcard_read(rt_device_t dev, rt_off_t pos, void* buffer, rt_size_t size)
{
int i;
- struct dfs_partition *part = (struct dfs_partition *)dev->private;
+ struct dfs_partition *part = (struct dfs_partition *)dev->user_data;
if ( dev == RT_NULL )
{
@@ -385,7 +385,7 @@ static rt_size_t rt_sdcard_read(rt_device_t dev, rt_off_t pos, void* buffer, rt_ static rt_size_t rt_sdcard_write (rt_device_t dev, rt_off_t pos, const void* buffer, rt_size_t size)
{
int i;
- struct dfs_partition *part = (struct dfs_partition *)dev->private;
+ struct dfs_partition *part = (struct dfs_partition *)dev->user_data;
if ( dev == RT_NULL )
{
@@ -452,7 +452,7 @@ void rt_hw_sdcard_init() sdcard_device[i].read = rt_sdcard_read;
sdcard_device[i].write = rt_sdcard_write;
sdcard_device[i].control = rt_sdcard_control;
- sdcard_device[i].private= &part[i];
+ sdcard_device[i].user_data = &part[i];
rt_device_register(&sdcard_device[i], dname,
RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_REMOVABLE | RT_DEVICE_FLAG_STANDALONE);
@@ -474,7 +474,7 @@ void rt_hw_sdcard_init() sdcard_device[0].read = rt_sdcard_read;
sdcard_device[0].write = rt_sdcard_write;
sdcard_device[0].control = rt_sdcard_control;
- sdcard_device[0].private= &part[0];
+ sdcard_device[0].user_data = &part[0];
rt_device_register(&sdcard_device[0], "sd0",
RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_REMOVABLE | RT_DEVICE_FLAG_STANDALONE);
diff --git a/bsp/mini2440/touch.c b/bsp/mini2440/touch.c index bbd5f952e4..baf9d9cdae 100644 --- a/bsp/mini2440/touch.c +++ b/bsp/mini2440/touch.c @@ -417,7 +417,7 @@ void rtgui_touch_hw_init(void) touch->parent.type = RT_Device_Class_Unknown;
touch->parent.init = rtgui_touch_init;
touch->parent.control = rtgui_touch_control;
- touch->parent.private = RT_NULL;
+ touch->parent.user_data = RT_NULL;
/* create 1/8 second timer */
touch->poll_timer = rt_timer_create("touch", touch_timer_fire, RT_NULL,
diff --git a/bsp/nuc140/uart.c b/bsp/nuc140/uart.c index 6b21e00608..46d3197aa9 100644 --- a/bsp/nuc140/uart.c +++ b/bsp/nuc140/uart.c @@ -216,7 +216,7 @@ void rt_hw_uart_init(void) uart->parent.read = rt_uart_read;
uart->parent.write = rt_uart_write;
uart->parent.control = RT_NULL;
- uart->parent.private = RT_NULL;
+ uart->parent.user_data = RT_NULL;
rt_device_register(&uart->parent,
"uart1", RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_STREAM | RT_DEVICE_FLAG_INT_RX);
diff --git a/bsp/sam7x/sd.c b/bsp/sam7x/sd.c index ad93243dcc..ef955d44bc 100644 --- a/bsp/sam7x/sd.c +++ b/bsp/sam7x/sd.c @@ -569,7 +569,7 @@ void rt_hw_sdcard_init() sd.read = rt_sdcard_read;
sd.write = rt_sdcard_write;
sd.control = rt_sdcard_control;
- sd.private = RT_NULL;
+ sd.user_data = RT_NULL;
AT91C_PIOA_PER = CARD_PWR_PIN; // enable GPIO of CS-pin
AT91C_PIOA_CODR = CARD_PWR_PIN; // set high
diff --git a/bsp/stm3210/dm9000a.c b/bsp/stm3210/dm9000a.c index 361647aef2..5b4c8feb09 100644 --- a/bsp/stm3210/dm9000a.c +++ b/bsp/stm3210/dm9000a.c @@ -738,7 +738,7 @@ void rt_hw_dm9000_init() dm9000_device.parent.parent.read = rt_dm9000_read;
dm9000_device.parent.parent.write = rt_dm9000_write;
dm9000_device.parent.parent.control = rt_dm9000_control;
- dm9000_device.parent.parent.private = RT_NULL;
+ dm9000_device.parent.parent.user_data = RT_NULL;
dm9000_device.parent.eth_rx = rt_dm9000_rx;
dm9000_device.parent.eth_tx = rt_dm9000_tx;
diff --git a/bsp/stm3210/msd.c b/bsp/stm3210/msd.c index fc41f6d695..116670399a 100644 --- a/bsp/stm3210/msd.c +++ b/bsp/stm3210/msd.c @@ -896,7 +896,7 @@ void rt_hw_msd_init() sdcard_device.control = rt_msd_control; /* no private */ - sdcard_device.private = RT_NULL; + sdcard_device.user_data = RT_NULL; /* get the first sector to read partition table */ sector = (rt_uint8_t*) rt_malloc (512); if (sector == RT_NULL) diff --git a/bsp/stm3210/rtc.c b/bsp/stm3210/rtc.c index 08045e240f..3ba92f8a00 100644 --- a/bsp/stm3210/rtc.c +++ b/bsp/stm3210/rtc.c @@ -150,7 +150,7 @@ void rt_hw_rtc_init(void) rtc.control = rt_rtc_control;
/* no private */
- rtc.private = RT_NULL;
+ rtc.user_data = RT_NULL;
rt_device_register(&rtc, "rtc", RT_DEVICE_FLAG_RDWR);
diff --git a/bsp/stm3210/sdcard.c b/bsp/stm3210/sdcard.c index 1825436067..9cc6eb1c04 100644 --- a/bsp/stm3210/sdcard.c +++ b/bsp/stm3210/sdcard.c @@ -3212,7 +3212,7 @@ void rt_hw_sdcard_init() sdcard_device.control = rt_sdcard_control;
/* no private */
- sdcard_device.private = &SDCardInfo;
+ sdcard_device.user_data = &SDCardInfo;
rt_device_register(&sdcard_device, "sd0",
RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_REMOVABLE | RT_DEVICE_FLAG_STANDALONE);
diff --git a/bsp/stm3210/stm32_eth.c b/bsp/stm3210/stm32_eth.c index de04b998c2..f8dc2b9eb7 100644 --- a/bsp/stm3210/stm32_eth.c +++ b/bsp/stm3210/stm32_eth.c @@ -3571,7 +3571,7 @@ void rt_hw_stm32_eth_init() stm32_eth_device.parent.parent.read = rt_stm32_eth_read;
stm32_eth_device.parent.parent.write = rt_stm32_eth_write;
stm32_eth_device.parent.parent.control = rt_stm32_eth_control;
- stm32_eth_device.parent.parent.private = RT_NULL;
+ stm32_eth_device.parent.parent.user_data = RT_NULL;
stm32_eth_device.parent.eth_rx = rt_stm32_eth_rx;
stm32_eth_device.parent.eth_tx = rt_stm32_eth_tx;
diff --git a/bsp/upd70f3454/uart.c b/bsp/upd70f3454/uart.c index d0299438c2..d660bcc45b 100644 --- a/bsp/upd70f3454/uart.c +++ b/bsp/upd70f3454/uart.c @@ -237,7 +237,7 @@ void rt_hw_uart_init(void) uart->parent.read = rt_uart_read;
uart->parent.write = rt_uart_write;
uart->parent.control = RT_NULL;
- uart->parent.private = RT_NULL;
+ uart->parent.user_data = RT_NULL;
rt_device_register(&uart->parent,
"uart0", RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_STREAM | RT_DEVICE_FLAG_INT_RX);
|
