Skip to content

Commit

Permalink
Fix incorrect line references in .rst file.
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveAtkinsonXMOS committed Jul 15, 2021
1 parent 345eae9 commit 87859df
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions examples/AN00129_hid_class/doc/rst/AN00129.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,9 @@ To start using the USB library, you need to add ``lib_xud`` to your ``Makefile``

USED_MODULES = ... lib_xud

You also have to add a define to the build to say which variant of the
USB library you want. In this case, the example is for the U-Series
USB library. So the following is in the ``Makefile``::
You can then access the USB functions in your source code via the xud_device.h header file::

XCC_FLAGS = ... -DXUD_SERIES_SUPPORT=XUD_U_SERIES

You can then access the USB functions in your source code via the usb.h header file::

#include <usb_device.h>
#include "xud_device.h"

The application main() function
...............................
Expand Down Expand Up @@ -197,7 +191,7 @@ USB HID Class requests
Inside ``endpoint0.xc`` there is a function for handling the USB HID device class specific requests. The code for handling these requests is shown as follows:

.. literalinclude:: endpoint0.xc
:lines: 167-224
:lines: 142-198

These HID specific requests are implemented by the application as they do not form part of the standard requests which have to be accepted by all device classes via endpoint0.

Expand All @@ -209,7 +203,7 @@ USB HID Class Endpoint0
The function ``Endpoint0()`` contains the code for dealing with device requests made from the host to the standard endpoint0 which is present in all USB devices. In addition to requests required for all devices, the code handles the requests specific to the HID class.

.. literalinclude:: endpoint0.xc
:lines: 260-306
:lines: 201-301

|newpage|

Expand All @@ -219,7 +213,7 @@ Reporting HID mouse data to the host
The application endpoint for reporting mouse movement data to the host machine is implemented in the file ``main.xc``. This is contained within the function ``hid_mouse()`` which is shown below:

.. literalinclude:: main.xc
:lines: 22-81
:lines: 24-80

From this you can see the following.

Expand Down

0 comments on commit 87859df

Please sign in to comment.