Car DVD API User Manual V0.2 Feb 03, 2008

Similar documents
Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

SPHE8202R Design Guide Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provi

PCM-3386用户手册.doc

bingdian001.com

Windows RTEMS 1 Danilliu MMI TCP/IP QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos eco

T stg -40 to 125 C V cc 3.8V V dc RH 0 to 100 %RH T a -40 to +125 C -0.3 to 3.6V V -0.3 to VDD+0.3 V -10 to +10 ma = 25 = 3V) VDD

TX-NR3030_BAS_Cs_ indd

Microsoft Word - LR1122B-B.doc

1. 請 先 檢 查 包 裝 內 容 物 AC750 多 模 式 無 線 分 享 器 安 裝 指 南 安 裝 指 南 CD 光 碟 BR-6208AC 電 源 供 應 器 網 路 線 2. 將 設 備 接 上 電 源, 即 可 使 用 智 慧 型 無 線 裝 置 進 行 設 定 A. 接 上 電 源

Microsoft Word - Atmel-45136A-Pick-Best-Microcontroller-Strom-Eiland-Flodell_Article_CS

Bus Hound 5

P4i45GL_GV-R50-CN.p65

JLX

untitled

AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING

PTS7_Manual.PDF

CC213

ICD ICD ICD ICD ICD

CANVIO_AEROCAST_CS_EN.indd

目 录 目 录 1. 安 装 和 快 速 入 门 附 件 1.1 随 机 附 件 附 件 信 息... 3 连 接 和 设 定 1.3 连 接 记 录 纸... 4 快 速 入 门 1.5 发 送 传 真 / 复 印 接 收 传 真

LH_Series_Rev2014.pdf

Xear 3D USB CH-IN-2 SPKs 2 6 :

Tel:

Microsoft Word - Functional_Notes_3.90_CN.doc

Logitech Wireless Combo MK45 English

Applied Biosystems StepOne™ Real-Time PCR System Quick Reference Card for Installation

CHN_p000A_Cover.ai

1.ai

中文手册

8idml_20_1_q

01CP-WX3030WNetc_CO_ENG.indd

User’s Manual


概述

68369 (ppp quickstart guide)

Microsoft PowerPoint - ATF2015.ppt [相容模式]

Epson

C/C++ - 文件IO

Microsoft Word - MSP430 Launchpad 指导书.docx

关 于 瓶 装 水, 你 不 得 不 知 的 8 件 事 情 关 于 瓶 装 水, 你 不 得 不 知 的 8 件 事 情 1 水 质 : 瓶 装 的, 不 一 定 就 是 更 好 的 2 生 产 : 监 管 缺 位, 消 费 者 暴 露 于 风 险 之 中 人 们 往 往 假 定 瓶 装 水 是

操作指导手册

User ID 150 Password - User ID 150 Password Mon- Cam-- Invalid Terminal Mode No User Terminal Mode No User Mon- Cam-- 2

untitled

员工签到录

c-AR64SH-102

Model P53 pH-ORP Analyzer CH.doc

行业

1 TPIS TPIS 2 2

ch_code_infoaccess

V6800/V6600 3D

2 12

060522達文西密碼_全_.PDF

AP128DG-H AP128DG-H 3 13 ATiRADEON TM Win 98/98SE, WinME Win XP Direct X

Go构建日请求千亿微服务最佳实践的副本

目录

Simulator By SunLingxi 2003

CD DX Onkyo CD CD Cs

Contents

Microsoft Word - MTK平台生产软件使用说明.doc

CDWA Mapping. 22 Dublin Core Mapping

2782_OME_KM_Cover.qxd

lan03_yen

(Guangzhou) AIT Co, Ltd V 110V [ ]! 2

audiogram3 Owners Manual

P4VM800_BIOS_CN.p65

SDP

Tel: Fax: TTP-344M/246M /

Microsoft Word - 山西焦化(600740)--焦炭价格上涨提升业绩,市场整合带来机会 doc

