wiringpi 2.0.0 → 2.32.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/ext/wiringpi/WiringPi/devLib/maxdetect.c +100 -27
  3. data/ext/wiringpi/WiringPi/devLib/maxdetect.h +0 -0
  4. data/ext/wiringpi/WiringPi/devLib/scrollPhat.c +430 -0
  5. data/ext/wiringpi/WiringPi/devLib/scrollPhat.h +39 -0
  6. data/ext/wiringpi/WiringPi/devLib/scrollPhatFont.h +544 -0
  7. data/ext/wiringpi/WiringPi/examples/PiFace/ladder.c +0 -0
  8. data/ext/wiringpi/WiringPi/examples/max31855.c +60 -0
  9. data/ext/wiringpi/WiringPi/examples/rht03.c +32 -15
  10. data/ext/wiringpi/WiringPi/examples/scrollPhat/scphat.c +230 -0
  11. data/ext/wiringpi/WiringPi/examples/scrollPhat/test.c +115 -0
  12. data/ext/wiringpi/WiringPi/gpio/gpio.c +88 -37
  13. data/ext/wiringpi/WiringPi/gpio/readall.c +41 -9
  14. data/ext/wiringpi/WiringPi/gpio/version.h +1 -1
  15. data/ext/wiringpi/WiringPi/wiringPi/ads1115.c +293 -0
  16. data/ext/wiringpi/WiringPi/wiringPi/ads1115.h +55 -0
  17. data/ext/wiringpi/WiringPi/wiringPi/drcSerial.c +4 -9
  18. data/ext/wiringpi/WiringPi/wiringPi/max31855.c +41 -23
  19. data/ext/wiringpi/WiringPi/wiringPi/max5322.c +2 -2
  20. data/ext/wiringpi/WiringPi/wiringPi/mcp23008.c +2 -2
  21. data/ext/wiringpi/WiringPi/wiringPi/mcp23016.c +2 -2
  22. data/ext/wiringpi/WiringPi/wiringPi/mcp23017.c +2 -2
  23. data/ext/wiringpi/WiringPi/wiringPi/mcp23s08.c +3 -4
  24. data/ext/wiringpi/WiringPi/wiringPi/mcp23s17.c +3 -4
  25. data/ext/wiringpi/WiringPi/wiringPi/mcp3002.c +2 -2
  26. data/ext/wiringpi/WiringPi/wiringPi/mcp3004.c +2 -2
  27. data/ext/wiringpi/WiringPi/wiringPi/mcp3422.c +33 -18
  28. data/ext/wiringpi/WiringPi/wiringPi/mcp3422.h +6 -6
  29. data/ext/wiringpi/WiringPi/wiringPi/mcp4802.c +2 -2
  30. data/ext/wiringpi/WiringPi/wiringPi/pcf8574.c +2 -2
  31. data/ext/wiringpi/WiringPi/wiringPi/pcf8591.c +2 -2
  32. data/ext/wiringpi/WiringPi/wiringPi/sn3218.c +2 -2
  33. data/ext/wiringpi/WiringPi/wiringPi/sr595.c +1 -1
  34. data/ext/wiringpi/WiringPi/wiringPi/wiringPi.c +418 -132
  35. data/ext/wiringpi/WiringPi/wiringPi/wiringPi.h +47 -37
  36. data/ext/wiringpi/WiringPi/wiringPi/wpiExtensions.c +38 -9
  37. data/ext/wiringpi/extconf.rb +26 -2
  38. data/ext/wiringpi/wiringpi_wrap.c +3456 -981
  39. metadata +9 -1
