Object Model code with hardware support

Dependencies:   mbed

Committer:
bgrissom
Date:
Fri Sep 05 00:07:44 2014 +0000
Revision:
0:2b4bbe9ea495
Object Model code with Toshiba S0 and S1 routines compiles with ST F401RE board support.  If you try to compile this for the F030 or F072, it will run out of SRAM space.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bgrissom 0:2b4bbe9ea495 1 #ifndef __TOSHIBATC62D723_H__
bgrissom 0:2b4bbe9ea495 2 #define __TOSHIBATC62D723_H__
bgrissom 0:2b4bbe9ea495 3
bgrissom 0:2b4bbe9ea495 4 #include "mbed.h"
bgrissom 0:2b4bbe9ea495 5 #include <stdint.h>
bgrissom 0:2b4bbe9ea495 6 #include "defines.hpp"
bgrissom 0:2b4bbe9ea495 7
bgrissom 0:2b4bbe9ea495 8 // TODO Make this the parent class and have ToshibaTC62D723 inherit from it.
bgrissom 0:2b4bbe9ea495 9 // class LEDDriver { };
bgrissom 0:2b4bbe9ea495 10
bgrissom 0:2b4bbe9ea495 11 class ToshibaTC62D723 {
bgrissom 0:2b4bbe9ea495 12 public:
bgrissom 0:2b4bbe9ea495 13 // Constructor
bgrissom 0:2b4bbe9ea495 14 ToshibaTC62D723(void);
bgrissom 0:2b4bbe9ea495 15
bgrissom 0:2b4bbe9ea495 16 // Default Destructor
bgrissom 0:2b4bbe9ea495 17 virtual ~ToshibaTC62D723();
bgrissom 0:2b4bbe9ea495 18
bgrissom 0:2b4bbe9ea495 19 // Members
bgrissom 0:2b4bbe9ea495 20 static const int NUM_CHANNELS = 16;
bgrissom 0:2b4bbe9ea495 21 uint16_t _channelBrightness[NUM_CHANNELS];
bgrissom 0:2b4bbe9ea495 22 ToshibaTC62D723 *_dataIn;
bgrissom 0:2b4bbe9ea495 23 ToshibaTC62D723 *_dataOut;
bgrissom 0:2b4bbe9ea495 24
bgrissom 0:2b4bbe9ea495 25 // Member Functions
bgrissom 0:2b4bbe9ea495 26 static void shiftBrightnessDataIn(const uint16_t p_brightness);
bgrissom 0:2b4bbe9ea495 27 static void outputBrightnessDataToLEDs(void);
bgrissom 0:2b4bbe9ea495 28
bgrissom 0:2b4bbe9ea495 29
bgrissom 0:2b4bbe9ea495 30 private:
bgrissom 0:2b4bbe9ea495 31 // Private Member Variables
bgrissom 0:2b4bbe9ea495 32
bgrissom 0:2b4bbe9ea495 33 // Private Member Functions
bgrissom 0:2b4bbe9ea495 34 static int s0(const uint16_t p_value);
bgrissom 0:2b4bbe9ea495 35 static void s1(void);
bgrissom 0:2b4bbe9ea495 36 };
bgrissom 0:2b4bbe9ea495 37
bgrissom 0:2b4bbe9ea495 38 #endif // __TOSHIBATC62D723_H__