P4V88+_BIOS_CN.p65

C语言的应用.PDF

行业

USB解决方案.ppt

2_dvdr3380_97_CT_21221b.indd

untitled

K7VT2_QIG_v3

C/C++ - 函数

r_09hr_practical_guide_kor.pdf

untitled

摘 要 文 德 甲 新 村 (Kampung Suria Mentakab), 位 于 彭 亨 中 部, 属 于 淡 馬 魯 市 所 管 辖 她 距 离 淡 马 鲁 市 区 约 11 公 里, 而 距 离 而 连 突 大 约 50 公 里 文 德 甲 新 村 路 口 外 就 是 文 德 甲 市 区,

VX2753mh-LED-1_UG_KRN.book

<4D F736F F D20C4CFBEA9D0C2B0D9A3A A3A9A3BAC7C9BDB3BFAAB3F6BAC3D3F1C0B4A3ACB9D8D7A2D2B5CEF1BDE1B9B9B5F7D5FBA3BBCDB6D7CAC6C0BCB6A1B0BDF7C9F7CDC6BCF6A1B12E646F63>

Table of Contents Design Concept 03 Copyrights & TradeMark 04 Special Notice 05 Notice to concerned 05 Installation and Registration Introduction 07 s

Java

Contents

KDC-U5049 KDC-U4049 Made for ipod, and Made for iphone mean that an electronic accessory has been designed to connect specifically to ipod, or iphone,

IP505SM_manual_cn.doc

untitled

Chapter 2 GIGA-BYTE TECHNOLOGY CO., LTD. ("GBT") GBT GBT GBT

SA-DK2-U3Rユーザーズマニュアル

GH1220 Hall Switch

行业

AL-M200 Series

untitled

Leica S S 2

Huawei Technologies Co

LSC操作说明

untitled

Serial ATA ( Silicon Image SiI3114)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 5 (4) S A T A... 8 (5) S A T A... 10

Transcription:

Car DVD API User Manual V0.2 Feb 03, 2008

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLOGY CO. is believed to be accurate and reliable. However, SUNPLUS TECHNOLOGY CO. makes no warranty for any errors which may appear in this document. Contact SUNPLUS TECHNOLOGY CO. to obtain the latest version of device specifications before placing your order. No responsibility is assumed by SUNPLUS TECHNOLOGY CO. for any infringement of patent or other rights of third parties which may result from its use. In addition, SUNPLUS products are not authorized for use as critical components in life support systems or aviation systems, where a malfunction or failure of the product may reasonably be expected to result in significant injury to the user, without the express written approval of Sunplus. Sunplus Technology Co., Ltd. PAGE 2 V0.2 Feb 03, 2008

Revision History Revision Date By Remark Page Number(s) V 0.1 2007/12/07 Guibiao.zhou First Edition 37 V0.2 2008/02/03 Ai Subin Modify format 34 Sunplus Technology Co., Ltd. PAGE 3 V0.2 Feb 03, 2008

Table of Content PAGE 1 IIC API...6 1.1 I2C introduction...6 1.2 WriteToI2c...7 1.3 ReadFromI2c...8 1.4 WriteToI2cPageMode...9 1.5 ReadFromI2cPageMode...9 1.6 WriteToI2cA0...10 1.7 ReadFromI2cA0...10 2 UART API...11 2.1 regs0->uart0_data...11 2.2 regs0->uart0_lsr...11 2.3 UART0_set_baudrate...12 2.4 write_uart0...12 2.5 IO_PUTC_WAIT...13 2.6 uart_io_write_wait...13 2.7 is_uart0_fifo_full...14 2.8 is_uart0_fifo_empty...14 2.9 reset_uart0_fifo...15 2.10 write_uart0_exact...15 2.11 io_write_wait...15 2.12 io_getc...16 2.13 io_write_flush...16 3 Interrupt...16 3.1 Time Interrupt...16 3.1.1 init_timer... 16 3.1.2 intr_timer1... 17 3.2 UART Interrupt...19 4 Time Delay...19 4.1 delay...19 4.2 delay_1ms...19 4.3 delay_1us...20 4.4 delay_srv_10ms...20 5 Watchdog...21 Sunplus Technology Co., Ltd. PAGE 4 V0.2 Feb 03, 2008

