Add documentation to onoffsim
This commit is contained in:
parent
9f308f035f
commit
e3393e6e7d
|
@ -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 |
|
||||
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue