Defines | |
#define | kpadHasKeys(kpadNum) (kpadBufPut[kpadNum] != kpadBufGet[kpadNum]) |
#define | LCD2S_I2C_ADR 80ul |
Functions | |
BYTE | kpadGetKey (BYTE kpadNum) |
void | lcdInit (void) |
BYTE | lcdPutArray (BYTE lcdNum, BYTE *s, BYTE len) |
void | lcdPutByte (BYTE lcdNum, BYTE c) |
void | lcdPutByteHex (BYTE lcdNum, BYTE c) |
BYTE | lcdPutRomString (BYTE lcdNum, ROM char *s) |
BYTE | lcdPutString (BYTE lcdNum, BYTE *s) |
void | lcdService (void) |
Variables | |
BYTE | kpadBufGet [LCD2S_MAX_NUMBER] |
BYTE | kpadBufPut [LCD2S_MAX_NUMBER] |
//********************************************************************* //-------------- Serint Configuration -------------------- //********************************************************************* //Define the default I2C address for the LCD display #define LCD2S_DEFAULT_I2C_ADR (80ul) //Define the I2C address for the LCD display #define LCD2S_I2C_ADR LCD2S_DEFAULT_I2C_ADR //Define number of serial LCD displays supported #define LCD2S_MAX_NUMBER 1 //Define size of keypad buffer for each serial LCD display, must be 8,16,32 or 64 #define KPAD_BUF_SIZE 8ul
#define kpadHasKeys | ( | kpadNum | ) | (kpadBufPut[kpadNum] != kpadBufGet[kpadNum]) |
Are there any keys in the keypad buffer.
#define LCD2S_I2C_ADR 80ul |
Get the next key from the keypad buffer. Before calling this function, the kpadHasKeys() function should be called to check if there are any keys to be read from the keypad buffer.
kpadNum | The number of the keypad you want to access. Is a number from 0-n. If, for example, the system is configured for 4 keypads, it is a number from 0-3. |
void lcdInit | ( | void | ) |
Called in the USART TX ISR
Writes given number of characters from given buffer to the LCD Display.
lcdNum | The number of the LCD you want to access. Is a number from 0-n. If, for example, the system is configured for 4 LCDs, it is a number from 0-3. | |
s | Buffer containing data to send to LCD Display | |
len | Number of bytes to send from given buffer |
Send the given byte to the LCD Display. It is appended to the current LCD display. The following bytes have special meanings:
lcdNum | The number of the LCD you want to access. Is a number from 0-n. If, for example, the system is configured for 4 LCDs, it is a number from 0-3. | |
c | Byte to write out on the serial port |
Send the ASCII hex value of the given byte to the LCD Display. It is appended to the current LCD Display. For example, if c=11, then "0B" will be sent to the LCD Display
lcdNum | The number of the LCD you want to access. Is a number from 0-n. If, for example, the system is configured for 4 LCDs, it is a number from 0-3. | |
c | Byte to write out on the serial port |
Sends a NULL terminated string to the LCD Display. It is appended to the current LCD Display string. The NULL is NOT sent!
lcdNum | The number of the LCD you want to access. Is a number from 0-n. If, for example, the system is configured for 4 LCDs, it is a number from 0-3. | |
s | Null terminated string to write out to the LCD Display |
Sends a NULL terminated string to the LCD Display. It is appended to the current LCD Display string. The NULL is NOT sent!
lcdNum | The number of the LCD you want to access. Is a number from 0-n. If, for example, the system is configured for 4 LCDs, it is a number from 0-3. | |
s | Null terminated string to write out to the LCD Display |
void lcdService | ( | void | ) |
Service this module
BYTE kpadBufGet[LCD2S_MAX_NUMBER] |
BYTE kpadBufPut[LCD2S_MAX_NUMBER] |