Second revision of test code for Polyathalon sensor board.

Dependencies:   mbed MODDMA

tlc5916.h

Committer:
mpanetta
Date:
2011-11-05
Revision:
1:1e37eee8e1cf
Parent:
0:13a7de7ce046

File content as of revision 1:1e37eee8e1cf:

#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_