Atmel Software Framework

ebi.c File Reference

External bus interface (EBI) functions.

Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.

#include <stdint.h>
#include "compiler.h"
#include "ebi.h"
#include "sysclk.h"
#include "sleepmgr.h"
#include "interrupt.h"

Functions

void ebi_cs_read_config (const uint8_t cs, struct ebi_cs_config *config)
 Read EBI chip select configuration from hardware. More...
 
void ebi_cs_write_config (const uint8_t cs, const struct ebi_cs_config *config)
 Write EBI chip select configuration to hardware. More...
 
void ebi_disable_cs (const uint8_t cs)
 Disable an EBI chip select. More...
 
void ebi_enable_cs (const uint8_t cs, const struct ebi_cs_config *config)
 Enable an EBI chip select. More...
 
static EBI_CS_t * ebi_get_cs_addr_from_cs_num (const uint8_t cs)
 Get chip select register address from chip select number. More...
 
void ebi_sdram_read_config (struct ebi_sdram_config *config)
 Read EBI SDRAM configuration from hardware. More...
 
void ebi_sdram_write_config (const struct ebi_sdram_config *config)
 Write EBI SDRAM configuration to hardware. More...
 

Variables

static uint8_t ebi_enabled_chip_selects
 

static EBI_CS_t* ebi_get_cs_addr_from_cs_num ( const uint8_t  cs)
inlinestatic

Get chip select register address from chip select number.

This functions converts the chip select number into an EBI_CS_t memory pointer, which points to the base of the chip select register.

Parameters
csChip select number to get the chip select register address for
Returns
Pointer to a chip select register address

References Assert.

Referenced by ebi_cs_read_config(), ebi_cs_write_config(), ebi_disable_cs(), and ebi_enable_cs().

uint8_t ebi_enabled_chip_selects
static

Local storage of enabled chip selects

Referenced by ebi_disable_cs(), and ebi_enable_cs().