5.1 watchdog_onoff...21 5.2 watchdog_renew...22 5.3 dsp_watchdog...22 6 GPIO...23 6.1 8202T GPIO...23 6.2 GPIO...24 6.3 reset_gpio...26 7 VFD...26 7.1 VFD...26 7.2 update_vfd_data...27 7.3 polling_vfdr...28 7.4 vfd_set_str...29 7.5...29 7.6 VFD...30 8 VIDEO CONTROL...31 8.1 TV DAC output table...31 8.2 tv_dacoff...31 8.3 tv_dachalf...32 8.4 tv_setup_aspect...33 8.5 CCIR656...34 Sunplus Technology Co., Ltd. PAGE 5 V0.2 Feb 03, 2008

1 IIC API 1.1 I2C introduction Sunplus Technology Co., Ltd. PAGE 6 V0.2 Feb 03, 2008

1.2 WriteToI2c WriteToI2c(int ideviceaddr,int iaddr,byte *bdata,int len) Write n byte data to I2C memory/device on BYTE mode ideviceaddr : device address 24C02 0xA0 iaddr destination address *bdata the input data stream len the write data lenght return -1: write error return 1: write success WriteToI2cA0 Example: 1 void WriteToI2cA0(int iaddr,byte *bdata,uint32 len) #if (!defined(disc_id_in_flash))&&(!defined(setup_in_flash))//zxb 061019 if( WriteToI2c(0xa0,iAddr,bData,len) < 0 ) //write fail printf("!!!! ======== write flash error ========!!!!!\n"); #else Comment: 0xA0 24C02 iaddr, CDROM_INFO_BASE bdata bdata len 24C02 iaddr Sunplus Technology Co., Ltd. PAGE 7 V0.2 Feb 03, 2008

1.3 ReadFromI2c Int ReadFromI2c(int ideviceaddr,int iaddr,byte *bbuffer,int len) Read data from I2Cmemory/device on BYTE mode device iaddr len Byte bdata ideviceaddr : device address 24C02 0xA0 iaddr destination address len the read data lenght *bdata the read data stream return -1: write error return 1: write success 1 void ReadFromI2cA0(UINT16 iaddr,byte *bbuffer,uint16 len) #if!defined(disc_id_in_flash) &&!defined(setup_in_flash)//zxb 061019 memset(bbuffer,0,len); if(readfromi2c(0xa0, iaddr,bbuffer, len) >=0 ) //sucess printf("read flash data:\n"); //print_block(bbuffer,len); else printf("read flash error\n"); #else//#ifndef DISC_ID_IN_FLASH Comment: Sunplus Technology Co., Ltd. PAGE 8 V0.2 Feb 03, 2008

24C02 iaddr len bbuffer 1.4 WriteToI2cPageMode void WriteToI2cPageMode(int ideviceaddr,int iaddr,byte *bdata,int len) Write len byte data to I2C memory/device on page mode ideviceaddr : device address 24C02 0xA0 iaddr destination address device *bdata the input data stream len the write data lenght return -1: write error return 1: write success WriteToI2cPageMode WriteToI2c page page 8 Byte device WriteToI2c 1.5 ReadFromI2cPageMode void ReadFromI2cPageMode(int ideviceaddr,int iaddr,byte *bdata,int len) Read len byte data to I2C memory/device on page mode ideviceaddr : device address 24C02 0xA0 iaddr destination address device *bdata the input data stream len the read data lenght return -1: write error return 1: write success Sunplus Technology Co., Ltd. PAGE 9 V0.2 Feb 03, 2008

