User guide
SFSU - Embedded Systems Tutorial Nano- Electronics & Computing Research Lab
103
//vid_draw_round_corner_box ( 300, 400, 500, 500,10, 0x5555, 0x0000, display_global);
4) After the touch is selected , pixel buffer and character buffer gets updated.
alt_video_display_clear_screen(display_global, 0x0);
result = write_buffer(display_global,name_list[pic_index],frame_write_index);
alt_video_display_register_written_buffer(display_global); ////direct the display buffer to buffer_being_written
while(alt_video_display_buffer_is_available(display_global)!=0); ////update display_global- >buffer_being_displayed
printf("\nLook at the the screen");
x=0;
y=0;
sprintf(text_disp,"ADDITION");
vid_print_string_alpha(50, 200, COLOR_WHITE, COLOR_BLACK, tahomabold_20,
display_global, text_disp);
sprintf(text_disp,"SUBTRACTION");
vid_print_string_alpha(200, 200, COLOR_WHITE, COLOR_BLACK, tahomabold_20, display_global, text_disp);
sprintf(text_disp,"LOGICAL AND");
vid_print_string_alpha(400, 200, COLOR_WHITE, COLOR_BLACK, tahomabold_20, display_global, text_disp);
sprintf(text_disp,"LOGICAL OR");
vid_print_string_alpha(600, 200, COLOR_WHITE, COLOR_BLACK, tahomabold_20, display_global, text_disp);
Touch_EmptyFifo(hTouch);
Touch_EmptyFifo(hTouch) is used to empty the touch input
5) The screen waits for the touch input in trigger area which will perform ALU functions.
For example:
if (touch == 0 && (x >= 50 && x<=150 )) //Trigger area
{
printf("I am in addition loop\n x=%d y = %d", x, y);// display statement on console for debugging