Add documentation to onoffsim

This commit is contained in:
mmcwilliams 2017-09-17 15:20:38 -04:00
parent 9f308f035f
commit e3393e6e7d
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,21 @@
<a name="onoffsim"></a>
## onoffsim
Object representing a fake onoff Gpio class
**Kind**: global constant
<a name="onoffsim.Gpio"></a>
### onoffsim.Gpio(no, dir, additional) ⇒ <code>object</code>
Gpio() -
Create's a Gpio class in the case of running on a dev machine
**Kind**: static method of [<code>onoffsim</code>](#onoffsim)
**Returns**: <code>object</code> - Fake Gpio object
| Param | Type | Description |
| --- | --- | --- |
| no | <code>integer</code> | Number of the GPIO pin |
| dir | <code>string</code> | Dirction of the pin, 'input' or 'output' |
| additional | <code>string</code> | Additional instructions for the GPIO pin, for 'input' type |

View File

@ -1,6 +1,16 @@
'use strict'
/** Object representing a fake onoff Gpio class */
const onoffsim = {
/**
* Gpio() -
* Returns a Gpio class in the case of running on a dev machine
*
* @param {integer} no Number of the GPIO pin
* @param {string} dir Dirction of the pin, 'input' or 'output'
* @param {string} additional Additional instructions for the GPIO pin, for 'input' type
* @returns {object} Fake Gpio object
*/
Gpio : function (no, dir = 'in', additional = 'none') {
//
return {