*** 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

@ -122,7 +122,6 @@ extern volatile rt_uint32_t rt_system_status;
#define IIC_RX_BUFFER_SIZE (32)
/* SECTION: ADC */
#define ADC_CALI_REF adcRef2V5
#define ADC_CALI_CH adcSingleInpCh5
#define ADC_CONVERT_FREQUENCY (7000000)

View File

@ -1021,7 +1021,7 @@ rt_err_t efm_hw_eth_init(void)
return -RT_ERROR;
}
/***************************************************************************//**
/*******************************************************************************
* Export to FINSH
******************************************************************************/
#if defined(EFM32_USING_ETH_UTILS)

View File

@ -715,14 +715,12 @@ static struct efm32_iic_device_t *rt_hw_iic_unit_init(
switch (unitNumber)
{
case 0:
iic->lock = &iic0_lock;
iic->iic_device = I2C0;
iicClock = (CMU_Clock_TypeDef)cmuClock_I2C0;
break;
#if (I2C_COUNT > 1)
case 1:
iic->lock = &iic1_lock;
iic->iic_device = I2C1;
iicClock = (CMU_Clock_TypeDef)cmuClock_I2C1;
break;
@ -807,6 +805,7 @@ void rt_hw_iic_init(void)
}
/* Initialize lock for iic0 */
iic->lock = &iic0_lock;
if (rt_sem_init(iic->lock, RT_IIC0_NAME, 1, RT_IPC_FLAG_FIFO) != RT_EOK)
{
break;
@ -825,6 +824,7 @@ void rt_hw_iic_init(void)
}
/* Initialize lock for iic1 */
iic->lock = &iic1_lock;
if (rt_sem_init(iic->lock, RT_IIC1_NAME, 1, RT_IPC_FLAG_FIFO) != RT_EOK)
{
break;

View File

@ -1264,7 +1264,7 @@ void efm_spiSd_deinit(void)
sdcard_debug("SPISD: Deinit OK\n");
}
/***************************************************************************//**
/*******************************************************************************
* Export to FINSH
******************************************************************************/
#ifdef RT_USING_FINSH

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;