Show
Ignore:
Timestamp:
08/11/08 13:16:57 (5 months ago)
Author:
liamstask
Message:

- grr, managed to get 1.5.0 out the door with some compile warnings still in there. now stamped out of io.c/.h

Files:
1 modified

Legend:

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

    r792 r808  
    5757static void Io_Init( void ); 
    5858static void Io_Deinit( void ); 
    59 static int Io_SetActive( int index, int value ); 
    60 static int Io_GetActive( int index ); 
    6159static int Io_SetOutput( int index ); 
    6260static int Io_SetInput( int index ); 
     
    253251} 
    254252 
    255 // static 
    256 int Io_SetActive( int index, int value ) 
    257 { 
    258   if ( value ) 
    259     return Io_Start( index, false ); 
    260   else 
    261     return Io_Stop( index ); 
    262   return CONTROLLER_OK; 
    263 } 
    264  
    265 // static 
    266 int Io_GetActive( int index ) 
     253/** 
     254  Read whether an IO pin is in use. 
     255  @param index An int specifying which IO line.  Use the appropriate entry from the \ref IoIndices 
     256  @param output Specify 1 for an output, or 0 for an input. 
     257  @return non-zero if active, 0 if inactive 
     258   
     259  \b Example 
     260  \code 
     261  if( Io_GetActive( IO_PA23 ) ) 
     262  { 
     263    // it's already active 
     264  } 
     265  else 
     266  { 
     267    // not yet active 
     268  } 
     269  \endcode 
     270*/ 
     271bool Io_GetActive( int index ) 
    267272{ 
    268273  if ( index < 0 || index > IO_PIN_COUNT ) 
     
    941946  switch ( property ) 
    942947  { 
    943     case 0:  
    944       Io_SetActive( index, value ); 
     948    case 0: 
     949      if(value) 
     950        Io_Start( index, false ); 
     951      else 
     952        Io_Stop( index ); 
    945953      break;       
    946954    case 1: