diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb index d1ae1a0..851686e 100644 --- a/common/hw-gfx-gma.adb +++ b/common/hw-gfx-gma.adb @@ -402,6 +402,40 @@ is ---------------------------------------------------------------------------- + procedure Backlight_On (Port : Active_Port_Type) + with + Refined_Global => (In_Out => Registers.Register_State) + is + begin + Panel.Backlight_On (Config_Helpers.To_Panel (Port)); + end Backlight_On; + + procedure Backlight_Off (Port : Active_Port_Type) + with + Refined_Global => (In_Out => Registers.Register_State) + is + begin + Panel.Backlight_Off (Config_Helpers.To_Panel (Port)); + end Backlight_Off; + + procedure Set_Brightness (Port : Active_Port_Type; Level : Word32) + with + Refined_Global => (In_Out => Registers.Register_State) + is + begin + Panel.Set_Backlight (Config_Helpers.To_Panel (Port), Level); + end Set_Brightness; + + procedure Get_Max_Brightness (Port : Active_Port_Type; Level : out Word32) + with + Refined_Global => (In_Out => Registers.Register_State) + is + begin + Panel.Get_Max_Backlight (Config_Helpers.To_Panel (Port), Level); + end Get_Max_Brightness; + + ---------------------------------------------------------------------------- + procedure Initialize (Write_Delay : in Word64 := 0; Clean_State : in Boolean := False; diff --git a/common/hw-gfx-gma.ads b/common/hw-gfx-gma.ads index 5c63942..afd1512 100644 --- a/common/hw-gfx-gma.ads +++ b/common/hw-gfx-gma.ads @@ -169,6 +169,24 @@ is ---------------------------------------------------------------------------- + procedure Backlight_On (Port : Active_Port_Type) + with + Global => (In_Out => Device_State); + + procedure Backlight_Off (Port : Active_Port_Type) + with + Global => (In_Out => Device_State); + + procedure Set_Brightness (Port : Active_Port_Type; Level : Word32) + with + Global => (In_Out => Device_State); + + procedure Get_Max_Brightness (Port : Active_Port_Type; Level : out Word32) + with + Global => (In_Out => Device_State); + + ---------------------------------------------------------------------------- + procedure Write_GTT (GTT_Page : GTT_Range; Device_Address : GTT_Address_Type;