mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 10:46:28 +08:00
EFM32: Add I2C driver. From Pierre-noel Bouteville
This commit is contained in:
@@ -137,6 +137,14 @@ config EFM32_RMU_DEBUG
|
|||||||
default n
|
default n
|
||||||
depends on EFM32_RMU && DEBUG
|
depends on EFM32_RMU && DEBUG
|
||||||
|
|
||||||
|
config EFM32_I2C0
|
||||||
|
bool "I2C0"
|
||||||
|
default n
|
||||||
|
|
||||||
|
config EFM32_I2C1
|
||||||
|
bool "I2C1"
|
||||||
|
default n
|
||||||
|
|
||||||
config EFM32_USART0
|
config EFM32_USART0
|
||||||
bool "USART0"
|
bool "USART0"
|
||||||
default n
|
default n
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ CHIP_ASRCS += efm32_vectors.S
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
CHIP_CSRCS = efm32_start.c efm32_clockconfig.c efm32_irq.c efm32_timerisr.c
|
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)
|
ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
|
||||||
CHIP_CSRCS += efm32_idle.c
|
CHIP_CSRCS += efm32_idle.c
|
||||||
|
|||||||
@@ -314,6 +314,22 @@ int efm32_configgpio(gpio_pinset_t cfgset)
|
|||||||
return OK;
|
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
|
* Name: efm32_gpiowrite
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -256,6 +256,16 @@ void efm32_gpioirqinitialize(void);
|
|||||||
|
|
||||||
int efm32_configgpio(gpio_pinset_t cfgset);
|
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
|
* Name: efm32_gpiowrite
|
||||||
*
|
*
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user