]> git.donarmstrong.com Git - qmk_firmware.git/blob - protocol/lufa/LUFA-120730/LUFA/DoxygenPages/WritingBoardDrivers.txt
Squashed 'tmk_core/' content from commit 05caacc
[qmk_firmware.git] / protocol / lufa / LUFA-120730 / LUFA / DoxygenPages / WritingBoardDrivers.txt
1 /** \file\r
2  *\r
3  *  This file contains special DoxyGen information for the generation of the main page and other special\r
4  *  documentation pages. It is not a project source file.\r
5  */\r
6 \r
7 /** \page Page_WritingBoardDrivers Writing LUFA Board Drivers\r
8  *\r
9  *  LUFA ships with several basic pre-made board drivers, to control hardware present on the supported board\r
10  *  hardware - such as Dataflash ICs, LEDs, Joysticks, or other hardware peripherals. When compiling an application\r
11  *  which makes use of one or more board drivers located in LUFA/Drivers/Board, you must also indicate what board\r
12  *  hardware you are using in your project makefile. This is done by defining the BOARD macro using the -D switch\r
13  *  passed to the compiler, with a constant of BOARD_{Name}. For example <b>-DBOARD=BOARD_USBKEY</b> instructs the\r
14  *  compiler to use the USBKEY board hardware drivers.\r
15  *\r
16  *  If your application does not use *any* board level drivers, you can omit the definition of the BOARD macro.\r
17  *  However, some users may wish to write their own custom board hardware drivers which are to remain compatible\r
18  *  with the LUFA hardware API. To do this, the BOARD macro should be defined to the value BOARD_USER. This indicates\r
19  *  that the board level drivers should be located in a folder named "Board" located inside the application's folder.\r
20  *\r
21  *  When used, the driver stub files located in the LUFA/CodeTemplates/DriverStubs folder should be copied to the user\r
22  *  Board/ directory, and fleshed out to include the values and code needed to control the custom board hardware. Once\r
23  *  done, the existing LUFA board level APIs (accessed in the regular LUFA/Drivers/Board/ folder) will redirect to the\r
24  *  user board drivers, maintaining code compatibility and allowing for a different board to be selected through the\r
25  *  project makefile with no code changes.\r
26  */\r
27 \r