1.6 WriteToI2cA0 Void WriteToI2cA0(int iaddr,byte *bdata,uint32 len) Write len byte data to 24C02/FLASH on BYTE mode iaddr destination address 24C02/FLASH *bdata the input data stream len the write data lenght WriteToI2c WriteToNVMEM 1 WriteToI2cA0(CDROM_INFO_BASE,(BYTE *)&resume_fsnav_dir, sizeof(resume_fsnav_dir)); Comment: 1.7 ReadFromI2cA0 void ReadFromI2cA0(UINT16 iaddr,byte *bbuffer,uint16 len) Read len byte data from 24C02/FLASH on BYTE mode iaddr destination address 24C02/FLASH len the read data lenght *bdata the read data stream ReadFromI2c ReadFromNVMEM Sunplus Technology Co., Ltd. PAGE 10 V0.2 Feb 03, 2008

2 UART API UART UART0 UART1, UART UART0 UART0 2.1 regs0->uart0_data uart uart 1 #define EPP_GETC() (regs0->uart0_data) Int c; c = MON_GETC(); Comment: UART c 2.2 regs0->uart0_lsr uart0 uart0 ready empty #define UART_LSR_TX_RDY (1<<0) #define UART_LSR_RX_RDY (1<<1) #define UART_TX_EMPTY (1<<6) #define UART_RX_EMPTY (1<<7) #define UART0_tx_rdy() (regs0->uart0_lsr & UART_LSR_TX_RDY) regs0->uart0_data #define UART0_rx_rdy() (regs0->uart0_lsr & UART_LSR_RX_RDY) #define UART0_tx_empty() (regs0->uart0_lsr & UART_TX_EMPTY) tx buffer empty Sunplus Technology Co., Ltd. PAGE 11 V0.2 Feb 03, 2008

2.3 UART0_set_baudrate UART0_set_baudrate(X) Set baudrate of uart0 X:baudrate 1 UART0_set_baudrate(BAUDCC(BAUDRATE_DEFAULT, 108000000)); Comment: 2.4 write_uart0 void write_uart0(int c) uart_buf uart0_data c none none IO_PUTC_WAIT 1 UartTxd.h (h) #define UART_PUTC(c) (write_uart0(c)) UART_PUTC(c) c 2 uarttxd.c void putdec(char c) if (c >= 100) UART_PUTC(hex2asc(c / 100)); c = c % 100; if (c >= 10) UART_PUTC(hex2asc(c / 10)); Sunplus Technology Co., Ltd. PAGE 12 V0.2 Feb 03, 2008

c = c % 10; else UART_PUTC('0'); UART_PUTC(hex2asc(c)); 2.5 IO_PUTC_WAIT IO_PUTC_WAIT(c) uart uart fifo buffer (1) void uart_io_write_wait(const char *s) int c; while ((c = *s++)!= 0) IO_PUTC_WAIT(c); 2.6 uart_io_write_wait void uart_io_write_wait(const char *s) UART S Sunplus Technology Co., Ltd. PAGE 13 V0.2 Feb 03, 2008

(1)#define UART_PUTS(s...) \ do \ psprintf(linebuf, ##s); uart_io_write_wait(linebuf); \ while (0) 2.7 is_uart0_fifo_full int is_uart0_fifo_full() Is uart0 FIFO buffer full? 1: FIFO buffer is full; 0: nont full uart.c uart buffer 256 FIFO 2.8 is_uart0_fifo_empty int is_uart0_fifo_empty() uart0 FIFO buffer empty Sunplus Technology Co., Ltd. PAGE 14 V0.2 Feb 03, 2008

2.9 reset_uart0_fifo void reset_uart0_fifo() Initial uart0 fifo buffer none 2.10 write_uart0_exact void write_uart0_exact(int c) uart0 C int write_uart0_exact write_uart0 uart0 buffer regs0->uart0_data 2.11 io_write_wait Void io_write_wait(const char *s) uart S IO_PUTC_WAIT Sunplus Technology Co., Ltd. PAGE 15 V0.2 Feb 03, 2008

