EFM32 Wonder Gecko Software Documentation  efm32wg-doc-5.1.2
em_ebi.h File Reference

Detailed Description

External Bus Iterface (EBI) peripheral API.

Version
5.1.2

License

Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no obligation to support this Software. Silicon Labs is providing the Software "AS IS", with no express or implied warranties of any kind, including, but not limited to, any implied warranties of merchantability or fitness for any particular purpose or warranties against infringement of any proprietary rights of a third party.

Silicon Labs will not be liable for any consequential, incidental, or special damages, or any other relief, or for any claim by any third party, arising from your use of this Software.

Definition in file em_ebi.h.

#include "em_device.h"
#include <stdint.h>
#include <stdbool.h>
#include "em_assert.h"

Go to the source code of this file.

Data Structures

struct  EBI_Init_TypeDef
 
struct  EBI_TFTInit_TypeDef
 

Macros

#define EBI_BANK0   (uint32_t)(1 << 1)
 
#define EBI_BANK1   (uint32_t)(1 << 2)
 
#define EBI_BANK2   (uint32_t)(1 << 3)
 
#define EBI_BANK3   (uint32_t)(1 << 4)
 
#define EBI_CS0   (uint32_t)(1 << 1)
 
#define EBI_CS1   (uint32_t)(1 << 2)
 
#define EBI_CS2   (uint32_t)(1 << 3)
 
#define EBI_CS3   (uint32_t)(1 << 4)
 
#define EBI_INIT_DEFAULT
 
#define EBI_TFTINIT_DEFAULT
 

Enumerations

enum  EBI_AHigh_TypeDef {
  ebiAHighA0 = EBI_ROUTE_APEN_A0,
  ebiAHighA5 = EBI_ROUTE_APEN_A5,
  ebiAHighA6 = EBI_ROUTE_APEN_A6,
  ebiAHighA7 = EBI_ROUTE_APEN_A7,
  ebiAHighA8 = EBI_ROUTE_APEN_A8,
  ebiAHighA9 = EBI_ROUTE_APEN_A9,
  ebiAHighA10 = EBI_ROUTE_APEN_A10,
  ebiAHighA11 = EBI_ROUTE_APEN_A11,
  ebiAHighA12 = EBI_ROUTE_APEN_A12,
  ebiAHighA13 = EBI_ROUTE_APEN_A13,
  ebiAHighA14 = EBI_ROUTE_APEN_A14,
  ebiAHighA15 = EBI_ROUTE_APEN_A15,
  ebiAHighA16 = EBI_ROUTE_APEN_A16,
  ebiAHighA17 = EBI_ROUTE_APEN_A17,
  ebiAHighA18 = EBI_ROUTE_APEN_A18,
  ebiAHighA19 = EBI_ROUTE_APEN_A19,
  ebiAHighA20 = EBI_ROUTE_APEN_A20,
  ebiAHighA21 = EBI_ROUTE_APEN_A21,
  ebiAHighA22 = EBI_ROUTE_APEN_A22,
  ebiAHighA23 = EBI_ROUTE_APEN_A23,
  ebiAHighA24 = EBI_ROUTE_APEN_A24,
  ebiAHighA25 = EBI_ROUTE_APEN_A25,
  ebiAHighA26 = EBI_ROUTE_APEN_A26,
  ebiAHighA27 = EBI_ROUTE_APEN_A27,
  ebiAHighA28 = EBI_ROUTE_APEN_A28
}
 
enum  EBI_ALow_TypeDef {
  ebiALowA0 = EBI_ROUTE_ALB_A0,
  ebiALowA8 = EBI_ROUTE_ALB_A8,
  ebiALowA16 = EBI_ROUTE_ALB_A16,
  ebiALowA24 = EBI_ROUTE_ALB_A24
}
 
enum  EBI_Line_TypeDef {
  ebiLineARDY,
  ebiLineALE,
  ebiLineWE,
  ebiLineRE,
  ebiLineCS,
  ebiLineBL,
  ebiLineTFTVSync,
  ebiLineTFTHSync,
  ebiLineTFTDataEn,
  ebiLineTFTDClk,
  ebiLineTFTCS
}
 
enum  EBI_Location_TypeDef {
  ebiLocation0 = EBI_ROUTE_LOCATION_LOC0,
  ebiLocation1 = EBI_ROUTE_LOCATION_LOC1,
  ebiLocation2 = EBI_ROUTE_LOCATION_LOC2
}
 
