*** EFM32 branch ***

Modify IIC and USART drivers to avoid compiling error.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1655 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
onelife.real
2011-07-29 07:24:09 +00:00
parent 19e3ce5ee3
commit aa24c176e7
5 changed files with 12 additions and 13 deletions

View File

@@ -499,7 +499,7 @@ static rt_size_t rt_usart_write (
true,
false,
(void *)&(usart->usart_device->TXDATA),
buffer,
(void *)buffer,
(rt_uint32_t)(size - 1));
/* Wait, otherwise the TX buffer is overwrite */
@@ -920,21 +920,18 @@ static struct efm32_usart_device_t *rt_hw_usart_unit_init(
switch (unitNumber)
{
case 0:
usart->lock = &usart0_lock;
usart->usart_device = USART0;
usartClock = (CMU_Clock_TypeDef)cmuClock_USART0;
txDmaSelect = DMAREQ_USART0_TXBL;
break;
case 1:
usart->lock = &usart1_lock;
usart->usart_device = USART1;
usartClock = (CMU_Clock_TypeDef)cmuClock_USART1;
txDmaSelect = DMAREQ_USART1_TXBL;
break;
case 2:
usart->lock = &usart2_lock;
usart->usart_device = USART2;
usartClock = (CMU_Clock_TypeDef)cmuClock_USART2;
txDmaSelect = DMAREQ_USART2_TXBL;
@@ -1161,6 +1158,7 @@ void rt_hw_usart_init(void)
break;
}
/* Initialize lock for usart0 */
usart->lock = &usart0_lock;
if (rt_sem_init(usart->lock, RT_USART0_NAME, 1, RT_IPC_FLAG_FIFO) != RT_EOK)
{
break;
@@ -1215,6 +1213,7 @@ void rt_hw_usart_init(void)
break;
}
/* Initialize lock for usart1 */
usart->lock = &usart1_lock;
if (rt_sem_init(usart->lock, RT_USART1_NAME, 1, RT_IPC_FLAG_FIFO) != RT_EOK)
{
break;
@@ -1270,6 +1269,7 @@ void rt_hw_usart_init(void)
break;
}
/* Initialize lock for usart2 */
usart->lock = &usart2_lock;
if (rt_sem_init(usart->lock, RT_USART2_NAME, 1, RT_IPC_FLAG_FIFO) != RT_EOK)
{
break;