2.12 io_getc Int io_getc(void) uart 0 2.13 io_write_flush Void io_write_flush(void) Wait until output fifo empty 3 Interrupt 3.1 Time Interrupt timer 0 timer 1 timer 0 timer 1 timer1 3.1.1 init_timer Sunplus Technology Co., Ltd. PAGE 16 V0.2 Feb 03, 2008

void init_timer(void) 1. setup STC 90kHz 2. setup RTC 100Hz 3. setup regs0->timer0_ctrl & timer1_ctrl reset_all regs0->stc_divisor setup STC frequency, ( 90kHz ) regs0->rtc_divisor setup RTC frequency ( 100Hz) regs0->timer1_ctrl : setup interrupt time 1 regs0->timer1_ctrl = TIMER_CONFIG_10ms; Comment: timer1 10ms 10ms TIMER_CONFIG_10ms :10ms Regmapo_XXX.h : #define TIMER_CONFIG_10ms ( TIMER_CONFIG_STC (900-1)) STC 90KHz 900 / 90KHz=10ms TIMER_CONFIG_4ms 4ms TIMER_CONFIG_1ms 1ms TIMER_CONFIG_STOP 3.1.2 intr_timer1 Sunplus Technology Co., Ltd. PAGE 17 V0.2 Feb 03, 2008

void intr_timer1(void) Interrupt function timer1 intdrv_8202.s entry_timer1: la b k1, intr_timer1 interrupt_service timer1 intr_timer1 1 void intr_timer1(void) static int i = 0; i++; if(i==100) i=0; booking_second_flag=1; printf_w("===> booking_second_flag=%d\n", booking_second_flag); Comment: regs0->timer1_ctrl = TIMER_CONFIG_10ms 10ms 10ms 100=1s booking_second_flag 1s Sunplus Technology Co., Ltd. PAGE 18 V0.2 Feb 03, 2008

3.2 UART Interrupt 1 Comment: 4 Time Delay 4.1 delay void delay(unsigned) Delay ms 4.2 delay_1ms Sunplus Technology Co., Ltd. PAGE 19 V0.2 Feb 03, 2008

void delay_1ms(unsigned) Dleay ms 1 delay_1ms(20); delay 20 ms 4.3 delay_1us void delay_1us(unsigned) Dleay us delay_1ms. 4.4 delay_srv_10ms Sunplus Technology Co., Ltd. PAGE 20 V0.2 Feb 03, 2008

void delay_srv_10ms(int tms) Dleay 10ms Tms: delay delay_srv_10ms delay ( delay_1ms) delay servo delay_1ms 1 delay_srv_10ms 10 100ms delay servo ServoDecMainLoop 5 Watchdog 5.1 watchdog_onoff void watchdog_onoff(int n) Turn on /off watchdog n: 1:turn on watchdog; 0: turn off watchdog (1) watchdog_onoff(0); // disable watchdog (default) watchdog_onoff(1); Sunplus Technology Co., Ltd. PAGE 21 V0.2 Feb 03, 2008

5.2 watchdog_renew void watchdog_renew(int n) Set watchdog counter N watchdog counter 1 static inline void apmain_state_setup_browser() #ifdef SHOW_DOUBLE_LOGO //zxb 2005-7-29 0:02 ShowTitle(); #endif // enable watchdog (default) watchdog_renew(0xffff); // reset watchdog watchdog_onoff(1); // enable watchdog 5.3 dsp_watchdog inline void dsp_watchdog(void) use DSP watch dog to monitor DSP, If DSP behavier abnormally, watch dog will reset DSP Sunplus Technology Co., Ltd. PAGE 22 V0.2 Feb 03, 2008

