/****************************************************************************
* $Revision: 1.2 $
* $Date: 2001/03/28 23:12:11 $
*
*****************************************************************************/
/* This GEL file is loaded on the command line of Code Composer
* The StartUp() function is called every time you start
* Code Composer. You can customize this function to
* initialize wait states or to perform other initialization.
*/
StartUp()
{
/* Everything in this function will be executed on startup */
/* turn on our memory map*/
/*
GEL_MapOff();
GEL_MapOn();
GEL_MapAdd(0, 0, 0xE00000, 1, 1);
*/
GEL_UnloadGel("F:\\ti\\cc\\gel\\tms470.gel");
}
menuitem "TMS470 TestMenu"
/* This function should be used instead of the Debug->Restart menu */
/* selection when running ARM programs in mixed or 16 BIS (Thumb) */
/* mode. It ensures the processor is in ARM mode at the entry */
/* point of TI C runtimes. */
hotmenu ResetRestart()
{
GEL_Reset();
GEL_Restart();
}
hotmenu LoadImagLab()
{
GEL_Load(".\\Debug\\ImageLab.out");
GEL_Go(main);
GEL_BreakPtReset();
GEL_BreakPtAdd(TargetLabel);
GEL_Run();
}
menuitem "CCS Functions";
hotmenu ViewCCSPic()
{
//ccsViewPic();
//*
int page=0;
int column;
unsigned long pixel_w1, pixel_w2;
unsigned long *pixel_p;// = buffer;//(DWORD *) display[page];
for(page = 0;page < 220;page++)
{
pixel_p = (unsigned long *) display[page];
for (column = 176/2; column > 0; column--)
{
pixel_w1 = *pixel_p;
pixel_w2 = *pixel_p;
pixel_w1 &= 0xff00ff00;
pixel_w1 >>= 8;
pixel_w2 &= 0x00ff00ff;
pixel_w2 <<= 8;
*(pixel_p++) = pixel_w1 |pixel_w2;
}
}//*/
GEL_TextOut("ViewCCSPic is OK!\n");
}
slider VolumeControl(0, 10, 1, 1, volume)
{
/* initialize the target variable with the parameter passed
by the slider object. */
waitState = volume;
GEL_Run();
}
hotmenu SaveCCSPic()
{
GEL_MemorySave(display, 1, 176*220*2, ".\\data\\myfile.dat");
GEL_TextOut("SaveCCSPic is OK!\n");
}
menuitem "Image Effect"
hotmenu IE_NegaRGB()/*¸ºÆ¬*/
{
waitState = 0x00;
GEL_Run();
}
hotmenu IE_Gray()/*»Ò¶È*/
{
waitState = 0x01;
GEL_Run();
}
hotmenu IE_Sepia()/*»³¾É*/
{
waitState = 0x02;
GEL_Run();
}
hotmenu IE_Emboss()/*¸¡µñ*/
{
waitState = 0x03;
GEL_Run();
}
hotmenu IE_Sketch()/*ËØÃè*/
{
waitState = 0x04;
GEL_Run();
}
hotmenu IE_SmoothRGB()/*Èữ*/
{
waitState = 0x05;
GEL_Run();
}
hotmenu IE_StretchH()/*ˮƽ*/
{
waitState = 0x06;
GEL_Run();
}
hotmenu IE_StretchV()/*´¹Ö±*/
{
waitState = 0x07;
GEL_Run();
}
menuitem "Restore Demo";
hotmenu RD_NegaRGB()/*¸ºÆ¬*/
{
GEL_MemorySave(display, 1, 176*220*2, ".\\data\\myfile.dat");
GEL_TextOut("RD_NegaRGB is OK!\n");
}
hotmenu RD_Gray()/*»Ò¶È*/
{
GEL_MemoryLoad(display, 1, 176*220*2, ".\\data\\gray.dat");
GEL_TextOut("RD_Gray is OK!\n");
}
hotmenu RD_Sepia()/*»³¾É*/
{
GEL_MemoryLoad(display, 1, 176*220*2, ".\\data\\sepia.dat");
GEL_TextOut("RD_Sepia is OK!\n");
}
hotmenu RD_Emboss()/*¸¡µñ*/
{
GEL_MemoryLoad(display, 1, 176*220*2, ".\\data\\emboss.dat");
GEL_TextOut("RD_Emboss is OK!\n");
}
hotmenu RD_Sketch()/*ËØÃè*/
{
GEL_MemoryLoad(display, 1, 176*220*2, ".\\data\\sketch.dat");
GEL_TextOut("RD_Sketch is OK!\n");
}
hotmenu RD_SmoothRGB()/*Èữ*/
{
GEL_MemoryLoad(display, 1, 176*220*2, ".\\data\\smoothrgb.dat");
GEL_TextOut("RD_SmoothRGB is OK!\n");
}
hotmenu RD_FlipH()/*ˮƽ*/
{
GEL_MemoryLoad(display, 1, 176*220*2, ".\\data\\fliph.dat");
GEL_TextOut("RD_FlipH is OK!\n");
}
hotmenu RD_FlipV()/*´¹Ö±*/
{
GEL_MemoryLoad(display, 1, 176*220*2, ".\\data\\flipv.dat");
GEL_TextOut("RD_FlipV is OK!\n");
}