This is a driver for configuring the external bus interface port.
Setting up the GPIO lines depending on the mode the user has selected.
The EBI port depends on the following modules:
Macros | |
#define | EBI_PORT_CS_ALL |
Functions | |
static void | ebi_setup_port (uint8_t addr_bits, uint8_t sram_ale, uint8_t lpc_ale, uint8_t flags) |
Set up the I/O ports for use by the EBI. More... | |
EBI Address Latch Configuration Flags | |
#define | EBI_ALE1 0x01 |
Enable ALE1 only. More... | |
#define | EBI_ALE12 0x03 |
Enable both ALE1 and ALE2. More... | |
EBI Port Configuration Flags | |
#define | EBI_PORT_3PORT (1 << 0) |
3-port interface (default is 2-port) More... | |
#define | EBI_PORT_SDRAM (1 << 1) |
Enable SDRAM interface. More... | |
#define | EBI_PORT_SRAM (1 << 2) |
Enable SRAM interface. More... | |
#define | EBI_PORT_LPC (1 << 3) |
Enable LPC interface. More... | |
#define | EBI_PORT_CS0 (1 << 4) |
Enable SRAM Chip Select 0. More... | |
#define | EBI_PORT_CS1 (1 << 5) |
Enable SRAM Chip Select 1. More... | |
#define | EBI_PORT_CS2 (1 << 6) |
Enable SRAM Chip Select 2. More... | |
#define | EBI_PORT_CS3 (1 << 7) |
Enable SRAM Chip Select 3. More... | |
#define EBI_ALE1 0x01 |
Enable ALE1 only.
#define EBI_ALE12 0x03 |
Enable both ALE1 and ALE2.
#define EBI_PORT_3PORT (1 << 0) |
3-port interface (default is 2-port)
Referenced by ebi_setup_port(), main(), and memories_initialization().
#define EBI_PORT_CS0 (1 << 4) |
Enable SRAM Chip Select 0.
Referenced by ebi_setup_port(), and main().
#define EBI_PORT_CS1 (1 << 5) |
Enable SRAM Chip Select 1.
Referenced by ebi_setup_port().
#define EBI_PORT_CS2 (1 << 6) |
Enable SRAM Chip Select 2.
Referenced by ebi_setup_port().
#define EBI_PORT_CS3 (1 << 7) |
Enable SRAM Chip Select 3.
Referenced by ebi_setup_port().
#define EBI_PORT_CS_ALL |
Referenced by ebi_setup_port().
#define EBI_PORT_LPC (1 << 3) |
Enable LPC interface.
Referenced by ebi_setup_port().
#define EBI_PORT_SDRAM (1 << 1) |
Enable SDRAM interface.
Referenced by ebi_setup_port(), main(), and memories_initialization().
#define EBI_PORT_SRAM (1 << 2) |
Enable SRAM interface.
Referenced by ebi_setup_port(), and main().
|
inlinestatic |
Set up the I/O ports for use by the EBI.
This function is meant to be called with constant parameters, in which case it will generate a minimal amount of machine code.
addr_bits | Number of address lines to be used for SRAM/LPC. |
sram_ale | Number of address latches to enable for SRAM mode, 0 to 2. |
lpc_ale | Number of address latches to enable for LPC mode, 0 to 2 |
flags | A bitwise combination of the EBI Port Configuration Flags. |
References Assert, EBI_PORT_3PORT, EBI_PORT_CS0, EBI_PORT_CS1, EBI_PORT_CS2, EBI_PORT_CS3, EBI_PORT_CS_ALL, EBI_PORT_LPC, EBI_PORT_SDRAM, EBI_PORT_SRAM, sysclk_disable_module(), SYSCLK_EBI, sysclk_enable_module(), sysclk_module_is_enabled(), and SYSCLK_PORT_GEN.
Referenced by main(), and memories_initialization().