⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ini91ml.c.svn-base

📁 最新火热的CX32 源代码
💻 SVN-BASE
字号:
/************************************************************************/
/*																		*/
/* This file is a Toshiba TMP91CU27UG-9999 Initial routines				*/
/* Application			: DPTV								            */
/* MCU					: TMP91CU27UG-9999    					        */
/* Main Clock			: fc=27MHz								        */
/*																		*/
/* Copyright (C) Trident Multimedia Technologies (Shanghai) Co., Ltd.   */
/*                    2005  All rights reserved.                        */
/* Revision:                                                            */
/* 12/10/2005     Created by Lewis										*/
/************************************************************************/

/*==================================================================*/
/*	[ File include part ]											*/
/*==================================================================*/
#include	"tdefs.h"

/*==================================================================*/
/* [ Sample of interrupt function ] 								*/
/*	 Make interrupt routine to fit your program.					*/
/*==================================================================*/
/*===[ Sample for interrupt :								]=======*/
/*===[		 This function has only one instruction 'RETI'	]=======*/
#define RunUsrIntFun(uc)	((UsrIntFunPtr)_VectIntTbl[uc])()
typedef void (*UsrIntFunPtr)(void);
void * const _VectIntTbl[];

void SystemCallISP()
{
    ((UsrIntFunPtr)_VectIntTbl[0x100 / sizeof(void *)])();
}

void SystemReboot()
{
    *((char volatile *)0x1000) = 0;
    ((UsrIntFunPtr)_VectIntTbl[0])();
}

void _Int_dummy(void)
{
}

/*==================================================================*/
/* [ Define interrupt table ]										*/
/*	 Rewrite the base address of interrupt table to fit your target	*/
/*	 MCU. Write interrupt functions name you made, as initializer	*/
/*	 of table.														*/
/*==================================================================*/

void	_startup(void);			/* Prototype definition for reset vector	*/
extern void tdTimerA0Service(Void);     /* TA01 */
extern void tdTimerB0Service(Void) ;     /* TB0  */
extern void tdTimerA1Service(Void);     /* TA23 */
extern void tdTimerA45Service(Void);     /* TA45 */
extern void Int_uart0receive();        /* UART0 reveive  */
extern void Int_uart0transmit();       /* UART0 transmit */
extern void Int_uart1receive();        /* UART1 reveive  */
extern void Int_uart1transmit();       /* UART1 transmit */
extern void tdInterruptService0(Void); /* INT0 Remoter   */
extern void tdInterruptService5(Void); /* INT5 Remoter   */
extern void	intsbi( void );
#ifdef USE_T_QUAD 
#pragma  section  const	VECTOR  0x1FBF00
#else
#pragma  section  const	VECTOR  0xFFBF00
#endif
void * const _VectIntTbl[] = {
	_startup,	            	/* Reset/SWI 0		01*/
	_Int_dummy,	               	/* SWI 1			02*/
	_Int_dummy,		            /* INTUNDEF/SWI 2	03*/
	_Int_dummy,		            /* SWI 3			04*/
	_Int_dummy,		            /* SWI 4			05*/
	_Int_dummy,		            /* SWI 5			06*/
	_Int_dummy,		            /* SWI 6			07*/
	_Int_dummy,		            /* SWI 7			08*/
	_Int_dummy,		            /* NMI				09*/
	_Int_dummy,		            /* INTWD			10*/
	tdInterruptService0,        /* INT0 Remoter		11*/
	_Int_dummy,		            /* RESERVED			12*/
	_Int_dummy,		            /* RESERVED			13*/
	_Int_dummy,		            /* RESERVED			14*/
	_Int_dummy,		            /* RESERVED			15*/
	tdInterruptService5,	    /* INT5	Remoter	    16*/
	_Int_dummy,		            /* INT6 			17*/
	_Int_dummy,		            /* RESERVED			18*/
	_Int_dummy,		            /* RESERVED			19*/
	tdTimerA0Service,			/* INTTA0			20*/
	tdTimerA1Service,	      	/* INTTA1			21*/
	_Int_dummy,	              	/* INTTA2			22*/
	_Int_dummy,            		/* INTTA3			23*/
	_Int_dummy,		            /* INTTA4			24*/
	tdTimerA45Service,	        /* INTTA5			25*/
	_Int_dummy,		            /* RESERVED			26*/
	_Int_dummy,		            /* RESERVED			27*/
	_Int_dummy,                 /* INTTB00			28*/
	_Int_dummy,		            /* INTTB01			29*/
	_Int_dummy,		            /* RESERVED			30*/
	_Int_dummy,		            /* RESERVED			31*/
	_Int_dummy,                 /* INTTBOF0 		32*/
	_Int_dummy,		            /* RESERVED 		33*/
	Int_uart0receive,			/* INTRX0			34*/
	Int_uart0transmit,			/* INTTX0			35*/
	Int_uart1receive,	        /* INTRX1			36*/
	Int_uart1transmit,         	/* INTTX1			37*/
#ifdef _CX32_LCD_MACHINE_
	intsbi,			            /* INTSBI			38*/
#else
	_Int_dummy,			            /* INTSBI			38*/
#endif
	_Int_dummy,		            /* INTRTC			39*/
	_Int_dummy,		            /* INTAD			40*/
	_Int_dummy,		            /* INTTC0			41*/
	_Int_dummy,		            /* INTTC1			42*/
	_Int_dummy,		            /* INTTC2			43*/
	_Int_dummy,		            /* INTTC3			44*/
};


