diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-12-26 14:25:34 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-12-26 14:25:34 +0000 |
| commit | beda2c5f54a97c4e76c648120d2212705189a906 (patch) | |
| tree | 680767a0fba855e26799e392a59d4b0b6d8be4df /LUFA/Drivers/Board/LEDs.h | |
| parent | 0a7816059e8606337381c8d9c70f3f0bb68da52e (diff) | |
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.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1615 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers/Board/LEDs.h')
| -rw-r--r-- | LUFA/Drivers/Board/LEDs.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/LUFA/Drivers/Board/LEDs.h b/LUFA/Drivers/Board/LEDs.h index a898be28..b05d55cf 100644 --- a/LUFA/Drivers/Board/LEDs.h +++ b/LUFA/Drivers/Board/LEDs.h @@ -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 + * * @{ */ |
