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:13a7de7ce046, 2011-11-05 (annotated)
- Committer:
- mpanetta
- Date:
- Sat Nov 05 18:29:39 2011 +0000
- Revision:
- 0:13a7de7ce046
First revision of test code for Polyathalon sensor board.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mpanetta | 0:13a7de7ce046 | 1 | |
| mpanetta | 0:13a7de7ce046 | 2 | #include "mbed.h" |
| mpanetta | 0:13a7de7ce046 | 3 | #include "tlc5916.h" |
| mpanetta | 0:13a7de7ce046 | 4 | |
| mpanetta | 0:13a7de7ce046 | 5 | void |
| mpanetta | 0:13a7de7ce046 | 6 | TLC5916::write_reg(uint8_t byte) |
| mpanetta | 0:13a7de7ce046 | 7 | { |
| mpanetta | 0:13a7de7ce046 | 8 | pinLE = 0; |
| mpanetta | 0:13a7de7ce046 | 9 | spi.write(byte); |
| mpanetta | 0:13a7de7ce046 | 10 | wait_us(1); |
| mpanetta | 0:13a7de7ce046 | 11 | pinLE = 1; |
| mpanetta | 0:13a7de7ce046 | 12 | wait_us(1); |
| mpanetta | 0:13a7de7ce046 | 13 | pinLE = 0; |
| mpanetta | 0:13a7de7ce046 | 14 | } |
| mpanetta | 0:13a7de7ce046 | 15 | |
| mpanetta | 0:13a7de7ce046 | 16 | void |
| mpanetta | 0:13a7de7ce046 | 17 | TLC5916::enable(void) |
| mpanetta | 0:13a7de7ce046 | 18 | { |
| mpanetta | 0:13a7de7ce046 | 19 | pinnOE = 0; |
| mpanetta | 0:13a7de7ce046 | 20 | } |
| mpanetta | 0:13a7de7ce046 | 21 | |
| mpanetta | 0:13a7de7ce046 | 22 | void |
| mpanetta | 0:13a7de7ce046 | 23 | TLC5916::disable(void) |
| mpanetta | 0:13a7de7ce046 | 24 | { |
| mpanetta | 0:13a7de7ce046 | 25 | pinnOE = 1; |
| mpanetta | 0:13a7de7ce046 | 26 | } |