Second revision of test code for Polyathalon sensor board.

Dependencies:   mbed MODDMA

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers tlc5916.h Source File

tlc5916.h

00001 #ifndef _TLC5916_H_
00002 #define _TLC5916_H_
00003 
00004 class TLC5916 {
00005 
00006 public:
00007     TLC5916(PinName le, PinName sin, PinName clk, PinName nOE) : pinLE(le), pinnOE(nOE), spi(sin, NC, clk)
00008     {
00009         pinLE   = 0;
00010         pinnOE  = 1;
00011         
00012         spi.format(8,0);
00013         spi.frequency(1000000);        
00014     };
00015     
00016     void write_reg(uint8_t byte);
00017     void enable(void);
00018     void disable(void);
00019     
00020 private:
00021 
00022     DigitalOut  pinLE;
00023     DigitalOut  pinnOE;
00024     SPI         spi;
00025 
00026 };
00027 
00028 #endif //_TLC5916_H_