Changeset 780
- Timestamp:
- 08/05/08 21:01:24 (4 months ago)
- Files:
-
- 1 modified
-
firmware/trunk/core/makingthings/led.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
firmware/trunk/core/makingthings/led.c
r771 r780 40 40 static int Led_Stop( void ); 41 41 42 /** LED43 * This whole thing needs to run on timers and events so that the LED can44 * be asked to flash at various times45 */46 47 42 /** \defgroup Led LED 48 The Led subsystem controls the single green LED on the MAKE Controller Board.43 Controls the single green LED on the MAKE Controller Board. 49 44 There are two LEDs on the MAKE Controller Board - one green and one red. The red LED is simply 50 45 a power indicator and cannot be controlled by the Controller. The green LED can be used for … … 59 54 @param state An integer specifying the active state of the LED system - 1 (on) or 0 (off). 60 55 @return Zero on success. 56 57 \b Example 58 \code 59 // enable the LED system 60 Led_SetActive(1); 61 \endcode 61 62 */ 62 63 int Led_SetActive( int state ) … … 71 72 Read the active state of the LED system. 72 73 @return State - 1/non-zero (on) or 0 (off). 74 75 \b Example 76 \code 77 int enabled = Led_GetActive(); 78 if(enabled) 79 { 80 // then we're enabled 81 } 82 else 83 { 84 // not enabled 85 } 86 \endcode 73 87 */ 74 88 int Led_GetActive( ) … … 81 95 @param state An integer specifying the state - on (1) or off (0). 82 96 @return 0 on success. 97 98 \b Example 99 \code 100 // turn the LED on 101 Led_SetState(1); 102 \endcode 83 103 */ 84 104 int Led_SetState( int state ) … … 97 117 Read the state of the LED on the MAKE Controller Board. 98 118 @return State - 1/non-zero (on) or 0 (off). 119 120 \b Example 121 \code 122 int led_on = Led_GetState(); 123 if(led_on) 124 { 125 // the LED is on 126 } 127 else 128 { 129 // the LED is off 130 } 131 \endcode 99 132 */ 100 133 int Led_GetState( )
