upload
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
Это архивный репозиторий. Вы можете его клонировать или просматривать файлы, но не вносить изменения или открывать задачи/запросы на слияние.

WritingBoardDrivers.txt 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /** \file
  2. *
  3. * This file contains special DoxyGen information for the generation of the main page and other special
  4. * documentation pages. It is not a project source file.
  5. */
  6. /** \page Page_WritingBoardDrivers Writing LUFA Board Drivers
  7. *
  8. * LUFA ships with several basic pre-made board drivers, to control hardware present on the supported board
  9. * hardware - such as Dataflash ICs, LEDs, Joysticks, or other hardware peripherals. When compiling an application
  10. * which makes use of one or more board drivers located in <i>LUFA/Drivers/Board</i>, you must also indicate which
  11. * board hardware you are using in your project makefile. This is done by defining the <tt>BOARD</tt> macro using
  12. * the <tt>-D</tt> switch passed to the compiler, with a constant of <tt>BOARD_{Name}</tt>. For example,
  13. * <tt>-DBOARD=BOARD_USBKEY</tt> instructs the compiler to use the USBKEY board hardware drivers.
  14. *
  15. * If your application does not use <i>any</i> board level drivers, you can omit the definition of the <tt>BOARD</tt>
  16. * macro. However, some users may wish to write their own custom board hardware drivers which are to remain compatible
  17. * with the LUFA hardware API. To do this, the <tt>BOARD</tt> macro should be defined to the value <tt>BOARD_USER</tt>.
  18. * This indicates that the board level drivers should be located in a folder named "Board" located inside the
  19. * application's folder.
  20. *
  21. * When used, the driver stub files located in the <tt>LUFA/CodeTemplates/DriverStubs</tt> folder should be copied to
  22. * the user application's <tt>Board/</tt> directory, and filled out to include the values and code needed to control
  23. * the custom board hardware. Once done, the existing LUFA board level APIs (accessed in the regular
  24. * <tt>LUFA/Drivers/Board/</tt> folder) will redirect to the user board drivers, maintaining code compatibility and
  25. * allowing for a different board to be selected through the project makefile with no code changes.
  26. *
  27. * \section Sec_BoardTemplates Board Driver Templates
  28. *
  29. * The templates for each board driver are reproduced below.
  30. *
  31. * \subsection SSec_BoardTemplates_Board Template for USER <Board/Board.h>
  32. * \include "DriverStubs/Board.h"
  33. *
  34. * \subsection SSec_BoardTemplates_Buttons Template for USER <Board/Buttons.h>
  35. * \include "DriverStubs/Buttons.h"
  36. *
  37. * \subsection SSec_BoardTemplates_Dataflash Template for USER <Board/Dataflash.h>
  38. * \include "DriverStubs/Dataflash.h"
  39. *
  40. * \subsection SSec_BoardTemplates_Joystick Template for USER <Board/Joystick.h>
  41. * \include "DriverStubs/Joystick.h"
  42. *
  43. * \subsection SSec_BoardTemplates_LEDs Template for USER <Board/LEDs.h>
  44. * \include "DriverStubs/LEDs.h"
  45. */