2020-08-28 00:06:32 +08:00
|
|
|
.. _ps2-sample:
|
2019-09-05 08:30:36 +08:00
|
|
|
|
|
|
|
PS/2 Interface
|
|
|
|
####################################
|
|
|
|
|
|
|
|
Overview
|
|
|
|
********
|
|
|
|
|
2020-03-14 02:02:31 +08:00
|
|
|
This sample demonstrates how to use the :ref:`PS/2 API <ps2_api>`.
|
2019-09-05 08:30:36 +08:00
|
|
|
Callbacks are registered that will write to the console indicating PS2 events.
|
|
|
|
These events indicate mouse configuration responses and mouse interaction.
|
|
|
|
|
|
|
|
Building and Running
|
|
|
|
********************
|
|
|
|
|
|
|
|
The sample can be built and executed on boards supporting PS/2.
|
2020-09-08 23:35:16 +08:00
|
|
|
It requires a correct fixture setup. Please connect a PS/2 mouse in order to
|
|
|
|
exercise the functionality.
|
2021-01-14 02:08:34 +08:00
|
|
|
For the correct execution of that sample in twister, add into boards's
|
2020-09-08 23:35:16 +08:00
|
|
|
map-file next fixture settings::
|
|
|
|
|
|
|
|
- fixture: fixture_connect_mouse
|
2019-09-05 08:30:36 +08:00
|
|
|
|
|
|
|
Sample output
|
|
|
|
=============
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
PS/2 test with mouse
|
|
|
|
Note: You are expected to see several interrupts
|
|
|
|
as you configure/move the mouse!
|