Hi,
as already described, if i read out the end address i get the start address. See lines:
ParameterAddr = ((Reg_Cmd_Write_Offset - 12) & 4095); // Go back by 12 bytes to get end address parameter
End_Address = EVE_MemRead32((RAM_CMD + ParameterAddr));
used pic:
home_v4.jpg JPEG to show on display
home_v4_converted.jpg generated with EAB 1.0 in Output Format: PNG/JPEG (EVE Product Range: FT81x)
home_v4_converted.h generated with HxD tool
// var
extern unsigned char u8f_MainHomeJPG_60x60[2649]; // home_v4_converted.h converted and generated header file for home_v4.jpg
//code
void main(void)
{
uint32_t u32_ErrorCode = (uint32_t)e_NO_ERROR;
u32_ErrorCode = u32_MCUconfig_SystemInit(); // RSC timer 1 active!!!
if ( (uint32_t)e_NO_ERROR == u32_ErrorCode )
{
v_MCUconfig_App(); // MCU app init
APP_Init(); // EVE initialisation
}
if ( (uint32_t)e_NO_ERROR == u32_ErrorCode )
{
APP_LoadImageRSC_JPG();
}
while ( 1 )
{
}//end of while
}
//----------------------------------------------------------------------------------------------------------
void APP_LoadImageRSC_JPG(void)
{
uint16_t Reg_Cmd_Write_Offset = 0;
uint16_t ParameterAddr = 0;
uint32_t End_Address = 0;
uint32_t Width = 0;
uint32_t Height = 0;
uint32_t StartAddress = 0;
API_LIB_BeginCoProList(); // Begin new co-processor list
API_CMD_LOADIMAGE(StartAddress,0); // Load image command. Extract data to RAM_G + 0, options = 0
API_LIB_EndCoProList(); // Finish the co-processor list
API_LIB_WriteDataToCMD(u8f_MainHomeJPG_60x60, sizeof(u8f_MainHomeJPG_60x60)); // Send data immediately after the command (since we don't select MEDIAFIFO as source in Options))
API_LIB_AwaitCoProEmpty(); // Await completion of the Load Image. Image will now be in RAM_G
// ###### Check parameters of decompressed image ########
API_LIB_BeginCoProList(); // Begin co-pro list
API_CMD_GETPROPS(0, 0, 0); // GetProps command with three dummy 32-bit values
API_LIB_EndCoProList(); // Finish the co-processor list
API_LIB_AwaitCoProEmpty(); // Await the command completion
Reg_Cmd_Write_Offset = EVE_MemRead16(REG_CMD_WRITE); // Check current pointer value
ParameterAddr = ((Reg_Cmd_Write_Offset - 12) & 4095); // Go back by 12 bytes to get end address parameter
End_Address = EVE_MemRead32((RAM_CMD + ParameterAddr));
ParameterAddr = ((Reg_Cmd_Write_Offset -
& 4095); // Go back by 8 bytes to get width parameter
Width = EVE_MemRead32((RAM_CMD+ParameterAddr));
ParameterAddr = ((Reg_Cmd_Write_Offset - 4) & 4095); // Go back by 4 bytes to get height parameter
Height = EVE_MemRead32((RAM_CMD+ParameterAddr));
// ######################################################
API_LIB_BeginCoProList(); // Begin new screen
API_CMD_DLSTART(); // Tell co-processor to create new Display List
API_CLEAR_COLOR_RGB(0, 0, 0); // Specify color to clear screen to
API_CLEAR(1,1,1); // Clear color, stencil, and tag buffer
API_COLOR_RGB(255,255,255); // White colour will display image with original colours
API_BITMAP_HANDLE(0); // Tell FT81x the properties of the bitmap we will display.
API_CMD_SETBITMAP( 0, RGB565, Width, Height); // source (RAMG), Format, size_x, size_y
API_BEGIN(BITMAPS);
API_VERTEX2II( 100, 100, 0, 0); // x, y, handle, cell // Display image at (200,200)
API_END();
// ###### OPTIONAL SECTION - print parameters of decompressed image ########
// API_COLOR_RGB(255,255,255); // Print labels
// API_CMD_TEXT(300, 200, 28, 0, "End Addr");
// API_CMD_TEXT(300, 240, 28, 0, "Width");
// API_CMD_TEXT(300, 280, 28, 0, "Height");
//
// API_CMD_NUMBER(400, 200, 28, 0, End_Address); // Print associated values
// API_CMD_NUMBER(400, 240, 28, 0, Width);
// API_CMD_NUMBER(400, 280, 28, 0, Height);
// API_CMD_SETBASE(16);
// API_CMD_NUMBER(500, 200, 28, 0, End_Address);
// ###### END OF OPTIONAL SECTION - print parameters of decompressed image ########
API_DISPLAY(); // Tell EVE that this is end of list
API_CMD_SWAP(); // Swap buffers in EVE to make this list active
API_LIB_EndCoProList(); // Finish the co-processor list burst write
API_LIB_AwaitCoProEmpty(); // Wait until co-processor has consumed all commands
//APP_SnapShot2PPM(); // Un-comment to take snapshot (see BRT_AN_014)
while(1)
{
}
}
Thanks.
Best Regards
rsc