(1) void polling(void) #ifndef NO_AUDIO_DSP // to avoid 500 ms as a multiple of consuming speed. if (diff >= (UINT8)(50-dsp_delay) ) dsp_delay = (dsp_delay + 0x2) & 0xf; dsp_watchdog(); #endif 6 GPIO 6.1 8202T GPIO PIN GPIO 87 GPIO39 Servo HOME / CARD_RST GPIO39 gpio_first[2][7]=1 88 GPIO40 Servo LDSW GPIO40 gpio_first[2][8]=1 115 GPIO2 DVDVR GPIO2 gpio_first[0][2]=1 116 GPIO3 Servo DMEA GPIO3 gpio_first[0][3]=1 117 GPIO4 SD_D1 / MS_D1 GPIO4 gpio_first[0][4]=1 118 GPIO5 SD_D0 / MS_D0 GPIO5 gpio_first[0][5]=1 119 GPIO6 SD_CLK / MS_CLK GPIO6 gpio_first[0][6]=1 120 GPIO7 Servo TRAY_IS_IN / SD_CMD / MS_BS GPIO7 gpio_first[0][7]=1 121 GPIO8 Servo TRAY_IS_OUT / SD_D3 / MS_D3 GPIO8 gpio_first[0][8]=1 122 GPIO9 SD_D2 / MS_D2 GPIO9 gpio_first[0][9]=1 123 GPIO10 CDVR GPIO10 gpio_first[0][10]=1 128 GPIO15 Servo TRAY_OUT GPIO15 gpio_first[0][15]=1 1 GPIO16 VFD_CLK GPIO16 gpio_first[1][0]=1 Sunplus Technology Co., Ltd. PAGE 23 V0.2 Feb 03, 2008

2 GPIO17 VFD_STB GPIO17 gpio_first[1][1]=1 3 GPIO18 VFD_DATA GPIO18 gpio_first[1][2]=1 7 GPIO19 IR_IN GPIO19 gpio_first[1][3]=1 8 GPIO20 SCART_REL / GAME_LATCH GPIO20 gpio_first[1][4]=1 9 GPIO21 SCART_DIS / GAME_CLK GPIO21 gpio_first[1][5]=1 11 GPIO22 HSYNC(1) / RX(1) GPIO22 gpio_first[1][6]=1 12 GPIO23 VSYNC(1) / TX(1) GPIO23 gpio_first[1][7]=1 33 GPIO25 HSYNC(2) / RX(2) / CARD_SENSE(1) GPIO25 gpio_first[1][9]=1 45 GPIO27 VSYNC(2) / TX(2) / GAME_D1(1) GPIO27 gpio_first[1][11]=1 51 GPIO28 SPDIF_OUT GPIO28 gpio_first[1][12]=1 52 GPIO29 SCART_SIG / GAME_D0 GPIO29 gpio_first[1][13]=1 53 GPIO30 VSYNC/656_D6 GPIO30 gpio_first[1][14]=1 54 GPIO31 I2S_DIN/656_D5 GPIO31 gpio_first[1][15]=1 55 GPIO32 AIN_R GPIO32 gpio_first[2][0]=1 56 GPIO33 AOUT_C GPIO33 gpio_first[2][1]=1 57 GPIO34 AOUT_SUB GPIO34 gpio_first[2][2]=1 58 GPIO35 VSS_ADAC GPIO35 gpio_first[2][3]=1 59 GPIO36 AOUT_RS GPIO36 gpio_first[2][4]=1 60 GPIO37 AOUT_LS GPIO37 gpio_first[2][5]=1 61 GPIO38 VREF GPIO38 gpio_first[2][6]=1 6.2 GPIO 1 0 regs0->gpio_master[4] 0 GPIO IOP 1 GPIO RISC regs0->gpio_oe[4] 0 GPIO 1 GPIO regs0->gpio_out[4] 0 GPIO 1 GPIO regs0->gpio_in[4] 0 1 Sunplus Technology Co., Ltd. PAGE 24 V0.2 Feb 03, 2008

