DM-lm3s9b96 Hakkında

Başlatan yamak, 06 Temmuz 2011, 11:04:20

yamak

Merhaba arkadaşlar. Daha önce LPC1768 ile çalışıyodum. Şimdi stajda lm3s9b96 ile çalışıyorum. Bence çok hoş yanları var lm3s9b96 nın. Gözüme çarpan en önemli özelliği. PWM birimi 4 adet generator den oluşuyo her bir birime ait pwm çıkışlarının frekansları farklı farklı ayarlayabiliyosun. Ayrıca her bir pwm çıkışısını 1 den fazla pinde kullanabiliyosun. Ayrıca stellaris ware ile birlikte bir sürü kütüphane sunuyo ti. Üzerinde touch screen lcd için mükkemmel bir kütüphane hazırlanmış.Cortex-m3 çekirdekli mcu larla ilgililenmek isteyen arkadaşlara öneririm. Tabi lpc ye göre bazı eksik yanları var ama göz ardı edilebilir bence şimdilik gördüğüm işlemcini hızı 80 mhz lpc nin hızı 100 mhz. lpc dac var lm3s9b96 da yok. Ayrıca ethernet uygulamaları için harici phy entegresi kullanılmasına gekek yok kendi içinde barındırıyo. Bir de kendi içinde sıcaklık sensörü de mevcut.

z

LPC den ne eksiklikleri var. LM3S9B96 nın pwm modülüne benzer özelliklerde LPC nin hangi çipi var?

Bana e^st de diyebilirsiniz.   www.cncdesigner.com

fahri-

fiyatları ne mertebede? Bilginiz var mı?

yamak

Alıntı YapLPC den ne eksiklikleri var. LM3S9B96 nın pwm modülüne benzer özelliklerde LPC nin hangi çipi var?
Benim şimdilik gördüğüm DAC yok ADC si 10 bit bir hızı 80 mhz flash memory si 256 kb.LPC de ise adc 12 bit hız 100 mhz flash memory 512 kb.Ona benzer lpc nin işlemcisi var mı bilmiyorum.

z

Özellikle ADC çevrim süresi ile pwm modüllerinin sayısını merak ettim.
Bana e^st de diyebilirsiniz.   www.cncdesigner.com

yamak

Data sheet te ADC clock rate inin 14-18 MHZ olduğu yazıyo ki bu lpc de 13 mhz di. Ayrıca pwm kanal sayısı 8.

fatihinanc

Alıntı yapılan: bunalmis - 06 Temmuz 2011, 13:03:17
Özellikle ADC çevrim süresi ile pwm modüllerinin sayısını merak ettim.

Hocam sitede şu şekilde geçiyor;
Alıntı YapTwo 10-bit Analog-to-Digital Converters (ADC) with sixteen analog input channels and sample rate of one million samples/second

C2000 ler var Texas'ın onlar galiba bu tarz işlemler için çok başarılı...
Kainat dediğimiz kitap, yazıldığı dil ve harfler öğrenilmedikçe anlaşılamaz.  (Galileo Galilei)

OptimusPrime

arkadaşında bahsettiği gibi özellikle grafik kütüphanesi oldukça güzel yazılmış. canvastan radio buttonlara silder dan checkboxlara kadar herşey mevcut fakat C derleyicisi ile kullanılması vakit alıcı. buna uygun bir arayüz programı tasarlansa bence daha verimli olabilirdi. basit bir örnek vermek gerekirse bir menünün ( tasarlanmış bir menüyü çipe aktarıyorum şuan ) oluşturulması yaklaşık yarım günü alabiliyor. ayrıca kullanacağınız resimleri öncelikle gimp programı ile pnm formatına sonrasında bu formatı ti ın verdiği bir programı kullanarak koda çevirmek oldukça zaman alıyor. destan gibi kod oluşturduğu için de kes yapıştır işlemi bile eziyet haline geliyor :) ayrıca üzerinde kitronix in bir tft si ile geliyor deneme kiti. bu tft ye muadil olarak kullanabileceğiniz winstarın wf57b serisi tft leri var fakat sürücüsü uyuşmadığı için ti ın yazdığı tft driver ını değiştirmek gerekiyor. ek olarak, kitin üzerinde gelen 320x240 tft nin yerine ben farklı çözünürlükte bir tft istiyorum diyenler için ti ın grafik kütüphanesi buna uygunmudur bilmiyorum sanırım grafik işlemleri yapmak için bu mikroyu seçenler için bardağı taşıran son damla burası olacaktır :) kısacası grafik tasarımları için piyasada bulabileceğinizin en iyisi diyebilirim fakat bahsettiğim  nedenlerden dolayı sıkıntılı.

bunun dışında üzerindeki donanımı ihtiyacım olmadığı için fazla inceleyemedim fakat usb den ethernete kadar spi uart vs vs bi çok çevre birimi mevcut. güzel bir mikro. yanlış hatırmamıyorsam usb den firmware updatine bile izin verebiliyor. ben uart update ini denemiştim fakat ti ın verdiği kodlar çalışmadığı için beceremedim. sonrasında uğraşmak içn vakitte bulamadım.

ayrıca ti ın verdiği kütüphanelerde kullanılan bir çok api nin rom a gömülmesi kod yazarken flash dan da kazanılmasını sağlıyor.

ayrıca flash alanını eeprom olarak kullanmaya izin verebiliryor çip fakat C3 revizyonunda bir kısıtlama söz konusu 100 yazmadan sonra çip kullanılmaz hale geliyor.

çipin bir başka eksiği ise debug sorunu ve keil ın revizyonlar arasındaki uyumsuzluğu. ti bunun için sürekli bir dll güncelleştirmesi yapıyor. ayrıca çipin üzerinde jtag olmasına karşın buradan ne yükleme nede debug yapabildim. sadece çipe swd ile ulaşabiliyorum. hatta bazen yükleme sırasında hata verip yükleme işlemini bitirdiğini ve bi daha çipe firmware yükleyemediğim zamanlarda oldu. nedendir bilmiyorum.

aklıma gelmişken yazayım çipin flashı compress etmeden 320x240 max 4 adet renkli resim alabiliyor :) aman dikkat.

https://donanimveyazilim.wordpress.com || Cihân-ârâ cihân içredir ârâyı bilmezler, O mâhîler ki deryâ içredir deryâyı bilmezler ||

yamak

#8
Ben de şu an başka bir grafik kütüphanesi hazırlamayla uğraşıyorum. üzerindeki lcd nin controller ı ssd2119 ben ise ssd1993 e uyumlu bir kütüphane oluşturmaya çalışıyorum.tabi yeni lcd yi kite takmam içinde bir dönüştürücü devre. Bir de bir sorum olacaktı ti verdiği program ile dönüştürme yapıyoruz demişssiniz. bu programı nerden bulabilirim bi link verir misiniz?

