i'm doing my project where i need to read the JPEG file from sd card and then display it to lcd screen TRDB_LCM. i've been able to read the data and decompressed it. so now i have to display them. i use the sdram as the buffer. so i use vga controller core, pixel buffer core, and sdram controller core. i set the memory buffer start address to sdram controller base address.
and to test it, i use the code below:
alt_up_pixel_buffer_dev * pixel_buf_dev;
// open the Pixel Buffer port
//pixel_buf_dev = alt_up_pixel_buffer_open_dev ("/dev/pixel_buffer");
if ( pixel_buf_dev == NULL)
alt_printf ("Error: could not open pixel buffer device \n");
else
alt_printf ("Opened pixel buffer device \n");
/* Clear and draw a blue box on the screen */
alt_up_pixel_buffer_clear_screen (pixel_buf_dev, 0);
volatile int i =0;
volatile int j =0;
volatile int cnt =0;
while(1){
if(cnt==50000){
if(j==200){
j=0;
i+=20;
}
if(i==200)i=0;
//
alt_up_pixel_buffer_clear_screen (pixel_buf_dev, 0);
alt_up_pixel_buffer_draw_box (pixel_buf_dev, j, 10, i, 10, 0xf01F, 0);
j++;
cnt = 0;
}
cnt++;
}
but there's nothing displayed on the screen, just all white.
i dont know what's wrong. do i have to store the RGB data to sdram first?? are there any other configurations need to be done??
thanks before