Show
Ignore:
Timestamp:
08/05/08 21:01:24 (5 months ago)
Author:
liamstask
Message:

- updated LED documentation

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • firmware/trunk/core/makingthings/led.c

    r771 r780  
    4040static int Led_Stop( void ); 
    4141 
    42 /** LED 
    43 * This whole thing needs to run on timers and events so that the LED can  
    44 * be asked to flash at various times 
    45 */ 
    46  
    4742/** \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. 
    4944  There are two LEDs on the MAKE Controller Board - one green and one red.  The red LED is simply 
    5045  a power indicator and cannot be controlled by the Controller.  The green LED can be used for 
     
    5954  @param state An integer specifying the active state of the LED system - 1 (on) or 0 (off). 
    6055  @return Zero on success. 
     56   
     57  \b Example 
     58  \code 
     59  // enable the LED system 
     60  Led_SetActive(1); 
     61  \endcode 
    6162*/ 
    6263int Led_SetActive( int state ) 
     
    7172  Read the active state of the LED system. 
    7273  @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 
    7387*/ 
    7488int Led_GetActive( ) 
     
    8195  @param state An integer specifying the state - on (1) or off (0). 
    8296  @return 0 on success. 
     97   
     98  \b Example 
     99  \code 
     100  // turn the LED on 
     101  Led_SetState(1); 
     102  \endcode 
    83103*/ 
    84104int Led_SetState( int state ) 
     
    97117  Read the state of the LED on the MAKE Controller Board. 
    98118  @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 
    99132*/ 
    100133int Led_GetState( )