yamak

Bir de ben de swd ile program yüklüyorum ama jtag ile yükleniyo diye biliyorum. jumperlar la alakalı olabilir.Kitinizin üzerinde jtag girişi yok mu?

OptimusPrime

ssd1993 diye bir driver varmı? ssd1963 için ben driver yazmıştım. istersen paylaşırım.

jtag ile bir kaç kez progamlayabildim, swd düzgün çalışınca jtag neden çalışmadı diye vakit kaybetmek istemedim.

http://www.gimp.org/downloads/
adresinde gimp adında bir resim işleme programı var. bununla öncelikle resimleri pnm formatına çevirmen gerekiyor. ayrıca resimlerin max 256 renk içermesi lazım. bu işlemin nasıl yapıldığı ( stellariswire yüklü ise )

C:\StellarisWare\docs adresindeki SW-GRL-UG-6075.pdf dosyasında 13.4 de yazılı.

burada elde ettiğin pnm dosyasını da C:\StellarisWare\tools\bin adresindeki pnmtoc.exe programı ile ( dos altında çalışıyor ) koda çeviriyorsun.

kolay gelsin... :)
https://donanimveyazilim.wordpress.com || Cihân-ârâ cihân içredir ârâyı bilmezler, O mâhîler ki deryâ içredir deryâyı bilmezler ||

yamak

#11
 Paylaşırsanız sevinirim.Sadece kitronix320x240x16_ssd2119_8bit.c ve kitronix320x240x16_ssd2119_8bit.h ı değiştirdiniz di mi?Ayrıca yanlış yazmışım ssd1963 olacaktı.

OptimusPrime

c dosyası

#include "inc/hw_gpio.h"
#include "inc/hw_ints.h"
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/gpio.h"
#include "driverlib/epi.h"
#include "driverlib/interrupt.h"
#include "driverlib/sysctl.h"
#include "driverlib/timer.h"
#include "grlib/grlib.h"
#include "drivers/kitronix320x240x16_ssd2119_8bit.h"
#include "drivers/set_pinout.h"
#include "drivers/camerafpga.h"

//*****************************************************************************
//
// The dimensions of the LCD panel.
//
//*****************************************************************************
#define LCD_VERTICAL_MAX 		239
#define LCD_HORIZONTAL_MAX 		319

//#define LANDSCAPE
//#define LANDSCAPE_FLIP

//*****************************************************************************
//
// This driver operates in four different screen orientations.  They are:
//
// * Portrait - The screen is taller than it is wide, and the flex connector is
//              on the left of the display.  This is selected by defining
//              PORTRAIT.
//
// * Landscape - The screen is wider than it is tall, and the flex connector is
//               on the bottom of the display.  This is selected by defining
//               LANDSCAPE.
//
// * Portrait flip - The screen is taller than it is wide, and the flex
//                   connector is on the right of the display.  This is
//                   selected by defining PORTRAIT_FLIP.
//
// * Landscape flip - The screen is wider than it is tall, and the flex
//                    connector is on the top of the display.  This is
//                    selected by defining LANDSCAPE_FLIP.
//
// These can also be imagined in terms of screen rotation; if portrait mode is
// 0 degrees of screen rotation, landscape is 90 degrees of counter-clockwise
// rotation, portrait flip is 180 degrees of rotation, and landscape flip is
// 270 degress of counter-clockwise rotation.
//
// If no screen orientation is selected, "landscape flip" mode will be used.
//
//*****************************************************************************

#if ! defined(PORTRAIT) && ! defined(PORTRAIT_FLIP) && \
    ! defined(LANDSCAPE) && ! defined(LANDSCAPE_FLIP)
#define LANDSCAPE_FLIP
#endif
 
//*****************************************************************************
//
// Various definitions controlling coordinate space mapping and drawing
// direction in the four supported orientations.
//
//*****************************************************************************
#ifdef PORTRAIT
//#define HORIZ_DIRECTION 0x28
//#define VERT_DIRECTION 0x20
#define MAPPED_X(x, y) (LCD_HORIZONTAL_MAX - (y))
#define MAPPED_Y(x, y) (x)
#error PORTRAIT mode is not supported
#endif
#ifdef LANDSCAPE
//#define HORIZ_DIRECTION 0x00
//#define VERT_DIRECTION  0x08
#define MAPPED_X(x, y) (x)
#define MAPPED_Y(x, y) (y)
#endif
#ifdef PORTRAIT_FLIP
//#define HORIZ_DIRECTION 0x18
//#define VERT_DIRECTION 0x10
#define MAPPED_X(x, y) (y)
#define MAPPED_Y(x, y) (LCD_VERTICAL_MAX - (x))
#error PORTRAIT_FLIP mode is not supported
#endif
#ifdef LANDSCAPE_FLIP
//#define HORIZ_DIRECTION 0x30
//#define VERT_DIRECTION  0x38
#define MAPPED_X(x, y) (x)
#define MAPPED_Y(x, y) (y)
#endif

//*****************************************************************************
//
// Defines for the pins that are used to communicate with the SSD2119.
//
//*****************************************************************************

#define LCD_DATAH_PINS          0xFF
#define LCD_DATAH_PERIPH        SYSCTL_PERIPH_GPIOD
#define LCD_DATAH_BASE          GPIO_PORTD_BASE

//
// LCD control line GPIO definitions.
//
#define LCD_RST_PERIPH          SYSCTL_PERIPH_GPIOB
#define LCD_RST_BASE            GPIO_PORTB_BASE
#define LCD_RST_PIN             GPIO_PIN_7
#define LCD_CS_PERIPH           SYSCTL_PERIPH_GPIOB
#define LCD_CS_BASE             GPIO_PORTB_BASE
#define LCD_CS_PIN              GPIO_PIN_5
#define LCD_WR_PERIPH           SYSCTL_PERIPH_GPIOH
#define LCD_WR_BASE             GPIO_PORTH_BASE
#define LCD_WR_PIN              GPIO_PIN_6
#define LCD_DC_PERIPH           SYSCTL_PERIPH_GPIOH
#define LCD_DC_BASE             GPIO_PORTH_BASE
#define LCD_DC_PIN              GPIO_PIN_7

//*****************************************************************************
//
// Backlight control GPIO used with the Flash/SRAM/LCD daughter board.
//
//*****************************************************************************
#define LCD_BACKLIGHT_BASE      GPIO_PORTE_BASE
#define LCD_BACKLIGHT_PIN       GPIO_PIN_2

//*****************************************************************************
//
// Macro used to set the LCD data bus in preparation for writing a byte to the
// device.
//
//*****************************************************************************
#define SET_LCD_DATA(ucByte)                                                  \
{                                                                             \
    HWREG(LCD_DATAH_BASE + GPIO_O_DATA + (LCD_DATAH_PINS << 2)) = (ucByte);   \
}

