Gamebit/src/gamebit-lcd.ads

37 lines
902 B
Ada

with MicroBit;
with MicroBit.SPI;
with MicroBit.Time;
with ST7735R; use ST7735R;
with HAL.Bitmap;
package Gamebit.LCD is
Height : constant Positive := 160;
Width : constant Positive := 128;
Screen : ST7735R.ST7735R_Screen (
Port => MicroBit.SPI.Controller,
CS => MicroBit.MB_P16'Access,
RS => MicroBit.MB_P12'Access,
RST => MicroBit.MB_P8'Access,
Time => MicroBit.Time.HAL_Delay);
Initialized : Boolean := False;
procedure Initialize;
procedure On
with Pre => Initialized;
procedure Off
with Pre => Initialized;
function Framebuffer return HAL.Bitmap.Any_Bitmap_Buffer
with Pre => Initialized;
procedure Update
with Pre => Initialized;
end Gamebit.LCD;