/*==================================================================*/
/*  [ Define interrupt process function ]							*/
/*	These functions are used to jump to real interrupt function.	*/
/*	Users need not care about this.	                                */
/*	So do not modify follwoing functions.							*/
/*==================================================================*/
void __interrupt _Int_SWI0(void)
{
    RunUsrIntFun(0);
}

void __interrupt _Int_SWI1(void)
{
    RunUsrIntFun(1);
}

void __interrupt _Int_SWI2(void)
{
    RunUsrIntFun(2);
}

void __interrupt _Int_SWI3(void)
{
    RunUsrIntFun(3);
}

void __interrupt _Int_SWI4(void)
{
    RunUsrIntFun(4);
}

void __interrupt _Int_SWI5(void)
{
    RunUsrIntFun(5);
}

void __interrupt _Int_SWI6(void)
{
    RunUsrIntFun(6);
}

void __interrupt _Int_SWI7(void)
{
    RunUsrIntFun(7);
}

void __interrupt _Int_NMI (void)
{
    RunUsrIntFun(8);
}

void __interrupt _Int_INTWD(void)
{
    RunUsrIntFun(9);
}

void __interrupt _Int_INT0 (void)
{
    RunUsrIntFun(0x0A);
}

void __interrupt _Int_INT1 (void)
{
    RunUsrIntFun(0x0B);
}

void __interrupt _Int_INT2 (void)
{
    RunUsrIntFun(0x0C);
}

void __interrupt _Int_INT3 (void)
{
    RunUsrIntFun(0x0D);
}

void __interrupt _Int_INT4 (void)
{
    RunUsrIntFun(0x0E);
}

void __interrupt _Int_INT5 (void)
{
    RunUsrIntFun(0x0F);
}

void __interrupt _Int_INT6 (void)
{
    RunUsrIntFun(0x10);
}

void __interrupt _Int_INT7 (void)
{
    RunUsrIntFun(0x11);
}

void __interrupt _Int_INT8  (void)
{
    RunUsrIntFun(0x12);
}

void __interrupt _Int_INTTA0(void)
{
    RunUsrIntFun(0x13);
}

void __interrupt _Int_INTTA1(void)
{
    RunUsrIntFun(0x14);
}

void __interrupt _Int_INTTA2(void)
{
    RunUsrIntFun(0x15);
}

void __interrupt _Int_INTTA3(void)
{
    RunUsrIntFun(0x16);
}

void __interrupt _Int_INTTA4(void)
{
    RunUsrIntFun(0x17);
}

void __interrupt _Int_INTTA5(void)
{
    RunUsrIntFun(0x18);
}

void __interrupt _Int_INTTA6(void)
{
    RunUsrIntFun(0x19);
}

void __interrupt _Int_INTTA7(void)
{
    RunUsrIntFun(0x1A);
}

void __interrupt _Int_INTTB00(void)
{
    RunUsrIntFun(0x1B);
}

void __interrupt _Int_INTTB01(void)
{
    RunUsrIntFun(0x1C);
}

void __interrupt _Int_INTTB10(void)
{
    RunUsrIntFun(0x1D);
}

void __interrupt _Int_INTTB11 (void)
{
    RunUsrIntFun(0x1E);
}

void __interrupt _Int_INTTBOF0(void)
{
    RunUsrIntFun(0x1F);
}

void __interrupt _Int_INTTBOF1(void)
{
    RunUsrIntFun(0x20);
}

void __interrupt _Int_INTRX0(void)
{
    RunUsrIntFun(0x21);
}

void __interrupt _Int_INTTX0(void)
{
    RunUsrIntFun(0x22);
}

void __interrupt _Int_INTRX1(void)
{
    RunUsrIntFun(0x23);
}

void __interrupt _Int_INTTX1(void)
{
    RunUsrIntFun(0x24);
}

void __interrupt _Int_INTS2 (void)
{
    RunUsrIntFun(0x25);
}

void __interrupt _Int_INTRTC(void)
{
    RunUsrIntFun(0x26);
}

void __interrupt _Int_INTAD (void)
{
    RunUsrIntFun(0x27);
}

void __interrupt _Int_INTTC0(void)
{
    RunUsrIntFun(0x28);
}

void __interrupt _Int_INTTC1(void)
{
    RunUsrIntFun(0x29);
}

void __interrupt _Int_INTTC2(void)
{
    RunUsrIntFun(0x2A);
}

