Programme de test pour lcd ITDB02

Fork of TFTLCD by Todor Todorov

Revision:
21:e5c1e8ffada1
Parent:
20:4bdca8d8dadc
Child:
22:4c169297f374
diff -r 4bdca8d8dadc -r e5c1e8ffada1 lcd_base.h
--- a/lcd_base.h	Fri Dec 21 06:05:15 2012 +0000
+++ b/lcd_base.h	Sat Jan 26 02:55:46 2013 +0000
@@ -32,7 +32,7 @@
 #define TFTLCD_BASE_H
 
 #include "mbed.h"
-#include "fonts.h"
+#include "terminus.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -126,22 +126,22 @@
  */
 typedef enum Alignment_enum align_t;
 
-/** \struct Font_struct
- *  \brief Describes fonts and their properties.
- *  \sa Comments in fonts.h
- */
-struct Font_struct
-{
-    const    char* font; /**< A pointer to the first byte in the font. */
-    unsigned char  width; /**< The width of each character, in pixels. */
-    unsigned char  height; /**< Height of each character, in pixels. */
-    unsigned char  offset; /**< Offset of the first character in the font. */
-    unsigned char  numchars; /**< Count of the available characters in the font. */
-};
-/** \typedef font_metrics_t
- *  \brief Convenience shortcut for fonts properties.
- */
-typedef struct Font_struct font_metrics_t;
+///** \struct Font_struct
+// *  \brief Describes fonts and their properties.
+// *  \sa Comments in fonts.h
+// */
+//struct Font_struct
+//{
+//    const    char* font; /**< A pointer to the first byte in the font. */
+//    unsigned char  width; /**< The width of each character, in pixels. */
+//    unsigned char  height; /**< Height of each character, in pixels. */
+//    unsigned char  offset; /**< Offset of the first character in the font. */
+//    unsigned char  numchars; /**< Count of the available characters in the font. */
+//};
+///** \typedef font_metrics_t
+// *  \brief Convenience shortcut for fonts properties.
+// */
+//typedef struct Font_struct font_metrics_t;
 
 /** \struct Bitmap_struct
  *  \brief Describes an image.
@@ -242,7 +242,7 @@
      * \param font A pointer to the font data.
      * \sa Comments in file fonts.h
      */
-    virtual void SetFont( const char* font );
+    virtual void SetFont( const font_t* font );
     
     /** Gets the display width.
      *  \return Display width in pixels.
@@ -254,6 +254,16 @@
      */
     unsigned short GetHeight( void );
     
+    /** Gets the font width.
+     *  \return The current font width.
+     */
+    uint8_t GetFontWidth( void );
+    
+    /** Gets the font height.
+     *  \return The current font height.
+     */
+    uint8_t GetFontHeight( void );
+    
     /** Fills the whole screen with a single color.
      * \param color The color to be used. The value must be in RGB-565 format.
      * \remarks The special values -1 and -2 signify the preset background and foreground colors, respectively.
@@ -528,7 +538,7 @@
     orientation_t   _orientation;
     colordepth_t    _colorDepth;
     unsigned int    _foreground, _background;
-    font_metrics_t  _font;
+    const font_t*   _font;
 };
 
 #ifdef __cplusplus