http://eleshop.jp/shop/g/g96I412/
LD8035.h@0:f9d855cc36f4, 2014-02-23 (annotated)
- Committer:
- shogo992
- Date:
- Sun Feb 23 17:47:17 2014 +0000
- Revision:
- 0:f9d855cc36f4
LD8035; http://eleshop.jp/shop/g/g96I412/
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shogo992 | 0:f9d855cc36f4 | 1 | #ifndef LD8035_H |
shogo992 | 0:f9d855cc36f4 | 2 | #define LD8035_H |
shogo992 | 0:f9d855cc36f4 | 3 | |
shogo992 | 0:f9d855cc36f4 | 4 | #include "mbed.h" |
shogo992 | 0:f9d855cc36f4 | 5 | |
shogo992 | 0:f9d855cc36f4 | 6 | #define G_SIZE 6 |
shogo992 | 0:f9d855cc36f4 | 7 | #define WAIT_TIME 3 |
shogo992 | 0:f9d855cc36f4 | 8 | |
shogo992 | 0:f9d855cc36f4 | 9 | class LD8035 |
shogo992 | 0:f9d855cc36f4 | 10 | { |
shogo992 | 0:f9d855cc36f4 | 11 | public: |
shogo992 | 0:f9d855cc36f4 | 12 | |
shogo992 | 0:f9d855cc36f4 | 13 | LD8035(PinName G1, PinName G2, PinName G3, PinName G4, PinName G5, PinName G6, |
shogo992 | 0:f9d855cc36f4 | 14 | PinName a_pin, PinName b_pin, PinName c_pin, PinName d_pin, PinName e_pin, |
shogo992 | 0:f9d855cc36f4 | 15 | PinName f_pin, PinName g_pin, PinName dot_pin, PinName hyphen_pin); |
shogo992 | 0:f9d855cc36f4 | 16 | |
shogo992 | 0:f9d855cc36f4 | 17 | void set_bars(int numbers[],bool dot_flags[],bool hyphen_flags[]); |
shogo992 | 0:f9d855cc36f4 | 18 | void clear(); |
shogo992 | 0:f9d855cc36f4 | 19 | void flush(); |
shogo992 | 0:f9d855cc36f4 | 20 | |
shogo992 | 0:f9d855cc36f4 | 21 | private: |
shogo992 | 0:f9d855cc36f4 | 22 | BusOut _GPin; |
shogo992 | 0:f9d855cc36f4 | 23 | BusOut _NumPin; |
shogo992 | 0:f9d855cc36f4 | 24 | BusOut _DotPin; |
shogo992 | 0:f9d855cc36f4 | 25 | BusOut _HyphenPin; |
shogo992 | 0:f9d855cc36f4 | 26 | |
shogo992 | 0:f9d855cc36f4 | 27 | int _numbers[G_SIZE]; |
shogo992 | 0:f9d855cc36f4 | 28 | bool _dot_flags[G_SIZE]; |
shogo992 | 0:f9d855cc36f4 | 29 | bool _hyphen_flags[G_SIZE]; |
shogo992 | 0:f9d855cc36f4 | 30 | }; |
shogo992 | 0:f9d855cc36f4 | 31 | |
shogo992 | 0:f9d855cc36f4 | 32 | #endif |