13.12.2012 Views

emWin - SEGGER Microcontroller

emWin - SEGGER Microcontroller

emWin - SEGGER Microcontroller

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

29.3 Hardware interface configuration<br />

The following explains how to configure the hardware communication between display<br />

driver and display controller.<br />

29.3.1 Direct interface<br />

The hardware interface configuration of drivers using a direct interface is done by<br />

specifying the address of the video memory. Normally the routine<br />

LCD_SetVRAMAddrEx() should be used for this. Normally nothing else should be done<br />

to enable access to the video memory for the driver. For details please refer to “Display<br />

driver API” on page 993.<br />

29.3.2 Indirect interface<br />

There are 2 kinds of display drivers:<br />

• Run-time configurable drivers<br />

• Compile-time configurable drivers<br />

Configuring these kinds of drivers works differently:<br />

• Run-time configuration means the driver can be compiled without being configured.<br />

The configuration is done at run-time. This type of driver can still be configured<br />

at run-time when placed in a library.<br />

• A compile-time configurable driver requires the configuration in a configuration<br />

header file, which is included at compile-time of the driver.<br />

29.3.2.1 Run-time configuration<br />

Run-time configurable drivers do not need to be configured at compile time. So this<br />

drivers can be used in a precompiled library.<br />

Each driver has its own function(s) for setting up the hardware interface. This is done<br />

by passing a pointer to a GUI_PORT_API structure containing function pointers to the<br />

hardware routines to be used:<br />

Elements of GUI_PORT_API<br />

Element Data type<br />

8 bit interface<br />

Description<br />

pfWrite8_A0 void (*)(U8 Data)<br />

pfWrite8_A1 void (*)(U8 Data)<br />

pfWriteM8_A0 void (*)(U8 * pData, int NumItems)<br />

pfWriteM8_A1 void (*)(U8 * pData, int NumItems)<br />

pfRead8_A0 U8 (*)(void)<br />

pfRead8_A1 U8 (*)(void)<br />

pfReadM8_A0 void (*)(U8 * pData, int NumItems)<br />

UM03001 User & Reference Guide for <strong>emWin</strong> V5.18 © 1997 - 2012 <strong>SEGGER</strong> <strong>Microcontroller</strong> GmbH & Co. KG<br />

915<br />

Pointer to a function which writes<br />

one byte to the controller with C/D<br />

line low.<br />

Pointer to a function which writes<br />

one byte to the controller with C/D<br />

line high.<br />

Pointer to a function which writes<br />

multiple bytes to the controller with<br />

C/D line low.<br />

Pointer to a function which writes<br />

multiple bytes to the controller with<br />

C/D line high.<br />

Pointer to a function which reads<br />

one byte from the controller with<br />

C/D line low.<br />

Pointer to a function which reads<br />

one byte from the controller with<br />

C/D line high.<br />

Pointer to a function which reads<br />

multiple bytes from the controller<br />

with C/D line low.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!