Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
tlc5916.cpp@0:d4427d048a98, 2012-09-09 (annotated)
- Committer:
- mpanetta
- Date:
- Sun Sep 09 22:28:06 2012 +0000
- Revision:
- 0:d4427d048a98
[mbed] converted /BeaconAvoid/PiSlingers
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mpanetta | 0:d4427d048a98 | 1 | |
| mpanetta | 0:d4427d048a98 | 2 | #include "mbed.h" |
| mpanetta | 0:d4427d048a98 | 3 | #include "tlc5916.h" |
| mpanetta | 0:d4427d048a98 | 4 | |
| mpanetta | 0:d4427d048a98 | 5 | void |
| mpanetta | 0:d4427d048a98 | 6 | TLC5916::write_reg(uint8_t byte) |
| mpanetta | 0:d4427d048a98 | 7 | { |
| mpanetta | 0:d4427d048a98 | 8 | pinLE = 0; |
| mpanetta | 0:d4427d048a98 | 9 | spi.write(byte); |
| mpanetta | 0:d4427d048a98 | 10 | wait_us(1); |
| mpanetta | 0:d4427d048a98 | 11 | pinLE = 1; |
| mpanetta | 0:d4427d048a98 | 12 | wait_us(1); |
| mpanetta | 0:d4427d048a98 | 13 | pinLE = 0; |
| mpanetta | 0:d4427d048a98 | 14 | } |
| mpanetta | 0:d4427d048a98 | 15 | |
| mpanetta | 0:d4427d048a98 | 16 | void |
| mpanetta | 0:d4427d048a98 | 17 | TLC5916::enable(void) |
| mpanetta | 0:d4427d048a98 | 18 | { |
| mpanetta | 0:d4427d048a98 | 19 | pinnOE = 0; |
| mpanetta | 0:d4427d048a98 | 20 | } |
| mpanetta | 0:d4427d048a98 | 21 | |
| mpanetta | 0:d4427d048a98 | 22 | void |
| mpanetta | 0:d4427d048a98 | 23 | TLC5916::disable(void) |
| mpanetta | 0:d4427d048a98 | 24 | { |
| mpanetta | 0:d4427d048a98 | 25 | pinnOE = 1; |
| mpanetta | 0:d4427d048a98 | 26 | } |