Generic touch controller abstraction layer for bare-metal Ada applications.
touch_generic provides a hardware-independent touch controller interface for embedded systems. It abstracts capacitive touch controllers (like FT5336) through generic instantiation, supporting multi-touch with up to 10 simultaneous touch points.
- Hardware-agnostic touch controller abstraction
- Multi-touch support (up to 10 simultaneous points)
- Touch point coordinates and weight/pressure
- Coordinate transformation (invert X/Y, swap XY)
- Interrupt or polling modes
- Zero runtime overhead through generic instantiation
package Touch_Types is
type Touch_State is record
X : Natural;
Y : Natural;
Weight : Natural;
end record;
subtype Touch_Identifier is Natural range 0 .. 10;
type Touch_Array is array (Touch_Identifier range <>) of Touch_State;
type Swap_State is record
Invert_X : Boolean := False;
Invert_Y : Boolean := False;
Swap_XY : Boolean := False;
end record;
end Touch_Types;generic
with procedure Driver_Set_Use_Interrupts (Enabled : Boolean);
with function Driver_Active_Touch_Points return Touch_Identifier;
with function Driver_Get_Touch_Point (Id : Touch_Identifier) return Touch_State;
package Touch_Interface is
procedure Initialize (Enable_Interrupts : Boolean := False);
function Active_Touch_Points return Touch_Identifier;
function Get_Touch_Point (Id : Touch_Identifier) return Touch_State;
function Get_All_Touch_Points return Touch_Array;
end Touch_Interface;[[depends-on]]
touch_generic = "^0.1.0"ft5336- FT5336 capacitive touch controller drivergesture- Touch gesture recognition
MIT OR Apache-2.0 WITH LLVM-exception