Mike Panetta
/
FirstTest
Second revision of test code for Polyathalon sensor board.
Diff: tlc5916.h
- Revision:
- 0:13a7de7ce046
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tlc5916.h Sat Nov 05 18:29:39 2011 +0000 @@ -0,0 +1,28 @@ +#ifndef _TLC5916_H_ +#define _TLC5916_H_ + +class TLC5916 { + +public: + TLC5916(PinName le, PinName sin, PinName clk, PinName nOE) : pinLE(le), pinnOE(nOE), spi(sin, NC, clk) + { + pinLE = 0; + pinnOE = 1; + + spi.format(8,0); + spi.frequency(1000000); + }; + + void write_reg(uint8_t byte); + void enable(void); + void disable(void); + +private: + + DigitalOut pinLE; + DigitalOut pinnOE; + SPI spi; + +}; + +#endif //_TLC5916_H_ \ No newline at end of file