void __interrupt _Int_INTTC3(void)
{
    RunUsrIntFun(0x2B);
}

#ifndef	USE_T_QUAD
#pragma  section  const	INTTBL  0xFFFF00
void * const _IntTbl[] = {
     _startup,             /* Reset/SWI 0    */
     _Int_SWI1,            /* SWI 1          */
     _Int_SWI2,            /* INTUNDEF/SWI 2 */
     _Int_SWI3,            /* SWI 3          */
     _Int_SWI4,            /* SWI 4          */
     _Int_SWI5,            /* SWI 5          */
     _Int_SWI6,            /* SWI 6          */
     _Int_SWI7,            /* SWI 7          */
     _Int_NMI,             /* NMI            */
     _Int_INTWD,           /* INTWD          */
     _Int_INT0,            /* INT0           */
     _Int_INT1,            /* INT1           */
     _Int_INT2,            /* INT2           */
     _Int_INT3,            /* INT3           */
     _Int_INT4,            /* INT4           */
     _Int_INT5,            /* INT5           */
     _Int_INT6,            /* INT6           */
     _Int_INT7,            /* INT7           */
     _Int_INT8,            /* INT8           */
     _Int_INTTA0,          /* INTTA0         */
     _Int_INTTA1,          /* INTTA1         */
     _Int_INTTA2,          /* INTTA2         */
     _Int_INTTA3,          /* INTTA3         */
     _Int_INTTA4,          /* INTTA4         */
     _Int_INTTA5,          /* INTTA5         */
     _Int_INTTA6,          /* INTTA6         */
     _Int_INTTA7,          /* INTTA7         */
     _Int_INTTB00,         /* INTTB00        */
     _Int_INTTB01,         /* INTTB01        */
     _Int_INTTB10,         /* INTTB10        */
     _Int_INTTB11,         /* INTTB11        */
     _Int_INTTBOF0,        /* INTTBOF0       */
     _Int_INTTBOF1,        /* INTTBOF1       */
     _Int_INTRX0,          /* INTRX0         */
     _Int_INTTX0,          /* INTTX0         */
     _Int_INTRX1,          /* INTRX1         */
     _Int_INTTX1,          /* INTTX1         */
     _Int_INTS2,           /* INTS2          */
     _Int_INTRTC,          /* INTRTC         */
     _Int_INTAD,           /* INTAD          */
     _Int_INTTC0,          /* INTTC0         */
     _Int_INTTC1,          /* INTTC1         */
     _Int_INTTC2,          /* INTTC2         */
     _Int_INTTC3          /* INTTC3         */
    };
#endif
#pragma  section  const

/*==================================================================*/
/*	  Standard C Library setting for TLCS-900/L1  [ SAMPLE ]		*/
/*							 [TMP91CP27U]							*/
/*							Revision: 1.00							*/
/*==================================================================*/
/*==================================================================*/
/* [ Configuration part ]											*/
/*	 Following macro value means that:								*/
/*	 0 : The function is not used.									*/
/*	 1 : The function is used.										*/
/*	 When you use 'abort' or 'exit' or 'heap area', 				*/
/*	 Rewrite each program to fit your use.							*/
/*==================================================================*/
#define  __USE_FLOAT	1	/* Change 0 to 1, if use floating point.*/
#define  __USE_ABORT	0	/* Change 0 to 1, if use abort function.*/
#define  __USE_EXIT 	0	/* Change 0 to 1, if use exit function. */
#define  __USE_HEAP 	0	/* Change 0 to 1, if use heap area. 	*/

#if __USE_FLOAT
/*==================================================================*/
/* [ Define public variable ]										*/
/*	When use floating point, this part is necessary.				*/
/*	Do not change this part.										*/
/*	'errno' is reserved word. Do not access to this variable.		*/
/*==================================================================*/
int 	errno;						/* Refer from standard library	*/


#endif		/* __USE_FLOAT */

#if __USE_ABORT
/*==================================================================*/
/* [ Standard library function: abort() ]							*/
/*	 When use abort function, this part is necessary.				*/
/*	 Rewrite this part to fit your program. 						*/
/*==================================================================*/
void	abort(void){
  /*================================================================*/
  /*  Write the process before reset, then jump to your start up	*/
  /*  routine.														*/
  /*================================================================*/
  /*  __asm("    j    __startup");							SAMPLE	*/
  /*================================================================*/
}
#endif		/* __USE_ABORT */

#if __USE_EXIT
/*==================================================================*/
/* [ Standard library function: exit() ]							*/
/*	 When use exit function, this part is necessary.				*/
/*	 Rewrite this part to fit your program. 						*/
/*==================================================================*/
void	exit(int status){
  /*================================================================*/
  /*  Write the process as same as normal program ending.			*/
  /*================================================================*/
  /*  __asm("    halt");									SAMPLE	*/
  /*================================================================*/
}
#endif		/* __USE_EXIT */

#if __USE_HEAP


#endif		/* __USE_HEAP */

/* End of file */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -