|
@@ -5,11 +5,28 @@
|
|
|
* Author: Philipp Hinz
|
|
|
*/
|
|
|
|
|
|
-#ifndef DISPLAY_H_
|
|
|
-#define DISPLAY_H_
|
|
|
+#ifndef DISPLAY2_H_
|
|
|
+#define DISPLAY2_H_
|
|
|
#include <string>
|
|
|
#include "coffee.h"
|
|
|
|
|
|
+#define DEFAULT_LANG lang_en /**< Default display language */
|
|
|
+#define REFRESH_RATE 5 /**< Display refresh rate in Hz when active */
|
|
|
+#define DISPLAY_ROWS 2
|
|
|
+#define DISPLAY_COLS 16
|
|
|
+
|
|
|
+#define MAX_PAGENAME 20
|
|
|
+
|
|
|
+void *displayThread(void *threadid);
|
|
|
+void *displayTimerHandler(void *threadid);
|
|
|
+void displayInit(void);
|
|
|
+void displayPrintLn(int line, const char* str, bool centered);
|
|
|
+
|
|
|
+void displayPushState(coffee_status_t state);
|
|
|
+
|
|
|
+void displayRefresh(void);
|
|
|
+
|
|
|
+
|
|
|
typedef enum {
|
|
|
lang_de,
|
|
|
lang_en,
|
|
@@ -39,6 +56,25 @@ typedef enum {
|
|
|
str_last
|
|
|
} display_strings_t;
|
|
|
|
|
|
+typedef struct {
|
|
|
+ const char * const pagename[MAX_PAGENAME];
|
|
|
+ void (*ContentFunction)(void);
|
|
|
+ uint16_t refreshrate;
|
|
|
+ uint16_t timeToDisplay;
|
|
|
+ uint16_t displayTime;
|
|
|
+}display2_page_t;
|
|
|
+
|
|
|
+static const display2_page_t pages[] =
|
|
|
+{
|
|
|
+ {
|
|
|
+ {"demopage"},
|
|
|
+ displayInit,
|
|
|
+ 10,
|
|
|
+ 19,
|
|
|
+ 10
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
typedef struct {
|
|
|
char const * const text[lang_last];
|
|
|
} display_string_t;
|
|
@@ -160,21 +196,7 @@ static const display_string_t display_strings[str_last] =
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-#define DEFAULT_LANG lang_en /**< Default display language */
|
|
|
-#define REFRESH_RATE 5 /**< Display refresh rate in Hz when active */
|
|
|
-#define DISPLAY_ROWS 2
|
|
|
-#define DISPLAY_COLS 16
|
|
|
-
|
|
|
-void *displayThread(void *threadid);
|
|
|
-void *displayTimerHandler(void *threadid);
|
|
|
-void displayInit(void);
|
|
|
-void displaySetLang(display_lang_t lang);
|
|
|
-void displayPrintLn(int line, const char* str, bool centered);
|
|
|
-
|
|
|
-void displayPushState(coffee_status_t state);
|
|
|
-
|
|
|
-void displayRefresh(void);
|
|
|
const char* displayGetString(display_strings_t string);
|
|
|
-
|
|
|
+void displaySetLang(display_lang_t lang);
|
|
|
|
|
|
#endif /* DISPLAY_H_ */
|