![]() |
LCD driver macros and prototypes. More...
Go to the source code of this file.
Data Structures | |
| struct | _LcdData |
| Holds all data for a single LCD display. More... | |
Macros | |
| #define | VEX_LCD_BACKLIGHT 0x01 |
| bit for turning backlight on More... | |
| #define | VEX_LCD_DISPLAY_1 0 |
| LCD display on UART1. More... | |
| #define | VEX_LCD_DISPLAY_2 1 |
| LCD display on UART2. More... | |
| #define | VEX_LCD_LINE_1 0 |
| Upper LCD display line. More... | |
| #define | VEX_LCD_LINE_2 1 |
| Lower LCD display line. More... | |
| #define | VEX_LCD_LINE_T 0 |
| Upper LCD display line. More... | |
| #define | VEX_LCD_LINE_B 1 |
| Lower LCD display line. More... | |
Typedefs | |
| typedef struct _LcdData | LcdData |
| Holds all data for a single LCD display. More... | |
| typedef enum _vexLcdButton | vexLcdButton |
Enumerations | |
| enum | _vexLcdButton { kLcdButtonNone = 0, kLcdButtonLeft = 1, kLcdButtonCenter = 2, kLcdButtonLeftCenter = 3, kLcdButtonRight = 4, kLcdButtonLeftRight = 5, kLcdButtonCenterRight = 6, kLcdButtonLeftCenterRight = 7 } |
Functions | |
| void | vexLcdInit (int16_t display, SerialDriver *sdp) |
| Initialize a LCD and bind to serial port. More... | |
| void | vexLcdSet (int16_t display, int16_t line, char *buf) |
| Show text from beginning of an LCD line. More... | |
| void | vexLcdSetAt (int16_t display, int16_t line, int16_t col, char *buf) |
| Show text on LCD line and column. More... | |
| void | vexLcdPrintf (int16_t display, int16_t line, char *fmt,...) |
| Formated output to LCD - similar to printf. More... | |
| void | vexLcdPrintfAt (int16_t display, int16_t line, int16_t col, char *fmt,...) |
| Formated output to LCD - similar to printf. More... | |
| void | vexLcdClearLine (int16_t display, int16_t line) |
| Clear a given lcd display line. More... | |
| void | vexLcdBacklight (int16_t display, int16_t value) |
| Turn on or off the backlight. More... | |
| vexLcdButton | vexLcdButtonGet (int16_t display) |
| Get the current button status. More... | |
| void | vexLcdCheckReceiveMessage (LcdData *lcd) |
| Check for receive data and store. More... | |
| void | vexLcdSendMessage (LcdData *lcd, int16_t line) |
| Form and send message to LCD. More... | |
| void | vexLcdDebug (vexStream *chp, int argc, char *argv[]) |
| Debug function to dump LCD buffers. More... | |
LCD driver macros and prototypes.
| #define VEX_LCD_BACKLIGHT 0x01 |
bit for turning backlight on
| #define VEX_LCD_DISPLAY_1 0 |
LCD display on UART1.
| #define VEX_LCD_DISPLAY_2 1 |
LCD display on UART2.
| #define VEX_LCD_LINE_1 0 |
Upper LCD display line.
| #define VEX_LCD_LINE_2 1 |
Lower LCD display line.
| #define VEX_LCD_LINE_T 0 |
Upper LCD display line.
| #define VEX_LCD_LINE_B 1 |
Lower LCD display line.
| typedef enum _vexLcdButton vexLcdButton |
| enum _vexLcdButton |
| void vexLcdInit | ( | int16_t | display, |
| SerialDriver * | sdp | ||
| ) |
Initialize a LCD and bind to serial port.
| [in] | display | The LCD display id, should be 0 or 1 |
| [in] | sdp | A pointer to the serial driver (chibios hal serial driver) |
| void vexLcdSet | ( | int16_t | display, |
| int16_t | line, | ||
| char * | buf | ||
| ) |
Show text from beginning of an LCD line.
| [in] | display | The LCD display id, 0 or 1 |
| [in] | line | The line to display the text on, 0 or 1 |
| [in] | buf | Pointer to char buffer with test to display |
| void vexLcdSetAt | ( | int16_t | display, |
| int16_t | line, | ||
| int16_t | col, | ||
| char * | buf | ||
| ) |
Show text on LCD line and column.
| [in] | display | The LCD display id, 0 or 1 |
| [in] | line | The line to display the text on, 0 or 1 |
| [in] | col | The position at which to start displaying text |
| [in] | buf | Pointer to char buffer with test to display |
| void vexLcdPrintf | ( | int16_t | display, |
| int16_t | line, | ||
| char * | fmt, | ||
| ... | |||
| ) |
Formated output to LCD - similar to printf.
| [in] | display | The LCD display id, 0 or 1 |
| [in] | line | The line to display the text on, 0 or 1 |
| [in] | fmt | A sprintf style format string with optional variables |
| void vexLcdPrintfAt | ( | int16_t | display, |
| int16_t | line, | ||
| int16_t | col, | ||
| char * | fmt, | ||
| ... | |||
| ) |
Formated output to LCD - similar to printf.
| [in] | display | The LCD display id, 0 or 1 |
| [in] | line | The line to display the text on, 0 or 1 |
| [in] | col | The position at which to start displaying text |
| [in] | fmt | A sprintf style format string with optional variables |
| void vexLcdClearLine | ( | int16_t | display, |
| int16_t | line | ||
| ) |
Clear a given lcd display line.
| [in] | display | The LCD display id, 0 or 1 |
| [in] | line | The line to display the text on, 0 or 1 |
| void vexLcdBacklight | ( | int16_t | display, |
| int16_t | value | ||
| ) |
Turn on or off the backlight.
| [in] | display | The LCD display id, 0 or 1 |
| [in] | value | 1 for backlight on, 0 for off |
| vexLcdButton vexLcdButtonGet | ( | int16_t | display) |
Get the current button status.
| [in] | display | The LCD display id, 0 or 1 |
| void vexLcdCheckReceiveMessage | ( | LcdData * | lcd) |
Check for receive data and store.
| [in] | lcd | Pointer to LcdData structure |
| void vexLcdSendMessage | ( | LcdData * | lcd, |
| int16_t | line | ||
| ) |
Form and send message to LCD.
| [in] | lcd | Pointer to LcdData structure |
| [in] | line | The line to display the text on, 0 or 1 |
| void vexLcdDebug | ( | vexStream * | chp, |
| int | argc, | ||
| char * | argv[] | ||
| ) |
Debug function to dump LCD buffers.
| [in] | chp | A pointer to a vexStream object |
| [in] | argc | The number of command line arguments |
| [in] | argv | An array of pointers to the command line args |