@@ -0,0 +1,39 @@
1
+ /*
2
+ * scrollPhat.h:
3
+ * Simple driver for the Pimoroni Scroll Phat device
4
+ *
5
+ * Copyright (c) 2015 Gordon Henderson.
6
+ ***********************************************************************
7
+ * This file is part of wiringPi:
8
+ * https://projects.drogon.net/raspberry-pi/wiringpi/
9
+ *
10
+ * wiringPi is free software: you can redistribute it and/or modify
11
+ * it under the terms of the GNU Lesser General Public License as published by
12
+ * the Free Software Foundation, either version 3 of the License, or
13
+ * (at your option) any later version.
14
+ *
15
+ * wiringPi is distributed in the hope that it will be useful,
16
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ * GNU Lesser General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU Lesser General Public License
21
+ * along with wiringPi. If not, see <http://www.gnu.org/licenses/>.
22
+ ***********************************************************************
23
+ */
24
+
25
+ extern void scrollPhatPoint (int x, int y, int colour) ;
26
+ extern void scrollPhatLine (int x0, int y0, int x1, int y1, int colour) ;
27
+ extern void scrollPhatLineTo (int x, int y, int colour) ;
28
+ extern void scrollPhatRectangle (int x1, int y1, int x2, int y2, int colour, int filled) ;
29
+ extern void scrollPhatUpdate (void) ;
30
+ extern void scrollPhatClear (void) ;
31
+
32
+ extern int scrollPhatPutchar (int c) ;
33
+ //extern void scrollPhatPutchar (int c) ;
34
+ extern void scrollPhatPuts (const char *str) ;
35
+ extern void scrollPhatPrintf (const char *message, ...) ;
36
+ extern void scrollPhatPrintSpeed (const int cps10) ;
37
+
38
+ extern void scrollPhatIntensity (const int percent) ;
39
+ extern int scrollPhatSetup (void) ;
@@ -0,0 +1,544 @@
1
+ /*
2
+ * scrollPhatFont.h:
3
+ * Simple font for the Pimoroni Scroll Phat.
4
+ * Note: this is a very much reduced font - 5 pixels high and
5
+ * mostly 4 pixels wide - sometimes 5. Also only
6
+ * printable characters from space to _ uppercase only.
7
+ *
8
+ * Copyright (c) 2015-2016 Gordon Henderson.
9
+ ***********************************************************************
10
+ * This file is part of wiringPi:
11
+ * https://projects.drogon.net/raspberry-pi/wiringpi/
12
+ *
13
+ * wiringPi is free software: you can redistribute it and/or modify
14
+ * it under the terms of the GNU Lesser General Public License as published by
15
+ * the Free Software Foundation, either version 3 of the License, or
16
+ * (at your option) any later version.
17
+ *
18
+ * wiringPi is distributed in the hope that it will be useful,
19
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ * GNU Lesser General Public License for more details.
22
+ *
23
+ * You should have received a copy of the GNU Lesser General Public License
24
+ * along with wiringPi. If not, see <http://www.gnu.org/licenses/>.
25
+ ***********************************************************************
26
+ */
27
+
28
+ static const int fontHeight = 5 ;
29
+
30
+ static unsigned char scrollPhatFont [] =
31
+ {
32
+
33
+ // 0x20, Space. Handeled as a special case in the code.
34
+
35
+ 0x0, // ....
36
+ 0x0, // ....
37
+ 0x0, // ....
38
+ 0x0, // ....
39
+ 0x0, // ....
40
+
41
+ // 0x21, !
42
+
43
+ 0x1, // *
44
+ 0x1, // *
45
+ 0x1, // *
46
+ 0x0, // .
47
+ 0x1, // *
48
+
49
+ // 0x22, "
50
+
51
+ 0x5, // *..*
52
+ 0x5, // *..*
53
+ 0x0, // ....
54
+ 0x0, // ....
55
+ 0x0, // ....
56
+
57
+ // 0x23, #
58
+
59
+ 0x9, // *..*
60
+ 0xF, // ****
61
+ 0x9, // *..*
62
+ 0xF, // ****
63
+ 0x9, // *..*
64
+
65
+ // 0x24, $
66
+
67
+ 0x1, // ..*.
68
+ 0x7, // .***
69
+ 0x2, // ..*.
70
+ 0xE, // ***.
71
+ 0x8, // ..*.
72
+
73
+ // 0x25, %
74
+
75
+ 0x9, // *..*
76
+ 0x1, // ...*
77
+ 0x6, // .**.
78
+ 0x8, // *...
79
+ 0x9, // *..*
80
+
81
+ // 0x26, &
82
+
83
+ 0x6, // .**.
84
+ 0x8, // *...
85
+ 0x4, // .*..
86
+ 0xA, // *.*.
87
+ 0x5, // .*.*
88
+
89
+ // 0x27, '
90
+
91
+ 0x1, // .*
92
+ 0x2, // *.
93
+ 0x0, // ..
94
+ 0x0, // ..
95
+ 0x0, // ..
96
+
97
+ // 0x28, (
98
+
99
+ 0x3, // ..**
100
+ 0x4, // .*..
101
+ 0x8, // *...
102
+ 0x4, // .*..
103
+ 0x3, // ..**
104
+
105
+ // 0x29, )
106
+
107
+ 0xC, // **..
108
+ 0x2, // ..*.
109
+ 0x1, // ...*
110
+ 0x2, // ..*.
111
+ 0xC, // **..
112
+
113
+ // 0x2A, *
114
+
115
+ 0x9, // *..*
116
+ 0x6, // .**.
117
+ 0xF, // ****
118
+ 0x6, // .**.
119
+ 0x9, // *..*
120
+
121
+ // 0x2B, +
122
+
123
+ 0x6, // .**.
124
+ 0x6, // .**.
125
+ 0xF, // ****
126
+ 0x6, // .**.
127
+ 0x6, // .**.
128
+
129
+ // 0x2C, ,
130
+
131
+ 0x0, // ..
132
+ 0x0, // ..
133
+ 0x0, // ..
134
+ 0x1, // .*
135
+ 0x2, // *.
136
+
137
+ // 0x2D, -
138
+
139
+ 0x0, // ....
140
+ 0x0, // ....
141
+ 0xF, // ****
142
+ 0x0, // ....
143
+ 0x0, // ....
144
+
145
+ // 0x2E, .
146
+
147
+ 0x0, // .
148
+ 0x0, // .
149
+ 0x0, // .
150
+ 0x0, // .
151
+ 0x1, // *
152
+
153
+ // 0x2F, /
154
+
155
+ 0x1, // ...*
156
+ 0x3, // ..**
157
+ 0x4, // ..*.
158
+ 0xC, // **..
159
+ 0x8, // *...
160
+
161
+ // 0x30, 0
162
+
163
+ 0x6, // .**.
164
+ 0x9, // *..*
165
+ 0x9, // *..*
166
+ 0x9, // *..*
167
+ 0x6, // .**.
168
+
169
+ // 0x31, 1
170
+
171
+ 0x2, // ..*.
172
+ 0x6, // .**.
173
+ 0x2, // ..*.
174
+ 0x2, // ..*.
175
+ 0x7, // .***
176
+
177
+ // 0x32, 2
178
+
179
+ 0x6, // .**.
180
+ 0x1, // ...*
181
+ 0x6, // .**.
182
+ 0x8, // *...
183
+ 0xF, // ****
184
+
185
+ // 0x33, 3
186
+
187
+ 0xE, // ***.
188
+ 0x1, // ...*
189
+ 0xE, // ***.
190
+ 0x1, // ...*
191
+ 0xE, // ***.
192
+
193
+ // 0x34, 4
194
+
195
+ 0x6, // .**.
196
+ 0xA, // *.*.
197
+ 0xF, // ****
198
+ 0x2, // ..*.
199
+ 0x2, // ..*.
200
+
201
+ // 0x35, 5
202
+
203
+ 0xF, // ****
204
+ 0x8, // *...
205
+ 0xF, // ****
206
+ 0x1, // ...*
207
+ 0xE, // ***.
208
+
209
+ // 0x36, 6
210
+
211
+ 0x2, // ..*.
212
+ 0x4, // .*..
213
+ 0xA, // *.*.
214
+ 0x9, // *..*
215
+ 0x6, // .**.
216
+
217
+ // 0x37, 7
218
+
219
+ 0xF, // ****
220
+ 0x1, // ...*
221
+ 0x2, // ..*.
222
+ 0x4, // .*..
223
+ 0x8, // *...
224
+
225
+ // 0x38, 8
226
+
227
+ 0x6, // .**.
228
+ 0x9, // *..*
229
+ 0x6, // .**.
230
+ 0x9, // *..*
231
+ 0x6, // .**.
232
+
233
+ // 0x39, 9
234
+
235
+ 0x6, // .**.
236
+ 0x9, // *..*
237
+ 0x7, // .*.*
238
+ 0x1, // ..*.
239
+ 0x2, // .*..
240
+
241
+ // 0x3A, :
242
+
243
+ 0x0, // .
244
+ 0x1, // *
245
+ 0x0, // .
246
+ 0x1, // *
247
+ 0x0, // .
248
+
249
+ // 0x3B, ;
250
+
251
+ 0x0, // ..
252
+ 0x1, // .*
253
+ 0x0, // ..
254
+ 0x1, // .*
255
+ 0x2, // *.
256
+
257
+ // 0x3C, <
258
+
259
+ 0x2, // ..*.
260
+ 0x4, // .*..
261
+ 0x8, // *...
262
+ 0x4, // .*..
263
+ 0x2, // ..*.
264
+
265
+ // 0x3D, =
266
+
267
+ 0x0, // ....
268
+ 0xF, // ****
269
+ 0x0, // ....
270
+ 0xF, // ****
271
+ 0x0, // ....
272
+
273
+ // 0x3E, >
274
+
275
+ 0x0, // .*..
276
+ 0x0, // ..*.
277
+ 0x0, // ...*
278
+ 0x0, // ..*.
279
+ 0x0, // .*..
280
+
281
+ // 0x3F, ?
282
+
283
+ 0x6, // .**.
284
+ 0x1, // ...*
285
+ 0x2, // ..*.
286
+ 0x0, // ....
287
+ 0x2, // ..*.
288
+
289
+ // 0x40, @
290
+
291
+ 0x6, // .**.
292
+ 0xD, // **.*
293
+ 0x8, // *...
294
+ 0x4, // .*..
295
+ 0x3, // ..**
296
+
297
+ // 0x41, A
298
+
299
+ 0x6, // .**.
300
+ 0x9, // *..*
301
+ 0xF, // ****
302
+ 0x9, // *..*
303
+ 0x9, // *..*
304
+
305
+ // 0x42, B
306
+
307
+ 0xE, // ***.
308
+ 0x9, // *..*
309
+ 0xE, // ***.
310
+ 0x9, // *..*
311
+ 0xE, // ***.
312
+
313
+ // 0x43, C
314
+
315
+ 0x6, // .**.
316
+ 0x9, // *..*
317
+ 0x8, // *...
318
+ 0x9, // *..*
319
+ 0x6, // .**.
320
+
321
+ // 0x44, D
322
+
323
+ 0xE, // ***.
324
+ 0x9, // *..*
325
+ 0x9, // *..*
326
+ 0x9, // *..*
327
+ 0xE, // ***.
328
+
329
+ // 0x45, E
330
+
331
+ 0xF, // ****
332
+ 0x8, // *...
333
+ 0xE, // ***.
334
+ 0x8, // *...
335
+ 0xF, // ****
336
+
337
+ // 0x46, F
338
+
339
+ 0xF, // ****
340
+ 0x8, // *...
341
+ 0xE, // ***.
342
+ 0x8, // *...
343
+ 0x8, // *...
344
+
345
+ // 0x47, G
346
+
347
+ 0x6, // .**.
348
+ 0x9, // *..*
349
+ 0x8, // *...
350
+ 0xB, // *.**
351
+ 0x6, // .**.
352
+
353
+ // 0x48, H
354
+
355
+ 0x9, // *..*
356
+ 0x9, // *..*
357
+ 0xF, // ****
358
+ 0x9, // *..*
359
+ 0x9, // *..*
360
+
361
+ // 0x49, I
362
+
363
+ 0x7, // ***
364
+ 0x2, // .*.
365
+ 0x2, // .*.
366
+ 0x2, // .*.
367
+ 0x7, // ***
368
+
369
+ // 0x4A, J
370
+
371
+ 0x7, // .***
372
+ 0x2, // ..*.
373
+ 0x2, // ..*.
374
+ 0xA, // *.*.
375
+ 0x4, // .*..
376
+
377
+ // 0x4B, K
378
+
379
+ 0x9, // *..*
380
+ 0xA, // *.*.
381
+ 0xC, // **..
382
+ 0xA, // *.*.
383
+ 0x9, // *..*
384
+
385
+ // 0x4C, L
386
+
387
+ 0x4, // *..
388
+ 0x4, // *..
389
+ 0x4, // *..
390
+ 0x4, // *..
391
+ 0x7, // ***
392
+
393
+ // 0x4D, M
394
+
395
+ 0x11, // *...*
396
+ 0x1B, // **.**
397
+ 0x15, // *.*.*
398
+ 0x11, // *...*
399
+ 0x11, // *...*
400
+
401
+ // 0x4E, N
402
+
403
+ 0x9, // *..*
404
+ 0xD, // **.*
405
+ 0xB, // *.**
406
+ 0x9, // *..*
407
+ 0x9, // *..*
408
+
409
+ // 0x4F, O
410
+
411
+ 0x6, // .**.
412
+ 0x9, // *..*
413
+ 0x9, // *..*
414
+ 0x9, // *..*
415
+ 0x6, // .**.
416
+
417
+ // 0x50, P
418
+
419
+ 0xE, // ***.
420
+ 0x9, // *..*
421
+ 0xE, // ***.
422
+ 0x8, // *...
423
+ 0x8, // *...
424
+
425
+ // 0x51, Q
426
+
427
+ 0x6, // .**.
428
+ 0x9, // *..*
429
+ 0x9, // *..*
430
+ 0xA, // *.*.
431
+ 0x5, // .*.*
432
+
433
+ // 0x52, R
434
+
435
+ 0xE, // ***.
436
+ 0x9, // *..*
437
+ 0xF, // ***.
438
+ 0xA, // *.*.
439
+ 0x9, // *..*
440
+
441
+ // 0x53, S
442
+
443
+ 0x6, // .**.
444
+ 0x8, // *...
445
+ 0x6, // .**.
446
+ 0x1, // ...*
447
+ 0x6, // .**.
448
+
449
+ // 0x54, T
450
+
451
+ 0x7, // .***
452
+ 0x2, // ..*.
453
+ 0x2, // ..*.
454
+ 0x2, // ..*.
455
+ 0x2, // ..*.
456
+
457
+ // 0x55, U
458
+
459
+ 0x9, // *..*
460
+ 0x9, // *..*
461
+ 0x9, // *..*
462
+ 0x9, // *..*
463
+ 0x6, // .**.
464
+
465
+ // 0x56, V
466
+
467
+ 0x11, // *...*
468
+ 0x11, // *...*
469
+ 0x11, // *...*
470
+ 0x0A, // .*.*.
471
+ 0x04, // ..*..
472
+
473
+ // 0x57, W
474
+
475
+ 0x11, // *...*
476
+ 0x11, // *...*
477
+ 0x11, // *...*
478
+ 0x15, // *.*.*
479
+ 0x1B, // **.**
480
+
481
+ // 0x58, X
482
+
483
+ 0x9, // *..*
484
+ 0x9, // *..*
485
+ 0x6, // .**.
486
+ 0x9, // *..*
487
+ 0x9, // *..*
488
+
489
+ // 0x59, Y
490
+
491
+ 0x11, // *...*
492
+ 0x0A, // .*.*.
493
+ 0x04, // ..*..
494
+ 0x04, // ..*..
495
+ 0x04, // ..*..
496
+
497
+ // 0x5A, Z
498
+
499
+ 0xF, // ****
500
+ 0x1, // ...*
501
+ 0x6, // .**.
502
+ 0x8, // *...
503
+ 0xF, // ****
504
+
505
+ // 0x5B, [
506
+
507
+ 0xE, // ***.
508
+ 0x8, // *...
509
+ 0x8, // *...
510
+ 0x8, // *...
511
+ 0xE, // ***.
512
+
513
+ // 0x5C, Backslash
514
+
515
+ 0x8, // *...
516
+ 0xC, // **..
517
+ 0x6, // .**.
518
+ 0x3, // ..**
519
+ 0x1, // ...*
520
+
521
+ // 0x5D, ]
522
+
523
+ 0x7, // .***
524
+ 0x1, // ...*
525
+ 0x1, // ...*
526
+ 0x1, // ...*
527
+ 0x7, // .***
528
+
529
+ // 0x5E, ^
530
+
531
+ 0x6, // .**.
532
+ 0x9, // *..*
533
+ 0x0, // ....
534
+ 0x0, // ....
535
+ 0x0, // ....
536
+
537
+ // 0x5F, _
538
+
539
+ 0x0, // ....
540
+ 0x0, // ....
541
+ 0x0, // ....
542
+ 0x0, // ....
543
+ 0xF, // ****
544
+ } ;