//*****************************************************************************
//
// Various internal SD2119 registers name labels
//
//*****************************************************************************
//#define SSD2119_DEVICE_CODE_READ_REG  0x00
//#define SSD2119_OSC_START_REG         0x00
//#define SSD2119_OUTPUT_CTRL_REG       0x01
//#define SSD2119_LCD_DRIVE_AC_CTRL_REG 0x02
//#define SSD2119_PWR_CTRL_1_REG        0x03
//#define SSD2119_DISPLAY_CTRL_REG      0x07
//#define SSD2119_FRAME_CYCLE_CTRL_REG  0x0B
//#define SSD2119_PWR_CTRL_2_REG        0x0C
//#define SSD2119_PWR_CTRL_3_REG        0x0D
//#define SSD2119_PWR_CTRL_4_REG        0x0E
//#define SSD2119_GATE_SCAN_START_REG   0x0F
//#define SSD2119_SLEEP_MODE_1_REG      0x10
//#define SSD2119_ENTRY_MODE_REG        0x11
//#define SSD2119_SLEEP_MODE_2_REG      0x12
//#define SSD2119_GEN_IF_CTRL_REG       0x15
//#define SSD2119_PWR_CTRL_5_REG        0x1E
//#define SSD2119_RAM_DATA_REG          0x22
//#define SSD2119_FRAME_FREQ_REG        0x25
//#define SSD2119_ANALOG_SET_REG        0x26
//#define SSD2119_VCOM_OTP_1_REG        0x28
//#define SSD2119_VCOM_OTP_2_REG        0x29
//#define SSD2119_GAMMA_CTRL_1_REG      0x30
//#define SSD2119_GAMMA_CTRL_2_REG      0x31
//#define SSD2119_GAMMA_CTRL_3_REG      0x32
//#define SSD2119_GAMMA_CTRL_4_REG      0x33
//#define SSD2119_GAMMA_CTRL_5_REG      0x34
//#define SSD2119_GAMMA_CTRL_6_REG      0x35
//#define SSD2119_GAMMA_CTRL_7_REG      0x36
//#define SSD2119_GAMMA_CTRL_8_REG      0x37
//#define SSD2119_GAMMA_CTRL_9_REG      0x3A
//#define SSD2119_GAMMA_CTRL_10_REG     0x3B
//#define SSD2119_V_RAM_POS_REG         0x44
//#define SSD2119_H_RAM_START_REG       0x45
//#define SSD2119_H_RAM_END_REG         0x46
//#define SSD2119_X_RAM_ADDR_REG        0x4E
//#define SSD2119_Y_RAM_ADDR_REG        0x4F
//
//#define ENTRY_MODE_DEFAULT 0x6830
//#define MAKE_ENTRY_MODE(x) ((ENTRY_MODE_DEFAULT & 0xFF00) | (x))

#define SSD1963_SOFTWARE_RESET					0x01
#define SSD1963_SET_PLL							0xE0
#define SSD1963_SET_DISPLAY_MODE				0xB0
#define SSD1963_SET_PIXEL_DATA_INTERFACE		0xF0
#define SSD1963_SET_PIXEL_FORMAT				0x3A
#define SSD1963_SET_ADDRESS_MODE				0x36
#define SSD1963_SET_PLL_MN						0xE2
#define SSD1963_SET_LSHIFT_FREQUENCY			0xE6
#define SSD1963_SET_H_PERIOD					0xB4
#define SSD1963_SET_V_PERIOD					0xB6
#define SSD1963_SET_COLUMN_ADDRESS				0x2A
#define SSD1963_SET_PAGE_ADDRESS				0x2B
#define SSD1963_WRITE							0x2C
#define SSD1963_DISPLAY_ON						0x29

//*****************************************************************************
//
// Translates a 24-bit RGB color to a display driver-specific color.
//
// \param c is the 24-bit RGB color.  The least-significant byte is the blue
// channel, the next byte is the green channel, and the third byte is the red
// channel.
//
// This macro translates a 24-bit RGB color into a value that can be written
// into the display's frame buffer in order to reproduce that color, or the
// closest possible approximation of that color.
//
// \return Returns the display-driver specific color.
//
//*****************************************************************************
#define DPYCOLORTRANSLATE(c)    ((((c) & 0x00f80000) >> 8) |               \
                                 (((c) & 0x0000fc00) >> 5) |               \
                                 (((c) & 0x000000f8) >> 3))

//*****************************************************************************
//
// Function pointer types for low level LCD controller access functions.
//
//*****************************************************************************
typedef void (*pfnWriteData)(unsigned char usData);
typedef void (*pfnWriteCommand)(unsigned char ucData);

//*****************************************************************************
//
// Function pointers for low level LCD controller access functions.
//
//*****************************************************************************

static void WriteDataGPIO(unsigned char usData);
static void WriteCommandGPIO(unsigned char ucData);

pfnWriteData WriteData = WriteDataGPIO;
pfnWriteCommand WriteCommand = WriteCommandGPIO;

//*****************************************************************************
//
// Writes a data word to the SSD2119.  This function implements the basic GPIO
// interface to the LCD display.
//
//*****************************************************************************
static void
WriteDataGPIO(unsigned char usData)
{
	HWREG(LCD_DC_BASE + GPIO_O_DATA + (LCD_DC_PIN << 2)) = LCD_DC_PIN;
	HWREG(LCD_WR_BASE + GPIO_O_DATA + (LCD_WR_PIN << 2)) = 0;
	HWREG(LCD_CS_BASE + GPIO_O_DATA + (LCD_CS_PIN << 2)) = 0;
	SET_LCD_DATA(usData);	
	HWREG(LCD_WR_BASE + GPIO_O_DATA + (LCD_WR_PIN << 2)) = LCD_WR_PIN;
	HWREG(LCD_CS_BASE + GPIO_O_DATA + (LCD_CS_PIN << 2)) = LCD_CS_PIN;
}
//*****************************************************************************
//
// Writes a command to the SSD2119.  This function implements the basic GPIO
// interface to the LCD display.
//
//*****************************************************************************
static void
WriteCommandGPIO(unsigned char ucData)
{
	HWREG(LCD_DC_BASE + GPIO_O_DATA + (LCD_DC_PIN << 2)) = 0;
    HWREG(LCD_WR_BASE + GPIO_O_DATA + (LCD_WR_PIN << 2)) = 0;
    HWREG(LCD_CS_BASE + GPIO_O_DATA + (LCD_CS_PIN << 2)) = 0;
	SET_LCD_DATA(ucData);
	HWREG(LCD_CS_BASE + GPIO_O_DATA + (LCD_CS_PIN << 2)) = LCD_CS_PIN;
	HWREG(LCD_WR_BASE + GPIO_O_DATA + (LCD_WR_PIN << 2)) = LCD_WR_PIN;
}

