Building The Hal Library For The Target Example; Building A Complete Application For The Target Example - Epson S1D13505 Technical Manual

Embedded ramdac lcd/crt controller
Table of Contents

Advertisement

Page 80

11.6.2 Building the HAL library for the target example

11.6.3 Building a complete application for the target example

#include <stdio.h>
#include "Hal.h"
#include "Appcfg.h"
#include "Hal_regs.h"
int main(void);
#define RED16BPP
#define GREEN16BPP 0x07e0
#define BLUE16BPP
int main(void)
{
int DevId;
UINT height, width, Bpp;
const char *p1, *p2, *p3;
DWORD color_red, color_blue;
BYTE RedBlueLut[3][3] = {
};
BOOL verbose = TRUE;
long x1, x2, y1, y2;
/*
** Call this to get hal.c linked into the image, and HalInfoArray
** which is defined in hal.c and used by other HAL pieces.
*/
seGetHalVersion( &p1, &p2, &p3 );
printf("1355 Hal version %s\n", p1);
/*
** Register the device with the HAL
** NOTE: HalInfo is an instance of HAL_STRUCT and is defined
** in Appcfg.h
*/
if (seRegisterDevice(&HalInfo, &DevId) != ERR_OK)
S1D13505
X23A-G-003-07
Building the HAL for the target example is less complex because the code is written in C
and requires little platform specific adjustment. The nmake makefile for our example is
makesh3.mk.This makefile contains the rules for building sh3 objects, the files list for the
library and the library creation rules. The Gnu compiler tools are pointed to by TOOLDIR.
With nmake in your path run:
nmake -fmakesh3.mk
The following source code is available on the Epson Electronics America Website at
http://www.eea.epson.com.
0xf800
0x001f
{0, 0, 0},
{0xF0, 0, 0},
{0, 0, 0xF0}
Epson Research and Development
Vancouver Design Center
/* Black */
/* Red */
/* Blue */
Programming Notes and Examples
Issue Date: 01/02/05

Advertisement

Table of Contents
loading

Table of Contents