generic-keyboard.aadl 1.32 KB
Newer Older
julien.delange's avatar
julien.delange committed
1
2
3
4
5
package ocarina_drivers_generic_keyboard

public

with Base_Types;
6
with Deployment;
julien.delange's avatar
julien.delange committed
7
8
9

subprogram spg_generic_keyboard_init
properties
10
	Source_Language   => (C);
julien.delange's avatar
julien.delange committed
11
12
13
14
15
16
	Source_Name       => "__po_hi_driver_generic_keyboard_init";
end spg_generic_keyboard_init;


thread keyboard_poller
features
17
   key_pressed : out data port Base_Types::Integer;
julien.delange's avatar
julien.delange committed
18
19
20
21
22
23
24
25
26
27
end keyboard_poller;

thread implementation keyboard_poller.i
calls
	mycall : {
	  pspg : subprogram spg_generic_keyboard_poller;
	};
connections
   parameter pspg.key_pressed -> key_pressed;
properties
28
   Period => 100ms;
julien.delange's avatar
julien.delange committed
29
30
31
32
33
34
   Dispatch_Protocol => Periodic;
end keyboard_poller.i;


subprogram spg_generic_keyboard_poller
features
35
   key_pressed : out parameter Base_Types::Integer;
julien.delange's avatar
julien.delange committed
36
properties
37
	Source_Language   => (C);
julien.delange's avatar
julien.delange committed
38
	Source_Name       => "__po_hi_driver_generic_keyboard_poller";
julien.delange's avatar
julien.delange committed
39
40
41
42
end spg_generic_keyboard_poller;

abstract generic_keyboard_driver
features
43
   key_pressed : out data port Base_Types::Integer;
44
45
46
properties
   Deployment::Version  => "0.1beta";
   Deployment::Help     => "Write your ASN.1 configuration here";
julien.delange's avatar
julien.delange committed
47
48
49
50
51
52
53
54
55
56
57
58
end generic_keyboard_driver;


abstract implementation generic_keyboard_driver.i
subcomponents
   keyboard_receiver : thread       keyboard_poller.i;
connections
   port keyboard_receiver.key_pressed -> key_pressed;
end generic_keyboard_driver.i;


end ocarina_drivers_generic_keyboard;