Max7456
Class representing a max7456
 All Classes Files Functions Variables Typedefs Enumerator Macros Pages
max7456.h
Go to the documentation of this file.
1 
9 #ifndef MAX7456_H
10 #define MAX7456_H
11 
12 
13 //def next only if you changed your table for an ascii one
14 //i.e address 0x00 -> ' '
15 //....
16 // address 0x5A -> 'z'
17 #define MAX7456_TABLE_ASCII
18 
19 #include "max7456registers.h"
20 
21 
22 
36 class Max7456
37 {
38 public:
39 
40 
44  Max7456();
45 
46 
52  Max7456(byte pinCS);
53 
54 
63  void init(byte pinCS);
64 
70  void setBlinkParams(byte blinkBase, byte blinkDC);
71 
72 
78  void setDisplayOffsets(byte horizontal, byte vertical);
79 
80 
84  void clearScreen();
85 
86 
93  void activateOSD(bool act = true);
94 
95 
102  void activateExternalVideo(bool activExtVid = true);
103 
104 
116  void sendCharacter(const charact array, byte x, byte y);
117 
118 
125  void getCharacter(charact array, byte x, byte y);
126 
127 
140  void print(const char string[], byte x, byte y, byte blink = 0,byte inv = 0);
141 
142 
143 
162  void print(double value, byte x, byte y, byte before, byte after, byte blink=0,byte inv=0);
163 
164 
180  void printMax7456Chars(byte chars[],byte size,byte x, byte y, byte blink = 0,byte inv = 0);
181 
182 
191  void printMax7456Char(const byte address, byte x, byte y, byte blink=0, byte inv=0);
192 
200  static void printCharacterToSerial(const charact array, bool img = true);
201 
202 
208  static byte* CARACT2ByteArray(const CARACT car);
209 
210 
216  static CARACT byteArray2CARACT(const charact array);
217 
218 
228  static void getCARACFromProgMem(const prog_uchar *table, byte i,charact c);
229 
230 private:
231 
232  byte giveMax7456CharFromAsciiChar(char ascii);
233  static void printPixel(byte value);
234 
235  byte _pinCS;
236  bool _isActivatedOsd;
237  //registers (only here for convenience : not forced to be used).
238  REG_VM0 _regVm0;
239  REG_VM1 _regVm1;
240  REG_HOS _regHos;
241  REG_VOS _regVos;
242  REG_DMM _regDmm;
243  REG_DMAH _regDmah; // not used yet
244  REG_DMAL _regDmal; // not used yet
245  REG_DMDI _regDmdi; // not used yet
246  REG_CMM _regCmm;
247  REG_CMAH _regCmah; // not used yet
248  REG_CMAL _regCmal; // not used yet
249  REG_CMDI _regCmdi; // not used yet
250  REG_OSDM _regOsdm; // not used yet
251  REG_RBN _regRb[16]; // not used yet
252  REG_OSDBL _regOsdbl; // not used yet
253  REG_STAT _regStat; // not used yet
254  DMDO _regDmdo; // not used yet
255  REG_CMDO _regCmdo; // not used yet
256 };
257 
258 
259 #endif /* MAX7456_H_ */
260