forked from mirror/qmk_firmware
Added basic driver example use code to the library documentation.
Made the USARTStream global public and documented in the SerialStream module, allowing for the serial USART stream to be accessed via its handle rather than via the implicit stdout and stdin streams.
This commit is contained in:
@@ -68,6 +68,29 @@
|
||||
* compatible code for a board with no LEDs by making a board LED driver (see \ref Page_WritingBoardDrivers)
|
||||
* which contains only stub functions and defines no LEDs.
|
||||
*
|
||||
* <b>Example Usage:</b>
|
||||
* \code
|
||||
* // Initialise the board LED driver before first use
|
||||
* LEDs_Init();
|
||||
*
|
||||
* // Turn on each of the four LEDs in turn
|
||||
* LEDs_SetAllLEDs(LEDS_LED1);
|
||||
* _delay_ms(500);
|
||||
* LEDs_SetAllLEDs(LEDS_LED1);
|
||||
* _delay_ms(500);
|
||||
* LEDs_SetAllLEDs(LEDS_LED1);
|
||||
* _delay_ms(500);
|
||||
* LEDs_SetAllLEDs(LEDS_LED1);
|
||||
* _delay_ms(500);
|
||||
*
|
||||
* // Turn on all LEDs
|
||||
* LEDs_SetAllLEDs(LEDS_ALL_LEDS);
|
||||
* _delay_ms(1000);
|
||||
*
|
||||
* // Turn on LED 1, turn off LED 2, leaving LEDs 3 and 4 in their current state
|
||||
* LEDs_ChangeLEDs((LEDS_LED1 | LEDS_LED2), LEDS_LED1);
|
||||
* \endcode
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user