gpio: stm32: add support for STM32F4
Implements MCU-specific GPIO input interrupt integration. Added definition of System configuration controller as well as its needed by the GPIO code. The SYSCFG controller is used for system-specific configuration such as: - remap the type of memory accessible at address 0x00000000 - manage the external interrupt line connection to GPIOs - configure the I/O compensation cell Change-Id: Id2ebfbd1b21e77be76406d1cd6cd5d4989e9e2fa Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
3580a6bcec
commit
cf59106433
7 changed files with 402 additions and 0 deletions
|
@ -68,12 +68,35 @@
|
|||
/* FLASH */
|
||||
#define FLASH_R_BASE (AHB1PERIPH_BASE + 0x3C00)
|
||||
|
||||
/* SYSCFG */
|
||||
#define SYSCFG_BASE (APB2PERIPH_BASE + 0x3800)
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
#include <device.h>
|
||||
#include <misc/util.h>
|
||||
#include <drivers/rand32.h>
|
||||
|
||||
/* IO pin functions */
|
||||
enum stm32f4x_pin_config_mode {
|
||||
STM32F4X_PIN_CONFIG_DRIVE_PUSH_PULL,
|
||||
STM32F4X_PIN_CONFIG_DRIVE_PUSH_UP,
|
||||
STM32F4X_PIN_CONFIG_DRIVE_PUSH_DOWN,
|
||||
STM32F4X_PIN_CONFIG_DRIVE_OPEN_DRAIN,
|
||||
STM32F4X_PIN_CONFIG_DRIVE_OPEN_UP,
|
||||
STM32F4X_PIN_CONFIG_DRIVE_OPEN_DOWN,
|
||||
STM32F4X_PIN_CONFIG_AF_PUSH_PULL,
|
||||
STM32F4X_PIN_CONFIG_AF_PUSH_UP,
|
||||
STM32F4X_PIN_CONFIG_AF_PUSH_DOWN,
|
||||
STM32F4X_PIN_CONFIG_AF_OPEN_DRAIN,
|
||||
STM32F4X_PIN_CONFIG_AF_OPEN_UP,
|
||||
STM32F4X_PIN_CONFIG_AF_OPEN_DOWN,
|
||||
STM32F4X_PIN_CONFIG_BIAS_HIGH_IMPEDANCE,
|
||||
STM32F4X_PIN_CONFIG_BIAS_PULL_UP,
|
||||
STM32F4X_PIN_CONFIG_BIAS_PULL_DOWN,
|
||||
STM32F4X_PIN_CONFIG_ANALOG,
|
||||
};
|
||||
|
||||
#include "soc_irq.h"
|
||||
|
||||
#endif /* !_ASMLANGUAGE */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue