EFM32: Add I2C driver. From Pierre-noel Bouteville

This commit is contained in:
Gregory Nutt 2015-03-14 14:47:53 -06:00
parent 85b9a7f1a5
commit dd342bb4a7
5 changed files with 1991 additions and 1 deletions

View File

@ -137,6 +137,14 @@ config EFM32_RMU_DEBUG
default n
depends on EFM32_RMU && DEBUG
config EFM32_I2C0
bool "I2C0"
default n
config EFM32_I2C1
bool "I2C1"
default n
config EFM32_USART0
bool "USART0"
default n

View File

@ -101,7 +101,7 @@ CHIP_ASRCS += efm32_vectors.S
endif
CHIP_CSRCS = efm32_start.c efm32_clockconfig.c efm32_irq.c efm32_timerisr.c
CHIP_CSRCS += efm32_gpio.c efm32_lowputc.c efm32_timer.c
CHIP_CSRCS += efm32_gpio.c efm32_lowputc.c efm32_timer.c efm32_i2c.c
ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
CHIP_CSRCS += efm32_idle.c

View File

@ -314,6 +314,22 @@ int efm32_configgpio(gpio_pinset_t cfgset)
return OK;
}
/************************************************************************************
* Name: efm32_unconfiggpio
*
* Description:
* unConfigure a PIO pin based on bit-encoded description of the pin.
*
************************************************************************************/
int efm32_unconfiggpio(gpio_pinset_t cfgset)
{
cfgset &= GPIO_PIN_MASK | GPIO_PORT_MASK;
cfgset |= _GPIO_DISABLE;
return efm32_configgpio(cfgset);
}
/************************************************************************************
* Name: efm32_gpiowrite
*

View File

@ -256,6 +256,16 @@ void efm32_gpioirqinitialize(void);
int efm32_configgpio(gpio_pinset_t cfgset);
/************************************************************************************
* Name: efm32_unconfiggpio
*
* Description:
* UnConfigure a PIO pin based on bit-encoded description of the pin.
*
************************************************************************************/
int efm32_unconfiggpio(gpio_pinset_t cfgset);
/************************************************************************************
* Name: efm32_gpiowrite
*

File diff suppressed because it is too large Load Diff