I get compile warnings for undeclared identifiers "DISPLAY_ON" "CURSOR_ON" and "CURSOR_BLINK" in tdisp_lld.c
This is the relevant code block:
Code: Select all
void tdisp_lld_control(uint16_t what, uint16_t value) {
switch(what) {
case TDISP_CTRL_BACKLIGHT:
if ((uint8_t)value)
displaycontrol |= DISPLAY_ON;
else
displaycontrol &= ~DISPLAY_ON;
write_cmd(0x08 | displaycontrol);
break;
case TDISP_CTRL_CURSOR:
switch((uint8_t)value) {
case cursorOff:
displaycontrol &= ~CURSOR_ON;
break;
case cursorBlock:
case cursorUnderline:
case cursorBar:
displaycontrol = (displaycontrol | CURSOR_ON) & ~CURSOR_BLINK;
break;
case cursorBlinkingBlock:
case cursorBlinkingUnderline:
case cursorBlinkingBar:
default:
displaycontrol |= (CURSOR_ON | CURSOR_BLINK);
break;
}
write_cmd(0x08 | displaycontrol);
break;
}
}
However at the top of the file is this section:
Code: Select all
/* Our display control */
#define TDISP_DISPLAY_ON 0x04
#define TDISP_CURSOR_ON 0x02
#define TDISP_CURSOR_BLINK 0x01
Are these the intended ones ?
Chris