#define GPIO_I_GET(a) ((regs0->gpio_in[a/16] >> (a%16)) & 0x01) #define GPIO_O_SET(a,d) ((d)? (regs0->gpio_out[a/16] = (1<<(a%16))) \ : (regs0->gpio_out[a/16] &= ~(1<<(a%16))) ) #define GPIO_E_SET(a,d) ((d)? (regs0->gpio_oe[a/16] = (1<<(a%16))) \ : (regs0->gpio_oe[a/16] &= ~(1<<(a%16))) ) #define GPIO_M_SET(a,d) ((d)? (regs0->gpio_master[a/16] = (1<<(a%16))) \ : (regs0->gpio_master[a/16] &= ~(1<<(a%16))) ) GPIO_M_SET(a,d) GPIO_E_SET(a,d) GPIO_O_SET(a,d) a GPIO,d 0 1 a GPIO,d 0 1 a GPIO,d 0 1 0 GPIO IOP 1 GPIO RISC 0 GPIO 1 GPIO 0 GPIO 1 GPIO GPIO_I_GET(a) a GPIO GPIO (1) regs0->gpio_master[54 / 16] = (0x7 << (54 % 16)); GPIO 54 55 56 RISC regs0->gpio_oe[54 / 16] = (0x7 << (54 % 16)); GPIO 54 55 56 regs0->gpio_out[54 / 16] &= ~(0x7 << (54 % 16)); GPIO 54 55 56 2 GPIO_M_SET(16, 1); GPIO_E_SET(16, 1); GPIO_O_SET(16, 1); GPIO16 RISC Sunplus Technology Co., Ltd. PAGE 25 V0.2 Feb 03, 2008

6.3 reset_gpio void reset_gpio(void) initial gpio function (1) void reset_all(void) #ifdef SUPPORT_EPP // reset emuio fifo reset_io(); #endif // hardware initialization reset_gpio(); // setup GPIO directions //uart relative function reset_uart_func(); 7 VFD 7.1 VFD (1) VFD (Vacuum Fluorescent Display), Digit 0 : A,B,C,D,E,F Sunplus Technology Co., Ltd. PAGE 26 V0.2 Feb 03, 2008

Digit 1 : B,C Digit 2 : A,B,G,E,D VFD panel spec, //customer//sunplus//vfd_***.h (2) VFD BYTE vfd_mem[vfd_mem_len], VFD_MEM_LEN MEMMORY linbuf[] linbuf[] BYTE VFD_MEM[] polling BYTE VFD_MEM[] VFD BYTE vfd_mem[vfd_mem_len] vfd_func.h 7.2 update_vfd_data void update_vfd_data(void) Update vfd_mem data none polling_vfdr update vfd_mem data, open read Example: void update_vfd_data(void) Sunplus Technology Co., Ltd. PAGE 27 V0.2 Feb 03, 2008

case VCD_STATE_POWER: //power off index = vfd_set_power_state(index); return; case VCD_STATE_IDLE: //no disc if(system_state == SYSTEM_NODISC) index = vfd_set_no_disc_state(index); else index = vfd_set_idle_state(index); return; case VCD_STATE_READTOC: //chk disc type loading... index = vfd_set_toc_state(index); return; vfd_set_playback(); 7.3 polling_vfdr void polling_vfdr(void) 100ms VFD_MEM polling_10ms 1 static inline void polling_10ms(void) Sunplus Technology Co., Ltd. PAGE 28 V0.2 Feb 03, 2008

#if defined(support_vfd) defined(gpio_key_light)//nono 3-8-18 14:39 polling_vfdr(); #endif 7.4 vfd_set_str void vfd_set_str(uint8 id,const char *s) VFD_MEM Id language id S display string polling_10ms 1 READ UINT16 vfd_set_toc_state(uint16 index) erase_vfd_mem(); vfd_set_str(0," READ "); return index; 7.5 1 reset_vfd(): vfd register vfd memory 0 refresh_vfd_mem(): vfd memory(vfd_mem[]) refresh_vfd_mem_digit(): min,sec step/pause nodes vfd_set_7seg(uint32 t, UINT32 mm) t=0 track number mm:current track Sunplus Technology Co., Ltd. PAGE 29 V0.2 Feb 03, 2008

