Class library for a touchscreen-based keypad for the LCD display present on the DISCO_F429ZI board.

Dependents:   WIRE-BANDING_FT810 WIRE-BANDING_copy

Revision:
2:51f454b7c9ab
Parent:
1:1db4c6c394bb
Child:
3:5f2fa06a0492
--- a/KEYPAD_DISCO_F429ZI.h	Sun May 08 18:42:07 2016 +0000
+++ b/KEYPAD_DISCO_F429ZI.h	Sun May 08 20:03:52 2016 +0000
@@ -29,7 +29,8 @@
 #include "TS_DISCO_F429ZI.h"
 #include "LCD_DISCO_F429ZI.h"
 
-/** Class library for a touchscreen-based keypad for the LCD display present on the DISCO_F429ZI board.
+/** Class library for a touchscreen-based keypad for the LCD display present on the DISCO_F429ZI board. 
+ * It requires the TS_DISCO_F429ZI and LCD_DISCO_F429ZI to also be imported into the program.
  *
  * Example:
  * @code
@@ -55,7 +56,6 @@
     /** Draws the keys for the keypad and the Message Box and Output Box areas if enabled.
     * @param 
     *     MessageBoxEnable Enable (=1) or disable(=0 the drawing of a Message Box area on the keypad screen.
-    * @param 
     *     OutBoxEnable Enable (=1) or disable(=0 the drawing of a Output Box area on the keypad screen.
     */
     void Show(int MessageBoxEnable, int OutBoxEnable);
@@ -68,6 +68,66 @@
     */
     char ReadKey();
 
+    /** Writes text (21 characters max) to one of the two lines of the Message Box area if it is enabled in Show().
+    * @param 
+    *     LineNum The line number to to where the text must be displayed (0 or 1).
+    *     text String to display.
+    */
+    void WriteMsgBoxLine(int LineNum, char *text);
+    
+    /** Writes text (14 characters max) to the Output Box area if it is enabled in Show().
+    * @param 
+    *     text String to display.
+    */
+    void WriteOutBox(char *text);
+    
+    /** Sets the foreground color for the keypad keys.
+    * @param 
+    *     color The color constant or code ARGB(8-8-8-8).
+    */
+    void SetKeyForeColor(uint32_t color);
+    
+    /** Sets the background color for the keypad keys.
+    * @param 
+    *     color The color constant or code ARGB(8-8-8-8).
+    */
+    void SetKeyBackColor(uint32_t color);
+    
+    /** Sets the background color for the keypad keys when it is pressed.
+    * @param 
+    *     color The color constant or code ARGB(8-8-8-8).
+    */
+    void SetKeyPressColor(uint32_t color);
+    
+    /** Sets the foreground color for the Message Box area.
+    * @param 
+    *     color The color constant or code ARGB(8-8-8-8).
+    */
+    void SetMsgBoxForeColor(uint32_t color);
+    
+    /** Sets the background color for the Message Box area.
+    * @param 
+    *     color The color constant or code ARGB(8-8-8-8).
+    */
+    void SetMsgBoxBackColor(uint32_t color);
+    
+    /** Sets the foreground color for the Output Box area.
+    * @param 
+    *     color The color constant or code ARGB(8-8-8-8).
+    */
+    void SetOutBoxForeColor(uint32_t color);
+    
+    /** Sets the background color for the Output Box area.
+    * @param 
+    *     color The color constant or code ARGB(8-8-8-8).
+    */
+    void SetOutBoxBackColor(uint32_t color);
+    
+    /** Sets the background color for the whole keypad area.
+    * @param 
+    *     color The color constant or code ARGB(8-8-8-8).
+    */
+    void SetBackColor(uint32_t color);
  
   private:
     LCD_DISCO_F429ZI lcd;
@@ -78,14 +138,11 @@
     uint16_t KeysTopY;
     uint8_t row, col;
     uint8_t Keys[4][4];
-    
     uint32_t MsgBColor, MsgFColor;
     uint32_t OutBColor, OutFColor;
     uint32_t KeyBColor, KeyFColor, KeyPressColor;
     uint32_t BackColor;
-    
     int MessageBoxEnabledFlag, OutBoxEnabledFlag;
-    
 };
  
 #endif
\ No newline at end of file