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:
Dean Camera 2010-12-26 14:25:34 +00:00
parent 39ac72f2d1
commit 2073b96d82
18 changed files with 266 additions and 23 deletions

View file

@ -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
*
* @{
*/