English
Language : 

SED1354 Datasheet, PDF (194/472 Pages) Epson Company – Color Graphics LCD/CRT Controller
Page 54
Epson Research and Development
Vancouver Design Center
9 Sample Code
9.1 Introduction
The following code samples demonstrate two approaches to initializing the SED1354 color graphics
controller with/without using the 1354HAL API. These code samples are for example purposes only.
9.1.1 Sample code using 1354HAL API
/*
**-------------------------------------------------------------------------
**
** Created 1998, Epson Research & Development
**
Vancouver Design Centre
** Copyright (c) 1998 Epson Research and Development, Inc.
** All rights reserved.
**
**-------------------------------------------------------------------------
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "hal.h"
#include "appcfg.h"
/*--------------------------------------------------------------------------*/
void main(void)
{
BYTE ChipId;
int Device;
switch (seRegisterDevice(&Cfg.DeviceInfo[0], &Cfg.DeviceChip, &Device))
{
case ERR_OK:
break;
case HAL_DEVICE_ERR:
printf("ERROR: Too many devices registered.\n");
exit(1);
default:
printf("ERROR: Could not register SED1354 device.\n");
exit(1);
}
seGetId(Device, &ChipId);
SED1354
X19A-G-002-06
Programming Notes and Examples
Issue Date: 98/10/28