Commit e21d0ffb authored by julien.delange's avatar julien.delange
Browse files

add keyboard driver



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@1343 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 4ecab7e7
......@@ -23,6 +23,24 @@ with ocarina_drivers_ip_pohic;
with ocarina_drivers_exarm_ni_6071e_analog;
with ocarina_drivers_exarm_ni_6071e_digital;
with ocarina_drivers_generic_keyboard;
----------------
-- Keyboard --
----------------
device generic_keyboard
features
key_pressed : out data port Base_Types::Character;
properties
Deployment::Driver_Name => "1553_rasta";
Device_Driver => classifier (ocarina_drivers_generic_keyboard::generic_keyboard_driver.i);
Initialize_Entrypoint => classifier (ocarina_drivers_generic_keyboard::spg_generic_keyboard_init);
end generic_keyboard;
device implementation generic_keyboard.linux
end generic_keyboard.linux;
------------------
-- RASTA 1553 --
------------------
......@@ -159,17 +177,17 @@ end rtems_ne2000.ip_pohic;
-- the Matlab simulator. --
------------------------------------------
device exarm
device exarm_ip
features
thebus : requires bus access ocarina_buses::ip.i;
end exarm;
end exarm_ip;
device implementation exarm.i
device implementation exarm_ip.vr_udp
properties
Deployment::Driver_Name => "exarm";
Device_Driver => classifier (ocarina_drivers_udp_exarm::driver.i);
Initialize_Entrypoint => classifier (ocarina_drivers_udp_exarm::init);
end exarm.i;
end exarm_ip.vr_udp;
data exarm_protocol_data
end exarm_protocol_data;
......
package ocarina_drivers_generic_keyboard
public
with Base_Types;
subprogram spg_generic_keyboard_init
properties
Source_Language => C;
Source_Name => "__po_hi_driver_generic_keyboard_init";
end spg_generic_keyboard_init;
thread keyboard_poller
features
key_pressed : out data port Base_Types::Character;
end keyboard_poller;
thread implementation keyboard_poller.i
calls
mycall : {
pspg : subprogram spg_generic_keyboard_poller;
};
connections
parameter pspg.key_pressed -> key_pressed;
properties
Period => 10ms;
Dispatch_Protocol => Periodic;
end keyboard_poller.i;
subprogram spg_generic_keyboard_poller
features
key_pressed : out parameter Base_Types::Character;
properties
Source_Language => C;
Source_Name => "__po_hi_sockets_receiver_task";
end spg_generic_keyboard_poller;
abstract generic_keyboard_driver
features
key_pressed : out data port Base_Types::Character;
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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment