Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save victoredwardocallaghan/63ae85bc60b8be2aac16 to your computer and use it in GitHub Desktop.

Select an option

Save victoredwardocallaghan/63ae85bc60b8be2aac16 to your computer and use it in GitHub Desktop.
└──╼ cat device_chip.ads
--
-- Copyright (C) 2014 Edward O'Callaghan <[email protected]>
--
--
-- Each Driver implements a concrete realisation of the Chip interface.
-- This constitutes a "Class" of Chips that are enumerated from the devicetree.
--
package Device_Chip is
--
-- XXX
type Device_Type is null record;
type Device_Access_Type is access Device_Type;
--
--
type Chip is interface;
procedure Enable_Device (Device : in Device_Access_Type) is abstract;
procedure Initialise (C : in Chip) is abstract;
procedure Finalise (C : in Chip) is abstract;
procedure Set_Name (N : in String);
private
Name : String := "??"; -- XXX
end Device_Chip;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment