Committer:
Midimetric
Date:
Sat Jan 08 16:27:12 2011 +0000
Revision:
4:545e25d4c3d8
Parent:
2:d6e572640dcc
Child:
5:1c78c0b4f513
(1) corrected SPI com by adding a very small wait (8 us) after changing state of A0 pin. Redef DOGMLCD_TIME if you need to change value.
(2) Added off screen managment with methods AttachScreen, DetachScreen and Paste.
- Attach your screen buffer (char [1024] )
- Use Doggys\ drawing functions to prepare it
- Detach screen
- Anytime, use Paste to combine with work screen by raster commands poke,wipe or inv.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Midimetric 2:d6e572640dcc 1 #ifndef GLOBALDEFS_H
Midimetric 2:d6e572640dcc 2 #define GLOBALDEFS_H
Midimetric 2:d6e572640dcc 3
Midimetric 2:d6e572640dcc 4 /// SPI frequency for method DogMLCD::Flush()
Midimetric 2:d6e572640dcc 5 #define DOGMLCD_MHZ 5000000
Midimetric 4:545e25d4c3d8 6 // Wait time after changing state of A0 in uS
Midimetric 4:545e25d4c3d8 7 #define DOGMLCD_TIME 8
Midimetric 2:d6e572640dcc 8
Midimetric 2:d6e572640dcc 9 #ifndef ORDER
Midimetric 2:d6e572640dcc 10 #define ORDER(a,b) if( a > b ) { int c = a; a = b; b = c; }
Midimetric 2:d6e572640dcc 11 #endif
Midimetric 2:d6e572640dcc 12 #ifndef BOUND
Midimetric 2:d6e572640dcc 13 #define BOUND(a,b,c) if( a < b ) a = b; else if( a > c ) a = c;
Midimetric 2:d6e572640dcc 14 #endif
Midimetric 2:d6e572640dcc 15
Midimetric 2:d6e572640dcc 16 const unsigned char DOGMLCD_on[] = { 1, 2, 4, 8, 16, 32, 64, 128 };
Midimetric 2:d6e572640dcc 17 const unsigned char DOGMLCD_off[]= { 254, 253, 251, 247, 239, 223, 191, 127 };
Midimetric 2:d6e572640dcc 18
Midimetric 2:d6e572640dcc 19 /// Bit mpath operation (raster)
Midimetric 2:d6e572640dcc 20 typedef enum{ poke, wipe, inv } doggy_op;
Midimetric 2:d6e572640dcc 21
Midimetric 0:601fd83c75e0 22 #endif