![]() |
LCD driver. More...
#include <stdio.h>#include <string.h>#include <stdarg.h>#include "ch.h"#include "hal.h"#include "vex.h"Macros | |
| #define | LCD_DISPLAYS 2 |
| Number of LCD displays supported. More... | |
| #define | LCD_BUF_MAX 32 |
| Size of the LCD output buffer. More... | |
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 | vexLcdSendMessage (LcdData *lcd, int16_t line) |
| Form and send message to LCD. More... | |
| void | vexLcdCheckReceiveMessage (LcdData *lcd) |
| Check for receive data and store. More... | |
| void | vexLcdDebug (vexStream *chp, int argc, char *argv[]) |
| Debug function to dump LCD buffers. More... | |
LCD driver.
| #define LCD_DISPLAYS 2 |
Number of LCD displays supported.
| #define LCD_BUF_MAX 32 |
Size of the LCD output buffer.
| 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 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 vexLcdCheckReceiveMessage | ( | LcdData * | lcd) |
Check for receive data and store.
| [in] | lcd | Pointer to LcdData structure |
| 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 |