aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/Board/LEDs.h
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Drivers/Board/LEDs.h')
-rw-r--r--LUFA/Drivers/Board/LEDs.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/LUFA/Drivers/Board/LEDs.h b/LUFA/Drivers/Board/LEDs.h
index a898be28b..b05d55cf8 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
+ *
* @{
*/