hdo
beta
|
Zobrazit zdrojový text tohoto souboru.
Funkce | |
unsigned char | LED_Configure (unsigned int led) |
unsigned char | LED_Set (unsigned int led) |
unsigned char | LED_Clear (unsigned int led) |
unsigned char | LED_Toggle (unsigned int led) |
Purpose
Small set of functions for simple and portable LED usage.
Usage
LEDs are numbered starting from 0; the number of LEDs depend on the board being used. All the functions defined here will compile properly regardless of whether the LED is defined or not; they will simply return 0 when a LED which does not exist is given as an argument. Also, these functions take into account how each LED is connected on to board; thus, "LED_Set" might change the level on the corresponding pin to 0 or 1, but it will always light the LED on; same thing for the other methods.
Definice v souboru led.h.
unsigned char LED_Clear | ( | unsigned int | led | ) |
Turns a LED off.
led | Number of the LED to turn off. |
Definice je uvedena na řádku 108 v souboru led.c.
Odkazuje se na PIO_OUTPUT_0.
unsigned char LED_Configure | ( | unsigned int | led | ) |
unsigned char LED_Set | ( | unsigned int | led | ) |
Turns the given LED on if it exists; otherwise does nothing.
led | Number of the LED to turn on. |
Definice je uvedena na řádku 78 v souboru led.c.
Odkazuje se na PIO_OUTPUT_0.
unsigned char LED_Toggle | ( | unsigned int | led | ) |