REVISION
Definition in file sys_led.h.
#include "stdio.h"
#include "stdlib.h"
#include "sys_cpld.h"
Include dependency graph for sys_led.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Enumerations | |
| enum | LED_ID { HISI_LED, KBD_LED, ALL_LED, invalid_LED } |
| LED ID definitions. More... | |
| enum | LED_MODE { LED_ON, LED_OFF } |
| LED on off mode definitions. More... | |
Functions | |
| void | SYS_blinkLEDs (LED_ID, int, int) |
| Function blinks specified LED in given mode. | |
| void | SYS_onOffLEDs (LED_ID, LED_MODE) |
| Funtion is to turn on or off the specified LED, write to port to turn on LED, read from port to turn off LED. | |
|
|
LED ID definitions.
Definition at line 34 of file sys_led.h. 00035 {
00038 HISI_LED,
00039
00042 KBD_LED,
00043
00046 ALL_LED,
00047
00050 invalid_LED
00051 } LED_ID;
|
|
|
LED on off mode definitions.
Definition at line 56 of file sys_led.h. 00057 {
00060 LED_ON,
00061
00064 LED_OFF
00065
00066 } LED_MODE;
|
|
||||||||||||||||
|
Function blinks specified LED in given mode.
Definition at line 38 of file SYS_led.c. References LED_OFF, LED_ON, SYS_delayMicrosecond(), and SYS_onOffLEDs(). 00039 {
00040 unsigned long delay = iPeriod*1000; // Convert to micro seconds.
00041
00042 if(iCounter == -1)
00043 {
00044 while(1)
00045 {
00046 SYS_onOffLEDs(ledID, LED_ON);
00047
00048 SYS_delayMicrosecond(delay);
00049
00050 SYS_onOffLEDs(ledID, LED_OFF);
00051
00052 SYS_delayMicrosecond(delay);
00053 }
00054 }
00055
00056 while(iCounter--)
00057 {
00058 SYS_onOffLEDs(ledID, LED_ON);
00059
00060 SYS_delayMicrosecond(delay);
00061
00062 SYS_onOffLEDs(ledID, LED_OFF);
00063
00064 SYS_delayMicrosecond(delay);
00065 }
00066 }
|
Here is the call graph for this function:

|
||||||||||||
|
Funtion is to turn on or off the specified LED, write to port to turn on LED, read from port to turn off LED.
Definition at line 79 of file SYS_led.c. References ALL_LED, HISI_LED, and KBD_LED. Referenced by SYS_blinkLEDs(), SYS_kickoff(), SYS_main(), SYS_SF_idle(), UI_MSF_backlight(), UI_PSF_null(), and UI_PSF_sleep(). 00080 {
00081 int tmp;
00082
00083 switch(ledID)
00084 {
00085 case HISI_LED: // HiSi LED.
00086
00087 if(onOff == LED_ON) LED_KBD_HISI = 0;
00088 else tmp = LED_KBD_HISI;
00089
00090 break;
00091
00092 case KBD_LED: // The rest of the LEDs.
00093
00094 if(onOff == LED_ON) LED_KBD_ALL = 0;
00095 else tmp = LED_KBD_ALL;
00096
00097 break;
00098
00099 case ALL_LED: // All LEDs.
00100 default:
00101
00102 if(onOff == LED_ON)
00103 {
00104 LED_KBD_ALL = 0;
00105 LED_KBD_HISI = 0;
00106 }
00107
00108 else
00109 {
00110 tmp = LED_KBD_ALL;
00111 tmp = LED_KBD_HISI;
00112 }
00113
00114 break;
00115 }
00116 }
|
1.3.9.1