//*****************************************************************************
//
// Initializes the pins required for the GPIO-based LCD interface.
//
// This function configures the GPIO pins used to control the LCD display
// when the basic GPIO interface is in use.  On exit, the LCD controller
// has been reset and is ready to receive command and data writes.
//
// \return None.
//
//*****************************************************************************
static void
InitGPIOLCDInterface(unsigned long ulClockMS)
{
    //
    // Convert the PB7/NMI pin into a GPIO pin.  This requires the use of the
    // GPIO lock since changing the state of the pin is otherwise disabled.
    //
    HWREG(GPIO_PORTB_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY_DD;
    HWREG(GPIO_PORTB_BASE + GPIO_O_CR) = 0x80;

    //
    // Make PB7 an output.
    //
    GPIODirModeSet(GPIO_PORTB_BASE, GPIO_PIN_7, GPIO_DIR_MODE_OUT);
    GPIOPadConfigSet(GPIO_PORTB_BASE, GPIO_PIN_7, GPIO_STRENGTH_8MA,
                     GPIO_PIN_TYPE_STD);

    //
    // Clear the commit register, effectively locking access to registers
    // controlling the PB7 configuration.
    //
    HWREG(GPIO_PORTB_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY_DD;
    HWREG(GPIO_PORTB_BASE + GPIO_O_CR) = 0x00;

    //
    // Configure the pins that connect to the LCD as GPIO outputs.
    //
    GPIODirModeSet(LCD_DATAH_BASE, LCD_DATAH_PINS, GPIO_DIR_MODE_OUT);
    GPIOPadConfigSet(LCD_DATAH_BASE, LCD_DATAH_PINS, GPIO_STRENGTH_8MA,
                     GPIO_PIN_TYPE_STD);
    GPIODirModeSet(LCD_DC_BASE, LCD_DC_PIN, GPIO_DIR_MODE_OUT);
    GPIOPadConfigSet(LCD_DC_BASE, LCD_DC_PIN, GPIO_STRENGTH_8MA,
                     GPIO_PIN_TYPE_STD);
    GPIODirModeSet(LCD_CS_BASE, LCD_CS_PIN, GPIO_DIR_MODE_OUT);
    GPIOPadConfigSet(LCD_CS_BASE, LCD_CS_PIN, GPIO_STRENGTH_8MA,
                     GPIO_PIN_TYPE_STD);
    GPIODirModeSet(LCD_WR_BASE, LCD_WR_PIN, GPIO_DIR_MODE_OUT);
    GPIOPadConfigSet(LCD_WR_BASE, LCD_WR_PIN, GPIO_STRENGTH_8MA,
                     GPIO_PIN_TYPE_STD);
    GPIODirModeSet(LCD_RST_BASE, LCD_RST_PIN, GPIO_DIR_MODE_OUT);
    GPIOPadConfigSet(LCD_RST_BASE, LCD_RST_PIN, GPIO_STRENGTH_8MA,
                     GPIO_PIN_TYPE_STD);

    //
    // Set the LCD control pins to their default values.  This also asserts the
    // LCD reset signal.
    //
//    GPIOPinWrite(LCD_DATAH_BASE, LCD_DATAH_PINS, 0x00);
//    GPIOPinWrite(LCD_DC_BASE, LCD_DC_PIN, 0x00);
//    GPIOPinWrite(LCD_RD_BASE, LCD_RD_PIN, LCD_RD_PIN);
//    GPIOPinWrite(LCD_WR_BASE, LCD_WR_PIN, LCD_WR_PIN);
//    GPIOPinWrite(LCD_RST_BASE, LCD_RST_PIN, 0x00);

    GPIOPinWrite(LCD_DATAH_BASE, LCD_DATAH_PINS, 0x00);
    GPIOPinWrite(LCD_DC_BASE, LCD_DC_PIN, LCD_DC_PIN);
    GPIOPinWrite(LCD_CS_BASE, LCD_CS_PIN, LCD_CS_PIN);
    GPIOPinWrite(LCD_WR_BASE, LCD_WR_PIN, LCD_WR_PIN);


    GPIOPinWrite(LCD_RST_BASE, LCD_RST_PIN, 0);
	
    //
    // Delay for 1ms.
    //
    SysCtlDelay(ulClockMS);

    //
    // Deassert the LCD reset signal.
    //
    GPIOPinWrite(LCD_RST_BASE, LCD_RST_PIN, LCD_RST_PIN);

    //
    // Delay for 1ms while the LCD comes out of reset.
    //
    SysCtlDelay(ulClockMS);
}

//*****************************************************************************
//
//! Initializes the display driver.
//!
//! This function initializes the SSD2119 display controller on the panel,
//! preparing it to display data.
//!
//! \return None.
//
//*****************************************************************************
void
Kitronix320x240x16_SSD2119Init(void)
{
    unsigned long ulClockMS, ulCount;

    //
    // Get the current processor clock frequency.
    //
    ulClockMS = SysCtlClockGet() / (3 * 1000);

    //
    // Perform low level interface initialization depending upon how the LCD
    // is connected to the Stellaris microcontroller.  This varies depending
    // upon the daughter board connected it is possible that a daughter board
    // can drive the LCD directly rather than via the basic GPIO interface.
    //

	InitGPIOLCDInterface(ulClockMS);

	WriteCommand(SSD1963_SOFTWARE_RESET);						
	for(ulCount=0; ulCount<10; ulCount++) SysCtlDelay(ulClockMS);
	WriteCommand(SSD1963_SET_PLL); WriteData(0x01);	
	for(ulCount=0; ulCount<10; ulCount++) SysCtlDelay(ulClockMS);
	WriteCommand(SSD1963_SET_PLL); WriteData(0x03);	
	for(ulCount=0; ulCount<10; ulCount++) SysCtlDelay(ulClockMS);


	WriteCommand(SSD1963_SET_DISPLAY_MODE);
	WriteData(0x0C);
	WriteData(0x80);
	WriteData(0x01);
	WriteData(0x3F);
	WriteData(0x00);
	WriteData(0xEF);
	WriteData(0x00);

	WriteCommand(SSD1963_SET_PIXEL_DATA_INTERFACE); 
	WriteData(0x00);
	WriteCommand(SSD1963_SET_PIXEL_FORMAT); 
	WriteData(0x60);


	WriteCommand(SSD1963_SET_ADDRESS_MODE);
#ifdef LANDSCAPE_FLIP	 
	WriteData(0x01); 
#endif
#ifdef LANDSCAPE	 
	WriteData(0x02); 
#endif


	WriteCommand(SSD1963_SET_PLL_MN);
	WriteData(0x22);
	WriteData(0x03);
	WriteData(0x04);

	WriteCommand(SSD1963_SET_LSHIFT_FREQUENCY);	//PLL
	WriteData(0x01);	
	WriteData(0xE7);
	WriteData(0x4F);

	WriteCommand(SSD1963_SET_H_PERIOD);
	WriteData(0x01); 
	WriteData(0xB8);
	WriteData(0x00); 
	WriteData(0x44);
	WriteData(0x0F); 
	WriteData(0x00); 
	WriteData(0x00);
	WriteData(0x00); 

	WriteCommand(SSD1963_SET_V_PERIOD);
	WriteData(0x01); 	
	WriteData(0x08);
	WriteData(0x00); 	
	WriteData(0x13);
	WriteData(0x07); 	
	WriteData(0x00); 	
	WriteData(0x00);

	WriteCommand(SSD1963_SET_COLUMN_ADDRESS); 	
	WriteData(0x00); 	
	WriteData(0x00);
	WriteData(0x01); 	
	WriteData(0x3F);

	WriteCommand(SSD1963_SET_PAGE_ADDRESS); 	
	WriteData(0x00); 	
	WriteData(0x00);
	WriteData(0x00); 	
	WriteData(0xEF);


 	WriteCommand(SSD1963_DISPLAY_ON);
		
	{
	unsigned int i,j;
		WriteCommand(SSD1963_SET_COLUMN_ADDRESS);		 
		WriteData(0x00);			 
		WriteData(0x00);
		WriteData(LCD_HORIZONTAL_MAX>>8);		 
		WriteData(LCD_HORIZONTAL_MAX&0xFF);
	
		WriteCommand(SSD1963_SET_PAGE_ADDRESS);		 
		WriteData(0x00);			 
		WriteData(0x00);
		WriteData(LCD_VERTICAL_MAX>>8);			 
		WriteData(LCD_VERTICAL_MAX);

		WriteCommand(SSD1963_WRITE);
		for(j= 0; j<40; j++)
			for(i=0;i<8;i++) { WriteData(0x00); WriteData(0x00); WriteData(0x00); }
	
		for(j=0; j<238; j++)
		{
			WriteData(0x00); WriteData(0x00); WriteData(0x00);              
			for(i=0;i<159;i++)
			{
				WriteData(0x00); WriteData(0x00); WriteData(0x00);
				WriteData(0x00); WriteData(0x00); WriteData(0x00);
			}
			WriteData(0x00);
			WriteData(0x00);
			WriteData(0x00);
		}
	
	 	for(j=0; j<40; j++)
	   		for(i=0;i<8;i++) { WriteData(0x00); WriteData(0x00); WriteData(0x00); }
	}

}

//*****************************************************************************
//
//! Draws a pixel on the screen.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param lX is the X coordinate of the pixel.
//! \param lY is the Y coordinate of the pixel.
//! \param ulValue is the color of the pixel.
//!
//! This function sets the given pixel to a particular color.  The coordinates
//! of the pixel are assumed to be within the extents of the display.
//!
//! \return None.
//
//*****************************************************************************
static void
Kitronix320x240x16_SSD2119PixelDraw(void *pvDisplayData, long lX, long lY,
                                   unsigned long ulValue)
{
    //
    // Set the X address of the display cursor.
    //
//    WriteCommand(SSD2119_X_RAM_ADDR_REG);
//    WriteData(MAPPED_X(lX, lY));
	WriteCommand(SSD1963_SET_COLUMN_ADDRESS);		 
	WriteData((MAPPED_X(lX, lY)>>8));			 
	WriteData((MAPPED_X(lX, lY)&0xFF));
	WriteData(LCD_HORIZONTAL_MAX>>8);			 
	WriteData(LCD_HORIZONTAL_MAX&0xFF);

    //
    // Set the Y address of the display cursor.
    //
//    WriteCommand(SSD2119_Y_RAM_ADDR_REG);
//    WriteData(MAPPED_Y(lX, lY));
	WriteCommand(SSD1963_SET_PAGE_ADDRESS);
	WriteData((MAPPED_Y(lX, lY)>>8));			 
	WriteData((MAPPED_Y(lX, lY)&0xFF));
	WriteData(LCD_VERTICAL_MAX>>8);			 
	WriteData(LCD_VERTICAL_MAX);

    //
    // Write the pixel value.
    //
//    WriteCommand(SSD2119_RAM_DATA_REG);
//    WriteData(ulValue);
	WriteCommand(SSD1963_WRITE);
	WriteData((((ulValue&0xF800)>>9)<<1)&0xFC);  
	WriteData(((ulValue&0x07E0)>>3)&0xFC);	  
	WriteData(((ulValue&0x001F)<<3)&0xFC);
}

//*****************************************************************************
//
//! Draws a horizontal sequence of pixels on the screen.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param lX is the X coordinate of the first pixel.
//! \param lY is the Y coordinate of the first pixel.
//! \param lX0 is sub-pixel offset within the pixel data, which is valid for 1
//! or 4 bit per pixel formats.
//! \param lCount is the number of pixels to draw.
//! \param lBPP is the number of bits per pixel; must be 1, 4, or 8.
//! \param pucData is a pointer to the pixel data.  For 1 and 4 bit per pixel
//! formats, the most significant bit(s) represent the left-most pixel.
//! \param pucPalette is a pointer to the palette used to draw the pixels.
//!
//! This function draws a horizontal sequence of pixels on the screen, using
//! the supplied palette.  For 1 bit per pixel format, the palette contains
//! pre-translated colors; for 4 and 8 bit per pixel formats, the palette
//! contains 24-bit RGB values that must be translated before being written to
//! the display.
//!
//! \return None.
//
//*****************************************************************************
static void
Kitronix320x240x16_SSD2119PixelDrawMultiple(void *pvDisplayData, long lX,
                                           long lY, long lX0, long lCount,
                                           long lBPP,
                                           const unsigned char *pucData,
                                           const unsigned char *pucPalette)
{
    unsigned long ulByte;
    //
    // Set the cursor increment to left to right, followed by top to bottom.
    //
//    WriteCommand(SSD2119_ENTRY_MODE_REG);
//    WriteData(MAKE_ENTRY_MODE(HORIZ_DIRECTION));

    //
    // Set the starting X address of the display cursor.
    //
//    WriteCommand(SSD2119_X_RAM_ADDR_REG);
//    WriteData(MAPPED_X(lX, lY));
	WriteCommand(SSD1963_SET_COLUMN_ADDRESS);		 
	WriteData((MAPPED_X(lX, lY)>>8));			 
	WriteData((MAPPED_X(lX, lY)&0xFF));
	WriteData(LCD_HORIZONTAL_MAX>>8);			 
	WriteData(LCD_HORIZONTAL_MAX&0xFF);

    //
    // Set the Y address of the display cursor.
    //
//    WriteCommand(SSD2119_Y_RAM_ADDR_REG);
//    WriteData(MAPPED_Y(lX, lY));
	WriteCommand(SSD1963_SET_PAGE_ADDRESS);
	WriteData((MAPPED_Y(lX, lY)>>8));			 
	WriteData((MAPPED_Y(lX, lY)&0xFF));
	WriteData(LCD_VERTICAL_MAX>>8);			 
	WriteData(LCD_VERTICAL_MAX);

    //
    // Write the data RAM write command.
    //
//    WriteCommand(SSD2119_RAM_DATA_REG);
	WriteCommand(SSD1963_WRITE);

    //
    // Determine how to interpret the pixel data based on the number of bits
    // per pixel.
    //
    switch(lBPP)
    {
        //
        // The pixel data is in 1 bit per pixel format.
        //
        case 1:
        {
            //
            // Loop while there are more pixels to draw.
            //
            while(lCount)
            {
                //
                // Get the next byte of image data.
                //
                ulByte = *pucData++;

                //
                // Loop through the pixels in this byte of image data.
                //
                for(; (lX0 < 8) && lCount; lX0++, lCount--)
                {
				unsigned short wData;
                    //
                    // Draw this pixel in the appropriate color.
                    //
//                    WriteData(((unsigned long *)pucPalette)[(ulByte >>
//                                                             (7 - lX0)) & 1]);
					wData=((unsigned long *)pucPalette)[(ulByte >> (7 - lX0)) & 1];
					WriteData((((wData&0xF800)>>9)<<1)&0xFC);  
					WriteData(((wData&0x07E0)>>3)&0xFC);	  
					WriteData(((wData&0x001F)<<3)&0xFC);
                }

                //
                // Start at the beginning of the next byte of image data.
                //
                lX0 = 0;
            }

            //
            // The image data has been drawn.
            //
            break;
        }

        //
        // The pixel data is in 4 bit per pixel format.
        //
        case 4:
        {
            //
            // Loop while there are more pixels to draw.  "Duff's device" is
            // used to jump into the middle of the loop if the first nibble of
            // the pixel data should not be used.  Duff's device makes use of
            // the fact that a case statement is legal anywhere within a
            // sub-block of a switch statement.  See
            // http://en.wikipedia.org/wiki/Duff's_device for detailed
            // information about Duff's device.
            //
            switch(lX0 & 1)
            {
                case 0:
                    while(lCount)
                    {
                        //
                        // Get the upper nibble of the next byte of pixel data
                        // and extract the corresponding entry from the
                        // palette.
                        //
                        ulByte = (*pucData >> 4) * 3;
                        ulByte = (*(unsigned long *)(pucPalette + ulByte) &
                                  0x00ffffff);

                        //
                        // Translate this palette entry and write it to the
                        // screen.
                        //
//                        WriteData(DPYCOLORTRANSLATE(ulByte));

						WriteData((ulByte>>16)&0xFC);
						WriteData((ulByte>>8)&0xFC);
						WriteData((ulByte&0xFF)&0xFC);

                        //
                        // Decrement the count of pixels to draw.
                        //
                        lCount--;

                        //
                        // See if there is another pixel to draw.
                        //
                        if(lCount)
                        {
                case 1:
                            //
                            // Get the lower nibble of the next byte of pixel
                            // data and extract the corresponding entry from
                            // the palette.
                            //
                            ulByte = (*pucData++ & 15) * 3;
                            ulByte = (*(unsigned long *)(pucPalette + ulByte) &
                                      0x00ffffff);

                            //
                            // Translate this palette entry and write it to the
                            // screen.
                            //
//                            WriteData(DPYCOLORTRANSLATE(ulByte));

							WriteData((ulByte>>16)&0xFC);
							WriteData((ulByte>>8)&0xFC);
							WriteData((ulByte&0xFF)&0xFC);

                            //
                            // Decrement the count of pixels to draw.
                            //
                            lCount--;
                        }
                    }
            }

            //
            // The image data has been drawn.
            //
            break;
        }

        //
        // The pixel data is in 8 bit per pixel format.
        //
        case 8:
        {
            //
            // Loop while there are more pixels to draw.
            //

			
            while(lCount--)
            {
                //
                // Get the next byte of pixel data and extract the
                // corresponding entry from the palette.
                //
                ulByte = *pucData++ * 3;
                ulByte = *(unsigned long *)(pucPalette + ulByte) & 0x00ffffff;

                //
                // Translate this palette entry and write it to the screen.
                //
//                WriteData(DPYCOLORTRANSLATE(ulByte));

				WriteData((ulByte>>16)&0xFC);
				WriteData((ulByte>>8)&0xFC);
				WriteData((ulByte&0xFF)&0xFC);

            }

            //
            // The image data has been drawn.
            //
            break;
        }

        //
        // We are being passed data in the display's native format.  Merely
        // write it directly to the display.  This is a special case which is
        // not used by the graphics library but which is helpful to
        // applications which may want to handle, for example, JPEG images.
        //
        case 16:
        {
            unsigned short usByte;

            //
            // Loop while there are more pixels to draw.
            //
            while(lCount--)
            {
                //
                // Get the next byte of pixel data and extract the
                // corresponding entry from the palette.
                //
                usByte = *((unsigned short *)pucData);
                pucData += 2;

                //
                // Translate this palette entry and write it to the screen.
                //
//                WriteData(usByte);
				WriteData((((usByte&0xF800)>>9)<<1)&0xFC);  
				WriteData(((usByte&0x07E0)>>3)&0xFC);	  
				WriteData(((usByte&0x001F)<<3)&0xFC);
            }
        }
    }
}

//*****************************************************************************
//
//! Draws a horizontal line.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param lX1 is the X coordinate of the start of the line.
//! \param lX2 is the X coordinate of the end of the line.
//! \param lY is the Y coordinate of the line.
//! \param ulValue is the color of the line.
//!
//! This function draws a horizontal line on the display.  The coordinates of
//! the line are assumed to be within the extents of the display.
//!
//! \return None.
//
//*****************************************************************************
static void
Kitronix320x240x16_SSD2119LineDrawH(void *pvDisplayData, long lX1, long lX2,
                                   long lY, unsigned long ulValue)
{
    //
    // Set the cursor increment to left to right, followed by top to bottom.
    //
//    WriteCommand(SSD2119_ENTRY_MODE_REG);
//    WriteData(MAKE_ENTRY_MODE(HORIZ_DIRECTION));

    //
    // Set the starting X address of the display cursor.
    //
//    WriteCommand(SSD2119_X_RAM_ADDR_REG);
//    WriteData(MAPPED_X(lX1, lY));
	WriteCommand(SSD1963_SET_COLUMN_ADDRESS);		 
	WriteData((MAPPED_X(lX1, lY)>>8));			 
	WriteData((MAPPED_X(lX1, lY)&0xFF));
	WriteData(LCD_HORIZONTAL_MAX>>8);			 
	WriteData(LCD_HORIZONTAL_MAX&0xFF);

    //
    // Set the Y address of the display cursor.
    //
//    WriteCommand(SSD2119_Y_RAM_ADDR_REG);
//    WriteData(MAPPED_Y(lX1, lY));
	WriteCommand(SSD1963_SET_PAGE_ADDRESS);
	WriteData((MAPPED_Y(lX1, lY)>>8));			 
	WriteData((MAPPED_Y(lX1, lY)&0xFF));
	WriteData(LCD_VERTICAL_MAX>>8);			 
	WriteData(LCD_VERTICAL_MAX);

    //
    // Write the data RAM write command.
    //
//    WriteCommand(SSD2119_RAM_DATA_REG);
	WriteCommand(SSD1963_WRITE);

    //
    // Loop through the pixels of this horizontal line.
    //
    while(lX1++ <= lX2)
    {
        //
        // Write the pixel value.
        //
//        WriteData(ulValue);
		WriteData((((ulValue&0xF800)>>9)<<1)&0xFC);  
		WriteData(((ulValue&0x07E0)>>3)&0xFC);	  
		WriteData(((ulValue&0x001F)<<3)&0xFC);
    }
}

//*****************************************************************************
//
//! Draws a vertical line.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param lX is the X coordinate of the line.
//! \param lY1 is the Y coordinate of the start of the line.
//! \param lY2 is the Y coordinate of the end of the line.
//! \param ulValue is the color of the line.
//!
//! This function draws a vertical line on the display.  The coordinates of the
//! line are assumed to be within the extents of the display.
//!
//! \return None.
//
//*****************************************************************************
static void
Kitronix320x240x16_SSD2119LineDrawV(void *pvDisplayData, long lX, long lY1,
                                   long lY2, unsigned long ulValue)
{
    //
    // Set the cursor increment to top to bottom, followed by left to right.
    //
//    WriteCommand(SSD2119_ENTRY_MODE_REG);
//    WriteData(MAKE_ENTRY_MODE(VERT_DIRECTION));

    //
    // Set the X address of the display cursor.
    //
//    WriteCommand(SSD2119_X_RAM_ADDR_REG);
//    WriteData(MAPPED_X(lX, lY1));
	WriteCommand(SSD1963_SET_COLUMN_ADDRESS);
	WriteData((MAPPED_X(lX, lY1)>>8));			 
	WriteData((MAPPED_X(lX, lY1)&0xFF));  
	WriteData((MAPPED_X(lX, lY1)>>8));			 
	WriteData((MAPPED_X(lX, lY1)&0xFF));  


    //
    // Set the starting Y address of the display cursor.
    //
//    WriteCommand(SSD2119_Y_RAM_ADDR_REG);
//    WriteData(MAPPED_Y(lX, lY1));
	WriteCommand(SSD1963_SET_PAGE_ADDRESS);
	WriteData((MAPPED_Y(lX, lY1)>>8));			 
	WriteData((MAPPED_Y(lX, lY1)&0xFF));
	WriteData(LCD_VERTICAL_MAX>>8);			 
	WriteData(LCD_VERTICAL_MAX);

    //
    // Write the data RAM write command.
    //
//    WriteCommand(SSD2119_RAM_DATA_REG);
	WriteCommand(SSD1963_WRITE);

    //
    // Loop through the pixels of this vertical line.
    //
    while(lY1++ <= lY2)
    {
        //
        // Write the pixel value.
        //
//        WriteData(ulValue);
		WriteData((((ulValue&0xF800)>>9)<<1)&0xFC);  
		WriteData(((ulValue&0x07E0)>>3)&0xFC);	  
		WriteData(((ulValue&0x001F)<<3)&0xFC);
    }
}

//*****************************************************************************
//
//! Fills a rectangle.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param pRect is a pointer to the structure describing the rectangle.
//! \param ulValue is the color of the rectangle.
//!
//! This function fills a rectangle on the display.  The coordinates of the
//! rectangle are assumed to be within the extents of the display, and the
//! rectangle specification is fully inclusive (in other words, both sXMin and
//! sXMax are drawn, along with sYMin and sYMax).
//!
//! \return None.
//
//*****************************************************************************
static void
Kitronix320x240x16_SSD2119RectFill(void *pvDisplayData, const tRectangle *pRect,
                                  unsigned long ulValue)
{
    long lCount;

    //
    // Write the Y extents of the rectangle.
    //
//    WriteCommand(SSD2119_ENTRY_MODE_REG);
//    WriteData(MAKE_ENTRY_MODE(HORIZ_DIRECTION));

    //
    // Write the X extents of the rectangle.
    //
//    WriteCommand(SSD2119_H_RAM_START_REG);


#if (defined PORTRAIT) || (defined LANDSCAPE)
//    WriteData(MAPPED_X(pRect->sXMax, pRect->sYMax));  
#else
//    WriteData(MAPPED_X(pRect->sXMin, pRect->sYMin));   
#endif

//    WriteCommand(SSD2119_H_RAM_END_REG);	 
#if (defined PORTRAIT) || (defined LANDSCAPE)
//    WriteData(MAPPED_X(pRect->sXMin, pRect->sYMin));  
#else
//    WriteData(MAPPED_X(pRect->sXMax, pRect->sYMax));  
#endif

    //
    // Write the Y extents of the rectangle
    //
//    WriteCommand(SSD2119_V_RAM_POS_REG);
#if (defined LANDSCAPE_FLIP) || (defined PORTRAIT)
//    WriteData(MAPPED_Y(pRect->sXMin, pRect->sYMin) |
//             (MAPPED_Y(pRect->sXMax, pRect->sYMax) << 8));	   
#else
//    WriteData(MAPPED_Y(pRect->sXMax, pRect->sYMax) |
//             (MAPPED_Y(pRect->sXMin, pRect->sYMin) << 8));	 
#endif

    //
    // Set the display cursor to the upper left of the rectangle (in application
    // coordinate space).
    //
//    WriteCommand(SSD2119_X_RAM_ADDR_REG);
//    WriteData(MAPPED_X(pRect->sXMin, pRect->sYMin));

//    WriteCommand(SSD2119_Y_RAM_ADDR_REG);
//    WriteData(MAPPED_Y(pRect->sXMin, pRect->sYMin));

    //
    // Tell the controller we are about to write data into its RAM.
    //
//    WriteCommand(SSD2119_RAM_DATA_REG);

	WriteCommand(SSD1963_SET_COLUMN_ADDRESS);
	WriteData((MAPPED_X(pRect->sXMin, pRect->sYMin)>>8));			 
	WriteData((MAPPED_X(pRect->sXMin, pRect->sYMin)&0xFF));
	WriteData((MAPPED_X(pRect->sXMax, pRect->sYMax)>>8));			 
	WriteData((MAPPED_X(pRect->sXMax, pRect->sYMax)&0xFF));	

	WriteCommand(SSD1963_SET_PAGE_ADDRESS);
	WriteData((MAPPED_Y(pRect->sXMin, pRect->sYMin)>>8));			 
	WriteData((MAPPED_Y(pRect->sXMin, pRect->sYMin)&0xFF));
	WriteData((MAPPED_Y(pRect->sXMax, pRect->sYMax)>>8));			 
	WriteData((MAPPED_Y(pRect->sXMax, pRect->sYMax)&0xFF));


	WriteCommand(SSD1963_WRITE);
    //
    // Loop through the pixels of this filled rectangle.
    //
    for(lCount = ((pRect->sXMax - pRect->sXMin + 1) *
                  (pRect->sYMax - pRect->sYMin + 1)); lCount >= 0; lCount--)
    {
        //
        // Write the pixel value.
        //
//        WriteData(ulValue);	
		WriteData((((ulValue&0xF800)>>9)<<1)&0xFC);  
		WriteData(((ulValue&0x07E0)>>3)&0xFC);	  
		WriteData(((ulValue&0x001F)<<3)&0xFC);
    }

    //
    // Reset the X extents to the entire screen.
    //
//    WriteCommand(SSD2119_H_RAM_START_REG);
//    WriteData(0x0000);
//    WriteCommand(SSD2119_H_RAM_END_REG);
//    WriteData(0x013F);

    //
    // Reset the Y extent to the full screen
    //
//    WriteCommand(SSD2119_V_RAM_POS_REG);
//    WriteData(0xEF00);

}

//*****************************************************************************
//
//! Translates a 24-bit RGB color to a display driver-specific color.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param ulValue is the 24-bit RGB color.  The least-significant byte is the
//! blue channel, the next byte is the green channel, and the third byte is the
//! red channel.
//!
//! This function translates a 24-bit RGB color into a value that can be
//! written into the display's frame buffer in order to reproduce that color,
//! or the closest possible approximation of that color.
//!
//! \return Returns the display-driver specific color.
//
//*****************************************************************************
static unsigned long
Kitronix320x240x16_SSD2119ColorTranslate(void *pvDisplayData,
                                        unsigned long ulValue)
{
    //
    // Translate from a 24-bit RGB color to a 5-6-5 RGB color.
    //
    return(DPYCOLORTRANSLATE(ulValue));
}

//*****************************************************************************
//
//! Flushes any cached drawing operations.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//!
//! This functions flushes any cached drawing operations to the display.  This
//! is useful when a local frame buffer is used for drawing operations, and the
//! flush would copy the local frame buffer to the display.  For the SSD2119
//! driver, the flush is a no operation.
//!
//! \return None.
//
//*****************************************************************************
static void
Kitronix320x240x16_SSD2119Flush(void *pvDisplayData)
{
    //
    // There is nothing to be done.
    //
}

//*****************************************************************************
//
//! The display structure that describes the driver for the Kitronix
//! K350QVG-V1-F TFT panel with an SSD2119 controller.
//
//*****************************************************************************
const tDisplay g_sKitronix320x240x16_SSD2119 =
{
    sizeof(tDisplay),
    0,
#if defined(PORTRAIT) || defined(PORTRAIT_FLIP)
    240,
    320,
#else
    320,
    240,
#endif
    Kitronix320x240x16_SSD2119PixelDraw,
    Kitronix320x240x16_SSD2119PixelDrawMultiple,
    Kitronix320x240x16_SSD2119LineDrawH,
    Kitronix320x240x16_SSD2119LineDrawV,
    Kitronix320x240x16_SSD2119RectFill,
    Kitronix320x240x16_SSD2119ColorTranslate,
    Kitronix320x240x16_SSD2119Flush
};


h dosyası

#ifndef __KITRONIX320X240X16_SSD2119_8BIT_H__
#define __KITRONIX320X240X16_SSD2119_8BIT_H__

//*****************************************************************************
//
// Bit definitions for the LCD control registers in the SRAM/Flash daughter
// board.
//
//*****************************************************************************
#define LCD_CONTROL_NRESET    0x04
#define LCD_CONTROL_YN        0x02
#define LCD_CONTROL_XN        0x01

//*****************************************************************************
//
// EPI addresses used to access the LCD when the SRAM/Flash daughter board is
// installed.
//
//*****************************************************************************
#define LCD_COMMAND_PORT    0x6C000002
#define LCD_DATA_PORT       0x6C000003
#define LCD_CONTROL_SET_REG 0x6C000000
#define LCD_CONTROL_CLR_REG 0x6C000001

//
// Read start bit.  This is ORed with LCD_COMMAND_PORT or LCD_DATA_PORT to
// initiate a read request from the LCD controller.
//
//#define LCD_READ_START      0x00000004

//*****************************************************************************
//
// EPI addresses used to access the LCD when the FPGA/Camera/LCD daughter
// board is installed.
//
//*****************************************************************************
#define LCD_FPGA_COMMAND_PORT    0xA0000014
#define LCD_FPGA_DATA_PORT       0xA0000016
#define LCD_FPGA_CONTROL_SET_REG 0xA0000010
#define LCD_FPGA_CONTROL_CLR_REG 0xA0000012

//*****************************************************************************
//
// Prototypes for the globals exported by this driver.
//
//*****************************************************************************
extern void Kitronix320x240x16_SSD2119Init(void);
extern const tDisplay g_sKitronix320x240x16_SSD2119;
extern void Kitronix320x240x16_SSD2119SetLCDControl(unsigned char ucMask,
                                                    unsigned char ucVal);

#endif // __KITRONIX320X240X16_SSD2119_H__
https://donanimveyazilim.wordpress.com || Cihân-ârâ cihân içredir ârâyı bilmezler, O mâhîler ki deryâ içredir deryâyı bilmezler ||

OptimusPrime

kendi kullandığı foksiyon isimlerini değiştirmedim istersen sen değiştirebilirsin...
https://donanimveyazilim.wordpress.com || Cihân-ârâ cihân içredir ârâyı bilmezler, O mâhîler ki deryâ içredir deryâyı bilmezler ||

yamak

Teşekkür ederim dostum dönüştürücü devreyi bitirdikten sonra deneyecem kütüphaneyi.