//---------------------------------------------------------------------------
short LCDSetLineSource(
        short Region,
        short LineCount,
        pixel *pSource,
        short LineStep)
{
    long PixelStart;
    if (Region >= 1)
        return (-1);

    if ((pSource < (pixel *)__sectop("BLCD_Frames_2")) || (pSource
            > (pixel *)__secend("BLCD_Frames_2")))
        return (-1);

    if ((&pSource[(long)LineCount * (long)LineStep] < (pixel *)__sectop(
            "BLCD_Frames_2")) || (&pSource[(long)LineCount * (long)LineStep]
            > (pixel *)__secend("BLCD_Frames_2")))

        if (LineCount > V_LINES_PER_FRAME)
            return (-1);

    PixelStart = 0;
#if LCD_FLIP_Y
    DD_RegionLines[Region].LineNext = LineStep;
    DD_RegionLines[Region].pLine = pSource + PixelStart;
    DD_RegionLines[Region].Height = LineCount;
#else
    DD_RegionLines[Region].LineNext = -LineStep;
    DD_RegionLines[Region].pLine = pSource + PixelStart + ((LineCount-1) * LineStep);
    DD_RegionLines[Region].Height = LineCount;
#endif
    return (0);
}
Пример #2
0
void PowerON_Reset_PC(void)
{
	char *p;


	set_vbr(&INT_Vectors[-4]);		// VBRの設定

	set_fpscr(FPSCR_Init);

//	_INITSCT();						// Rセクションの初期化(D→R)とBセクションのクリア (RAM上ロードのため未使用)

	for (p = (char*)__sectop("B"); p < (char*)__secend("B"); p++) *p = 0;	// Bセクションのクリア


//	_CALL_INIT();					// Remove the comment when you use global class object

//	_INIT_IOLIB();					// Enable I/O in the application(both SIM I/O and hardware I/O)

//	errno=0;						// Remove the comment when you use errno
//	srand((_UINT)1);					// Remove the comment when you use rand()
//	_s1ptr=NULL;					// Remove the comment when you use strtok()

//	HardwareSetup();				// Use Hardware Setup

	set_cr(SR_Init);

	main();

//	_CLOSEALL();					// Close I/O in the application(both SIM I/O andhardware I/O)

//	_CALL_END();					// Remove the comment when you use global class object

	sleep();
}
Пример #3
0
* Copyright (C) 2009 Renesas Electronics Corporation.
* and Renesas Solutions Corporation. All rights reserved.
*
************************************************************************/

#include "typedefine.h"

#pragma unpack

#pragma section C C$DSEC
extern const struct {
    _UBYTE *rom_s;       /* Start address of the initialized data section in ROM */
    _UBYTE *rom_e;       /* End address of the initialized data section in ROM   */
    _UBYTE *ram_s;       /* Start address of the initialized data section in RAM */
}   _DTBL[] = {
    { __sectop("D"), __secend("D"), __sectop("R") },
    { __sectop("D_2"), __secend("D_2"), __sectop("R_2") },
    { __sectop("D_1"), __secend("D_1"), __sectop("R_1") }
};
#pragma section C C$BSEC
extern const struct {
    _UBYTE *b_s;         /* Start address of non-initialized data section */
    _UBYTE *b_e;         /* End address of non-initialized data section */
}   _BTBL[] = {
    { __sectop("B"), __secend("B") },
    { __sectop("B_2"), __secend("B_2") },
    { __sectop("B_1"), __secend("B_1") }
};

#pragma section
Пример #4
0
/*  NOTE:THIS IS A TYPICAL EXAMPLE.                                    */
/***********************************************************************/
                  


#include "vect.h"

#pragma section VECTTBL

void *RESET_Vectors[] = {
//;<<VECTOR DATA START (POWER ON RESET)>>
//;0 Power On Reset PC
    (void*)	PowerON_Reset_PC,                                                                                                                
//;<<VECTOR DATA END (POWER ON RESET)>>
// 1 Power On Reset SP
    __secend("S"),
//;<<VECTOR DATA START (MANUAL RESET)>>
//;2 Manual Reset PC
    (void*)	Manual_Reset_PC,                                                                                                                 
//;<<VECTOR DATA END (MANUAL RESET)>>
// 3 Manual Reset SP
    __secend("S")

};
#pragma section INTTBL
void *INT_Vectors[] = {
// 4 Illegal code
    (void*) INT_Illegal_code,
// 5 Reserved
    (void*) Dummy,
// 6 Illegal slot
Пример #5
0
Файл: dbsct.c Проект: kjsd/h8sdk
/*  DESCRIPTION :Setting of B,R Section                                */
/*  CPU TYPE    :H8/3694F                                              */
/*                                                                     */
/*  This file is generated by Renesas Project Generator (Ver.4.13).    */
/*                                                                     */
/***********************************************************************/
                  


#include <h8sdk/stddef.h>

#pragma section $DSEC
static const struct {
	_UBYTE *rom_s;       /* Start address of the initialized data section in ROM */
	_UBYTE *rom_e;       /* End address of the initialized data section in ROM   */
	_UBYTE *ram_s;       /* Start address of the initialized data section in RAM */
}DTBL[]= {
	{__sectop("D"), __secend("D"), __sectop("R")},
//	{__sectop("$ABS8D"), __secend("$ABS8D"), __sectop("$ABS8R")},
//	{__sectop("$ABS16D") , __secend("$ABS16D") , __sectop("$ABS16R") }
};
#pragma section $BSEC
static const struct {
	_UBYTE *b_s;         /* Start address of non-initialized data section */
	_UBYTE *b_e;         /* End address of non-initialized data section */
}BTBL[]= {
	{__sectop("B"), __secend("B")},
//	{__sectop("$ABS8B"), __secend("$ABS8B")},
//	{__sectop("$ABS16B"), __secend("$ABS16B")}
};