Changeset 784 for firmware/trunk/libraries/digitalout/digitalout.c
- Timestamp:
- 08/05/08 21:49:41 (5 months ago)
- Files:
-
- 1 modified
-
firmware/trunk/libraries/digitalout/digitalout.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
firmware/trunk/libraries/digitalout/digitalout.c
r771 r784 89 89 If you've previously used any of the other systems on the outputs (steppers, motors, etc.), you'll need 90 90 to set them to \b inactive to unlock the IO lines and use the Digital Outs. 91 92 See the <a href="http://www.makingthings.com/documentation/tutorial/application-board-overview/digital-outputs"> 93 Digital Out section</a> of the Application Board overview for more details. 91 94 * \ingroup Libraries 92 95 * @{ … … 94 97 95 98 /** 96 Sets whether the specified Digital Out is active.97 This is automatically called, setting the channel active, the first time DigitalOut_SetValue() is called. \n99 Enable or disable a DigitalOut. 100 This is automatically called, setting the channel active, the first time DigitalOut_SetValue() is called. 98 101 However, the channel must be explicitly set to inactive in order for any other devices to access the I/O lines. 99 102 @param index An integer specifying which Digital Out (0-7). 100 103 @param state An integer specifying the state - on (1) or off (0). 101 104 @return Zero on success. 105 106 \b Example 107 \code 108 // Enable DigitalOut 6 109 DigitalOut_SetActive( 6, 1 ); 110 \endcode 102 111 */ 103 112 int DigitalOut_SetActive( int index, int state ) … … 113 122 114 123 /** 115 Re turns the availability of the Digital Out I/O lines.124 Read whether a DigitalOut is active. 116 125 @param index An integer specifying which Digital Out (0-7). 117 @return State - on (1) or off (0). 126 @return Nonzero when active, 0 when inactive 127 128 \b Example 129 \code 130 if( DigitalOut_GetActive( 5 ) ) 131 { 132 // DigitalOut 5 is active 133 } 134 else 135 { 136 // DigitalOut 5 is inactive 137 } 138 \endcode 118 139 */ 119 140 int DigitalOut_GetActive( int index ) … … 125 146 126 147 /** 127 Turn a Digital Out on or off on the MAKE Application Board.148 Turn a Digital Out on or off. 128 149 @param index An integer specifying which Digital Out (0-7). 129 150 @param state An integer specifying the state - on (1) or off (0). 130 151 @return Zero on success. 152 153 \b Example 154 \code 155 // Turn digital out 2 on 156 DigitalOut_SetValue( 2, 1 ); 157 \endcode 131 158 */ 132 159 int DigitalOut_SetValue( int index, int state ) … … 152 179 153 180 /** 154 Read the value of a Digital Out on the Make Application Board.181 Read whether a DigitalOut is on or off. 155 182 @param index An integer specifying which Digital Out (0-7). 156 183 @return The value - on (1) or off (0). 184 185 \b Example 186 \code 187 if( DigitalOut_GetValue( 2 ) ) 188 { 189 // DigitalOut 2 is high 190 } 191 else 192 { 193 // DigitalOut 2 is low 194 } 195 \endcode 157 196 */ 158 197 int DigitalOut_GetValue( int index )
