Example Host software for integration of MAX3266x chips (, MAX32664GWEB) equipped with Heart Rate from Wrist Algorithm. This is “stand-alone” software that runs on the MAX32630 low-power microcontroller to display heart rate on the display of the MAXREFDES101 reference design. It is intended provide a simple example of how to initialize and communicate with the sensor hub. Windows and Android communications are not supported.

Dependencies:   Maxim_Sensor_Hub_Communications BMI160 whrmDemoUI max32630hsp3

Fork of Host_Software_MAX32664GWEB_HR_wrist by mehmet gok

Revision:
13:3d1a6b947396
Parent:
0:ddc2fef69ef9
diff -r 9e3de2ece9c4 -r 3d1a6b947396 demoUI/screen/TextDisplay.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demoUI/screen/TextDisplay.h	Thu Jan 10 11:06:01 2019 +0300
@@ -0,0 +1,92 @@
+/* mbed TextDisplay Library Base Class
+ * Copyright (c) 2007-2009 sford
+ * Released under the MIT License: http://mbed.org/license/mit
+ *
+ * A common base class for Text displays
+ * To port a new display, derive from this class and implement
+ * the constructor (setup the display), character (put a character
+ * at a location), rows and columns (number of rows/cols) functions.
+ * Everything else (locate, printf, putc, cls) will come for free
+ *
+ * The model is the display will wrap at the right and bottom, so you can
+ * keep writing and will always get valid characters. The location is 
+ * maintained internally to the class to make this easy
+ */
+
+#ifndef MBED_TEXTDISPLAY_H
+#define MBED_TEXTDISPLAY_H
+
+#include "../screen/LCDSettings.h"
+#include "mbed.h"
+
+class TextDisplay {
+public:
+
+  // functions needing implementation in derived implementation class
+  /** Create a TextDisplay interface
+     *
+     * @param name The name used in the path to access the strean through the filesystem
+     */
+    TextDisplay(const char *name = NULL);
+
+    /** output a character at the given position
+     *
+     * @param column column where charater must be written
+     * @param  row where character must be written
+     * @param c the character to be written to the TextDisplay
+     */
+    virtual void character(int column, int row, int c) = 0;
+
+    /** return number if rows on TextDisplay
+     * @result number of rows
+     */
+    virtual int rows() = 0;
+
+    /** return number if columns on TextDisplay
+    * @result number of rows
+    */
+    virtual int columns() = 0;
+    
+    // Sets external font usage, eg. dispaly.set_font(Arial12x12);
+    // This uses pixel positioning.
+    // display.set_font(NULL); returns to internal default font.
+    void set_font(const unsigned char * f);
+    
+    // set position of the next character or string print.
+    // External font, set pixel x(column),y(row) position.
+    // internal(default) font, set character column and row position 
+    virtual void locate(int column, int row);
+    
+    // functions that come for free, but can be overwritten
+
+    /** clear screen
+    */
+    virtual void cls();
+    virtual void foreground(uint16_t colour);
+    virtual void background(uint16_t colour);
+    // putc (from Stream)
+    // printf (from Stream)
+    virtual void printf(const char* format, ...);
+    
+protected:
+
+    virtual int _putc(int value);
+    virtual int _getc();
+    
+    // external font functions
+    const unsigned char* font;
+    int externalfont;
+ 
+    // character location
+    uint16_t _column;
+    uint16_t _row;
+    unsigned int char_x;
+    unsigned int char_y;
+
+    // colours
+    uint16_t _foreground;
+    uint16_t _background;
+    char *_path;
+};
+
+#endif