* Examples / LCD_Demo clean-up. Closing #2 as all its objectives have reached

This commit is contained in:
Vovanium 2021-11-18 19:33:12 +03:00
parent e1d2989d40
commit d57bbccefa
1 changed files with 10 additions and 10 deletions

View File

@ -1,3 +1,12 @@
--
-- This example runs simple demo on the LCD screen.
-- It uses
-- * SPI to configure LCD internal controller,
-- * FMC to store frame buffer,
-- * LTDC to feed the pixeld in, and
-- * DMA2D to draw.
-- Also UART is used to output technical data while initialized
with Ada.Real_Time;
use Ada.Real_Time;
@ -5,11 +14,6 @@ with Board.LCD.SPI_IO;
with Board.LCD.Controller;
with Board.UART.IO;
with Chip;
with Chip.Units;
with STM32.Graphics;
with System.Storage_Elements;
use type System.Storage_Elements.Storage_Offset;
@ -17,15 +21,13 @@ with Pixels, Init_Layer, Put_Frequencies;
with Blit;
procedure LCD_Demo is
Now : Time := Clock;
C : Integer := 0;
Now : Time := Clock;
Frame : constant Pixels.Pixel_Array_Access := new Pixels.Pixel_Array (0 .. 319, 0 .. 239);
begin
Put_Frequencies;
Board.LCD.SPI_IO.Initialize_RGB_Interface;
Board.LCD.Controller.Set_Background(0, 0, 0);
Init_Layer (Frame);
@ -69,8 +71,6 @@ begin
loop
Blit.Copy_Rect (Frame.all, 100, 200, 100, 200, 102, 102);
--Board.LCD.Controller.Set_Background(C, 255 - C, 255 - C);
C := (C + 1) mod 256;
Now := Now + Milliseconds (25);
delay until Now;
end loop;