enum  EBI_Mode_TypeDef {
  ebiModeD8A8 = EBI_CTRL_MODE_D8A8,
  ebiModeD16A16ALE = EBI_CTRL_MODE_D16A16ALE,
  ebiModeD8A24ALE = EBI_CTRL_MODE_D8A24ALE,
  ebiModeD16 = EBI_CTRL_MODE_D16
}
 
enum  EBI_Polarity_TypeDef {
  ebiActiveLow = 0,
  ebiActiveHigh = 1
}
 
enum  EBI_TFTBank_TypeDef {
  ebiTFTBank0 = EBI_TFTCTRL_BANKSEL_BANK0,
  ebiTFTBank1 = EBI_TFTCTRL_BANKSEL_BANK1,
  ebiTFTBank2 = EBI_TFTCTRL_BANKSEL_BANK2,
  ebiTFTBank3 = EBI_TFTCTRL_BANKSEL_BANK3
}
 
enum  EBI_TFTColorSrc_TypeDef {
  ebiTFTColorSrcMem = EBI_TFTCTRL_COLOR1SRC_MEM,
  ebiTFTColorSrcPixel1 = EBI_TFTCTRL_COLOR1SRC_PIXEL1
}
 
enum  EBI_TFTDDMode_TypeDef {
  ebiTFTDDModeDisabled = EBI_TFTCTRL_DD_DISABLED,
  ebiTFTDDModeInternal = EBI_TFTCTRL_DD_INTERNAL,
  ebiTFTDDModeExternal = EBI_TFTCTRL_DD_EXTERNAL
}
 
enum  EBI_TFTFrameBufTrigger_TypeDef {
  ebiTFTFrameBufTriggerVSync = EBI_TFTCTRL_FBCTRIG_VSYNC,
  ebiTFTFrameBufTriggerHSync = EBI_TFTCTRL_FBCTRIG_HSYNC
}
 
enum  EBI_TFTInterleave_TypeDef {
  ebiTFTInterleaveUnlimited = EBI_TFTCTRL_INTERLEAVE_UNLIMITED,
  ebiTFTInterleaveOnePerDClk = EBI_TFTCTRL_INTERLEAVE_ONEPERDCLK,
  ebiTFTInterleavePorch = EBI_TFTCTRL_INTERLEAVE_PORCH
}
 
enum  EBI_TFTMaskBlend_TypeDef {
  ebiTFTMBDisabled = EBI_TFTCTRL_MASKBLEND_DISABLED,
  ebiTFTMBIMask = EBI_TFTCTRL_MASKBLEND_IMASK,
  ebiTFTMBIAlpha = EBI_TFTCTRL_MASKBLEND_IALPHA,
  ebiTFTMBIMaskAlpha = EBI_TFTCTRL_MASKBLEND_IMASKIALPHA,
  ebiTFTMBEMask = EBI_TFTCTRL_MASKBLEND_EMASK,
  ebiTFTMBEAlpha = EBI_TFTCTRL_MASKBLEND_EALPHA,
  ebiTFTMBEMaskAlpha = EBI_TFTCTRL_MASKBLEND_EMASKEALPHA
}
 
enum  EBI_TFTWidth_TypeDef {
  ebiTFTWidthByte = EBI_TFTCTRL_WIDTH_BYTE,
  ebiTFTWidthHalfWord = EBI_TFTCTRL_WIDTH_HALFWORD
}
 

Functions

void EBI_AddressTimingSet (int setupCycles, int holdCycles)
 Configure timing values of address latch bus accesses. More...
 
void EBI_AltMapEnable (bool enable)
 Configure Alternate Address Map support Enables or disables 256MB address range for all banks. More...
 
uint32_t EBI_BankAddress (uint32_t bank)
 Return base address of EBI bank. More...
 
void EBI_BankAddressTimingConfig (uint32_t banks, bool halfALE)
 Configure address operation parameters for selected bank. More...
 
void EBI_BankAddressTimingSet (uint32_t banks, int setupCycles, int holdCycles)
 Configure timing values of address latch bus accesses. More...
 
void EBI_BankByteLaneEnable (uint32_t banks, bool enable)
 Configure Byte Lane Enable for select banks timing support. More...
 
void EBI_BankEnable (uint32_t banks, bool enable)
 Enable or disable EBI Bank. More...
 
void EBI_BankPolaritySet (uint32_t banks, EBI_Line_TypeDef line, EBI_Polarity_TypeDef polarity)
 Configure EBI pin polarity for selected bank(s) for devices with individual timing support. More...
 
void EBI_BankReadTimingConfig (uint32_t banks, bool pageMode, bool prefetch, bool halfRE)
 Configure read operation parameters for selected bank. More...
 
