Skip to content

Commit a186b9c

Browse files
committed
Add missing dac7678 init, fix pinModeAlt documentation, add constants for pinModeAlt
1 parent 3f15fa6 commit a186b9c

4 files changed

Lines changed: 225 additions & 196 deletions

File tree

DOCUMENTATION.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,23 @@ This is an un-documented special to let you set any pin to any mode.
136136

137137
`mode` can be one of the following values:
138138

139-
* `WPI_MODE_PINS`
140-
<span class="api-info-list"><code> >= 1.0.0 </code></span>
141-
* `WPI_MODE_PHYS`
142-
<span class="api-info-list"><code> >= 1.0.0 </code></span>
143-
* `WPI_MODE_GPIO`
144-
<span class="api-info-list"><code> >= 1.0.0 </code></span>
145-
139+
* `FSEL_INPT`
140+
<span class="api-info-list"><code> >= 2.1.0 </code></span>
141+
* `FSEL_OUTP`
142+
<span class="api-info-list"><code> >= 2.1.0 </code></span>
143+
* `FSEL_ALT0`
144+
<span class="api-info-list"><code> >= 2.1.0 </code></span>
145+
* `FSEL_ALT1`
146+
<span class="api-info-list"><code> >= 2.1.0 </code></span>
147+
* `FSEL_ALT2`
148+
<span class="api-info-list"><code> >= 2.1.0 </code></span>
149+
* `FSEL_ALT3`
150+
<span class="api-info-list"><code> >= 2.1.0 </code></span>
151+
* `FSEL_ALT4`
152+
<span class="api-info-list"><code> >= 2.1.0 </code></span>
153+
* `FSEL_ALT5`
154+
<span class="api-info-list"><code> >= 2.1.0 </code></span>
155+
146156
### pinMode(pin, mode)
147157
<span class="api-info"><code> >= 0.1.0 </code></span>
148158

@@ -176,7 +186,7 @@ If you need to change the pin mode, the you can do it with the gpio program in a
176186
<span class="api-info-list"><code> >= 1.1.0 </code></span>
177187
* `SOFT_TONE_OUTPUT`
178188
<span class="api-info-list"><code> >= 1.1.0 </code></span>
179-
189+
180190
### pullUpDnControl(pin, pud)
181191
<span class="api-info"><code> >= 0.2.0 </code></span>
182192

@@ -194,7 +204,7 @@ The internal pull up/down resistors have a value of approximately 50KΩ on the R
194204
<span class="api-info-list"><code> >= 0.2.0 </code></span>
195205
* `PUD_UP` *pull to 3.3v*
196206
<span class="api-info-list"><code> >= 0.2.0 </code></span>
197-
207+
198208
### digitalRead(pin)
199209
<span class="api-info"><code> >= 0.1.1 </code></span>
200210

@@ -258,7 +268,7 @@ Gives up and returns 0 if no pulse starts within a specified time out.
258268
<span class="api-info-list"><code> >= 0.1.2 </code></span>
259269
* `LOW`
260270
<span class="api-info-list"><code> >= 0.1.2 </code></span>
261-
271+
262272
### delay(milliseconds)
263273
<span class="api-info"><code> >= 1.1.0 </code></span>
264274

@@ -437,7 +447,7 @@ The mark:space mode is traditional, however the default mode in the Pi is “bal
437447

438448
* `PWM_MODE_BAL` *balanced*
439449
* `PWM_MODE_MS` *mark:space*
440-
450+
441451
### pwmSetRange(range)
442452
<span class="api-info"><code> >= 0.1.1 </code></span>
443453

@@ -567,7 +577,7 @@ The return value is the file descriptor or -1 for any error, in which case errno
567577

568578
**NOTE: The file descriptor (fd) returned is a standard Linux file descriptor.**
569579

570-
**You can use the standard read(), write(), etc. system calls on this file descriptor as required.**
580+
**You can use the standard read(), write(), etc. system calls on this file descriptor as required.**
571581

572582
**E.g. you may wish to write a larger block of binary data where the serialPutchar() or serialPuts() function may not be the most appropriate function to use, in which case, you can use write() to send the data.**
573583

src/extensions/extensions.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "extensions.h"
22

3+
#include "dac7678.h"
34
#include "drcSerial.h"
45
#include "max5322.h"
56
#include "max31855.h"
@@ -19,6 +20,7 @@
1920
#include "pca9685.h"
2021

2122
IMPLEMENT_EXPORT_INIT(extensions) {
23+
INIT(dac7678);
2224
INIT(drcSerial);
2325
INIT(max5322);
2426
INIT(max31855);
@@ -35,4 +37,4 @@ IMPLEMENT_EXPORT_INIT(extensions) {
3537
INIT(pcf8591);
3638
INIT(sr595);
3739
INIT(pca9685);
38-
}
40+
}

0 commit comments

Comments
 (0)