t=1 mm:current min t=2 mm:current sec vfd_dot(uint32 method, UINT32 p) method=0 p node method=1 p node method=2 toggle p node 3 7.6 VFD (1) \\root\\customer vfd_***.h vfd_***.c vfd_mod.c H vfd_dot (2) vfd_key_test vfd_dot (3) vfd_set_open( ) (4) *.h vfdfunc.h user_init.h user_init.h Sunplus Technology Co., Ltd. PAGE 30 V0.2 Feb 03, 2008

8 VIDEO CONTROL 8.1 TV DAC output table Table 1: 4 TV TV0 CVB CVB CVB TV1 TV2 Y Cb Y(S-Video) CVB G B TV3 Cr C(S-Video) R Table 2: 6 TV Dac On TV0 TV1 TV2 TV3 TV4 TV5 CVB Y C (S-Video) (S-Video) Y Cb Cr CVB Y C (S-Video) (S-Video) CVB Y (S-Video) C (S-Video) CVB Y C (S-Video) (S-Video) G B R 8202T 4 DAC, Table 1. 8.2 tv_dacoff Sunplus Technology Co., Ltd. PAGE 31 V0.2 Feb 03, 2008

static inline void tv_dacoff(unsigned v) Turn off dac V TV dac parameter 1 tv_dacoff(tv_dac_d TV_DAC_E TV_DAC_F) TV 3 TV4 TV5 8.3 tv_dachalf static inline void tv_dachalf(unsigned v) Set TV dac half swing V TV dac parameter 1 static inline void sysmain_setup_vdac_current_sphe8202() #ifdef TV_USE_HALF_SWING tv_dachalf(tv_dac_f TV_DAC_E TV_DAC_D TV_DAC_C TV_DAC_B); half-swing // dac f/e/d/c/b #elif defined(tv_use_quart_swing) sp8200tv_setup_dac_current(tv_dac_b_quart TV_DAC_C_QUART TV_DAC_D_QUAR T); // 8202L dac b/c/d quart-swing Sunplus Technology Co., Ltd. PAGE 32 V0.2 Feb 03, 2008

#else tv_dachalf(0); #endif #define TV_USE_HALF_SWING TV DAC 1/2 #define TV_USE_QUART_SWING TV DAC 1/4 8.4 tv_setup_aspect static inline void tv_setup_aspect(int aspect) Set aspect aspect OUTPUT_ASPECT_NORMAL OUTPUT_ASPECT_ANAMORPHIC Aspect aspect.h #define OUTPUT_ASPECT_NORMAL (OUTPUT_TV_ASPECT_4_3 OUTPUT_SRC_ASPECT_4_3) //4:3 source, output to 4:3 TV #define OUTPUT_ASPECT_ANAMORPHIC (OUTPUT_TV_ASPECT_16_9 OUTPUT_SRC_ASPECT_16_9) #define OUTPUT_ASPECT_LETTERBOX (OUTPUT_TV_ASPECT_4_3 OUTPUT_SRC_ASPECT_16_9) #define OUTPUT_ASPECT_PANSCAN (OUTPUT_TV_ASPECT_4_3 OUTPUT_SRC_ASPECT_16_9 OUTPUT_ENLARGE) #define OUTPUT_ASPECT_COMPRESSED (OUTPUT_TV_ASPECT_16_9 OUTPUT_SRC_ASPECT_4_3) Sunplus Technology Co., Ltd. PAGE 33 V0.2 Feb 03, 2008

8.5 CCIR656 CCIR656 GPIO CFG #define DIGITAL_VIDEO_OUT Sunplus Technology Co., Ltd. PAGE 34 V0.2 Feb 03, 2008