Qubit 2020 / presensfirmwareupdate

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers lcd.h Source File

lcd.h

00001 #ifndef LCD_H
00002 #define LCD_H
00003 
00004 #include "cisme.h"
00005 
00006 typedef enum {
00007     JUSTIFICATION_CENTER = 1,
00008     JUSTIFICATION_ABSOLUTE = 3,
00009 } Justification;
00010 
00011 #ifdef USE_LCD
00012 
00013 /**
00014  * Initialize LCD.
00015  */
00016 void lcdInit(void);
00017 
00018 /**
00019  * Clear LCD screen.
00020  */
00021 void lcdClear(void);
00022 
00023 /**
00024  * Clear LCD line.
00025  *
00026  * @param row LCD row.
00027  */
00028 void lcdClearLine(unsigned char row);
00029 
00030 /**
00031  * Send command to write text.
00032  *
00033  * @param row LCD row.
00034  * @param col LCD column.
00035  * @param just Text justification.
00036  * @param format Text format.
00037  */
00038 void lcdWrite(unsigned char row, unsigned char col, Justification just, const char* format, ...);
00039 
00040 
00041 /**
00042  * Get parameter using LCD.
00043  *
00044  * @param min Minimum parameter value.
00045  * @param max Maximum parameter value.
00046  * @param row LCD row to write entered value.
00047  * @param col LCD column to write entered value.
00048  * @return entered value.
00049  */
00050 unsigned long lcdGetParam(unsigned long min, unsigned long max, unsigned char row, unsigned char col);
00051 
00052 #else // USE_LCD
00053 
00054 static inline void lcdInit(void)
00055 {
00056 }
00057 
00058 static inline void lcdClear(void)
00059 {
00060 }
00061 
00062 static inline void lcdClearLine(unsigned char row)
00063 {
00064 }
00065 
00066 static inline void lcdWrite(unsigned char row, unsigned char col, Justification just, const char* format, ...)
00067 {
00068 }
00069 
00070 static inline unsigned long lcdGetParam(unsigned long min, unsigned long max, unsigned char row, unsigned char col)
00071 {
00072     return 0;
00073 }
00074 
00075 #endif // USE_LCD
00076 
00077 #endif // LCD_H