diff options
| author | bernard.xiong <[email protected]> | 2010-11-29 07:47:47 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-11-29 07:47:47 +0000 |
| commit | 5a4d618832c0cb817bc4cf8a0e3d753bda628355 (patch) | |
| tree | 2e880e17886a10665a6abc88c158ac112518debf /libcpu/avr32 | |
| parent | 7a80d831c961d5c116fba457d3783459bbf41b6e (diff) | |
rename the private field in device to user_data.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1133 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'libcpu/avr32')
| -rw-r--r-- | libcpu/avr32/uc3/serial.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libcpu/avr32/uc3/serial.c b/libcpu/avr32/uc3/serial.c index 15431e20f4..da5aa868f8 100644 --- a/libcpu/avr32/uc3/serial.c +++ b/libcpu/avr32/uc3/serial.c @@ -37,7 +37,7 @@ struct avr32_serial_device uart = /* RT-Thread Device Interface */
static rt_err_t rt_serial_init (rt_device_t dev)
{
- struct avr32_serial_device* uart = (struct avr32_serial_device*) dev->private;
+ struct avr32_serial_device* uart = (struct avr32_serial_device*) dev->user_data;
if (!(dev->flag & RT_DEVICE_FLAG_ACTIVATED))
{
@@ -72,7 +72,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 avr32_serial_device*)dev->private;
+ uart = (struct avr32_serial_device*)dev->user_data;
if (dev->flag & RT_DEVICE_FLAG_INT_RX)
{
@@ -135,7 +135,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 avr32_serial_device*)dev->private;
+ uart = (struct avr32_serial_device*)dev->user_data;
if (dev->flag & RT_DEVICE_FLAG_INT_TX)
{
@@ -179,7 +179,7 @@ static rt_err_t rt_serial_control (rt_device_t dev, rt_uint8_t cmd, void *args) RT_ASSERT(dev != RT_NULL);
- uart = (struct avr32_serial_device*)dev->private;
+ uart = (struct avr32_serial_device*)dev->user_data;
switch (cmd)
{
case RT_DEVICE_CTRL_SUSPEND:
@@ -219,7 +219,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);
@@ -228,7 +228,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(void)
{
- struct avr32_serial_device* uart = (struct avr32_serial_device*) _rt_usart_device.private;
+ struct avr32_serial_device* uart = (struct avr32_serial_device*) _rt_usart_device.user_data;
rt_base_t level;
if (usart_test_hit(uart->uart_device))
|
