1 //////////////////////////////////////////////////////////////////////////////
8 // Company: JYE Tech Ltd.
9 // Web: www.jyetech.com
11 //-----------------------------------------------------------------------------
13 // Target: STM32F103C8
14 // Tool chain: CodeSourcery G++
16 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
23 //-----------------------------------------------------------------------------
26 ///////////////////////////////////////////////////////////////////////////////
35 // ------------ Display parameters -----------------------
36 // Overall display parameters
39 #define ScreenXsize 320
40 #define ScreenYsize 240
42 #define Rbits 0 // Red bits position
43 #define Gbits 5 // Green bits position
44 #define Bbits 11 // Blue bits position
45 #define RGB(R, G, B) (((R >> 3) << Rbits) | ((G >> 2) << Gbits) | ((B >> 3) << Bbits))
48 clBlack = RGB(0, 0, 0),
49 clWhite = RGB(255, 255, 255),
50 clRed = RGB(255, 0, 0),
51 clGreen = RGB(0, 255, 0),
52 clBlue = RGB(0, 0, 255),
53 clYellow = RGB(255, 255, 0),
54 clGainsboro = RGB(220, 220, 220),
55 clNavy = RGB(0, 0, 128),
56 clAqua = RGB(0, 255, 255),
57 clHotpink = RGB(255, 105, 180),
58 clOrange = RGB(255, 165, 0),
59 clDeepskyblue = RGB(0, 191, 255),
60 clDimgray = RGB(105, 105, 105),
61 cllightsalmon = RGB(255, 160, 122),
62 cllightcoral = RGB(240, 128, 128),
63 clpaleturquoise = RGB(175, 238, 238),
64 clturquoise = RGB(64, 224, 208),
65 clViolet = RGB(238, 130, 238),
66 clGray1 = RGB(90, 90, 90),
67 clGray2 = RGB(220, 220, 220),
68 clGray3 = RGB(240, 240, 240),
69 clDarkgray = RGB(169, 169, 169),
70 clSkyblue = RGB(135, 206, 235),
71 clChocolate = RGB(210, 105, 30),
72 clMediumseagreen = RGB(60, 179, 113),
73 clPeachpuff = RGB(255, 218, 185),
74 clSeagreen = RGB(46, 139, 87),
78 clActiveItem1 = clAqua,
79 clActiveItem2 = clturquoise,
83 clBtnBG3 = clGainsboro,
92 clTrigger = clHotpink,
94 clCursorT = clMediumseagreen,
96 clCursorActive = clAqua,
97 clMeasurement = clGray3,
111 // =======================================================
112 // Display parameters
115 #define WWindowSizex 300
116 #define WWindowSizey 200
117 #define WWindowMidValue 0x800
119 #define WDsize 300 // Wave display size
120 #define HBarSize 140 // HPos indicator length
122 // ===========================================================
123 // Declarations of external variables
124 // ===========================================================
128 // ===========================================================
129 // Function Prototype Declarations
130 // ===========================================================
132 void ClrScreen(void);
133 void SetWindow(U16 x, U16 xsize, U16 y, U16 ysize);
134 void FillRect(S16 x, S16 y, S16 xsize, S16 ysize, U16 color);
135 void PutcGenic(U16 x, U16 y, U8 ch, U16 fgcolor, U16 bgcolor, FONT *font);
136 void PutsGenic(U16 x, U16 y, U8 *str, U16 fgcolor, U16 bgcolor, FONT *font);