Shogo Suzuki / LD8035
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LD8035.h Source File

LD8035.h

00001 #ifndef LD8035_H
00002 #define LD8035_H
00003 
00004 #include "mbed.h"
00005 
00006 #define G_SIZE 6
00007 #define WAIT_TIME 3
00008 
00009 class LD8035
00010 {
00011 public:
00012 
00013     LD8035(PinName G1, PinName G2, PinName G3, PinName G4, PinName G5, PinName G6,
00014            PinName a_pin, PinName b_pin, PinName c_pin, PinName d_pin, PinName e_pin,
00015            PinName f_pin, PinName g_pin, PinName dot_pin, PinName hyphen_pin);
00016 
00017     void set_bars(int numbers[],bool dot_flags[],bool hyphen_flags[]);
00018     void clear();
00019     void flush();
00020 
00021 private:
00022     BusOut _GPin;
00023     BusOut _NumPin;
00024     BusOut _DotPin;
00025     BusOut _HyphenPin;
00026 
00027     int _numbers[G_SIZE];
00028     bool _dot_flags[G_SIZE];
00029     bool _hyphen_flags[G_SIZE];
00030 };
00031 
00032 #endif