![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Second revision of test code for Polyathalon sensor board.
tlc5916.cpp@1:1e37eee8e1cf, 2011-11-05 (annotated)
- Committer:
- mpanetta
- Date:
- Sat Nov 05 21:10:10 2011 +0000
- Revision:
- 1:1e37eee8e1cf
- Parent:
- 0:13a7de7ce046
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 | } |