void EBI_BankReadTimingSet (uint32_t banks, int setupCycles, int strobeCycles, int holdCycles)
 Configure timing values of read bus accesses. More...
 
void EBI_BankWriteTimingConfig (uint32_t banks, bool writeBufDisable, bool halfWE)
 Configure write operation parameters for selected bank. More...
 
void EBI_BankWriteTimingSet (uint32_t banks, int setupCycles, int strobeCycles, int holdCycles)
 Configure timing values of write bus accesses. More...
 
void EBI_ChipSelectEnable (uint32_t cs, bool enable)
 Enable or disable EBI Chip Select. More...
 
void EBI_Disable (void)
 Disable External Bus Interface.
 
void EBI_Init (const EBI_Init_TypeDef *ebiInit)
 Configure and enable External Bus Interface. More...
 
__STATIC_INLINE void EBI_IntClear (uint32_t flags)
 Clear one or more pending EBI interrupts. More...
 
__STATIC_INLINE void EBI_IntDisable (uint32_t flags)
 Disable one or more EBI interrupts. More...
 
__STATIC_INLINE void EBI_IntEnable (uint32_t flags)
 Enable one or more EBI interrupts. More...
 
__STATIC_INLINE uint32_t EBI_IntGet (void)
 Get pending EBI interrupt flags. More...
 
__STATIC_INLINE uint32_t EBI_IntGetEnabled (void)
 Get enabled and pending EBI interrupt flags. Useful for handling more interrupt sources in the same interrupt handler. More...
 
__STATIC_INLINE void EBI_IntSet (uint32_t flags)
 Set one or more pending EBI interrupts. More...
 
void EBI_PolaritySet (EBI_Line_TypeDef line, EBI_Polarity_TypeDef polarity)
 Configure EBI pin polarity. More...
 
void EBI_ReadTimingSet (int setupCycles, int strobeCycles, int holdCycles)
 Configure timing values of read bus accesses. More...
 
__STATIC_INLINE void EBI_StartNandEccGen (void)
 Start ECC generator on NAND flash transfers.
 
__STATIC_INLINE uint32_t EBI_StopNandEccGen (void)
 Stop NAND flash ECC generator and return generated ECC. More...
 
__STATIC_INLINE void EBI_TFTAlphaBlendSet (uint8_t alpha)
 Set TFT Alpha Blending Factor. More...
 
__STATIC_INLINE void EBI_TFTEnable (EBI_TFTDDMode_TypeDef mode)
 Enable or disable TFT Direct Drive. More...
 
__STATIC_INLINE void EBI_TFTFBTriggerSet (EBI_TFTFrameBufTrigger_TypeDef sync)
 Set Frame Buffer Trigger. More...
 
__STATIC_INLINE void EBI_TFTFrameBaseSet (uint32_t address)
 Configure frame buffer pointer. More...
 
__STATIC_INLINE uint32_t EBI_TFTHCount (void)
 Get current horizontal position counter. More...
 
void EBI_TFTHPorchSet (int front, int back, int pulseWidth)
 Configure and initialize Horizontal Porch Settings. More...
 
__STATIC_INLINE void EBI_TFTHStrideSet (uint32_t nbytes)
 Set horizontal TFT stride value in number of bytes. More...
 
void EBI_TFTInit (const EBI_TFTInit_TypeDef *ebiTFTInit)
 Configure and initialize TFT Direct Drive. More...
 
__STATIC_INLINE void EBI_TFTMaskBlendMode (EBI_TFTMaskBlend_TypeDef maskBlend)
 Masking and Blending Mode Set. More...
 
__STATIC_INLINE void EBI_TFTMaskSet (uint32_t mask)
 Set TFT mask value Data accesses that matches this value are suppressed. More...
 
__STATIC_INLINE void EBI_TFTPixelSet (int pixel, uint32_t color)
 Set TFT Pixel Color 0 or 1. More...
 
void EBI_TFTSizeSet (uint32_t horizontal, uint32_t vertical)
 Configure and initialize TFT size settings. More...
 
void EBI_TFTTimingSet (int dclkPeriod, int start, int setup, int hold)
 Configure TFT Direct Drive Timing Settings. More...
 
__STATIC_INLINE uint32_t EBI_TFTVCount (void)
 Get current vertical position counter. More...
 
void EBI_TFTVPorchSet (int front, int back, int pulseWidth)
 Configure Vertical Porch Settings. More...
 
void EBI_WriteTimingSet (int setupCycles, int strobeCycles, int holdCycles)
 Configure timing values of write bus accesses. More...