Extentions SCLD test; SCLD CODEC and LCD1602 driver bug fixes
This commit is contained in:
parent
6c64f9286a
commit
e0e60eae7b
@ -665,15 +665,12 @@ Configuration sub-directories
|
||||
|
||||
To enable LCD debug output:
|
||||
|
||||
Device Drivers:
|
||||
CONFIG_LCD=y : (Needed to enable LCD debug)
|
||||
|
||||
Build Setup:
|
||||
CONFIG_DEBUG=y : Enable debug features
|
||||
CONFIG_DEBUG_VERBOSE=y : Enable LCD debug
|
||||
|
||||
NOTE: At this point in time, testing of the SLCD is very limited because
|
||||
there is not much in apps/examples/slcd. Certainly there are more bugs
|
||||
to be found. There are also many segment-encoded glyphs in stm32_lcd.c
|
||||
But there is a basically functional driver with a working test setup
|
||||
that can be extended if you want a fully functional SLCD driver.
|
||||
to be found. But there is a basically functional driver with a working
|
||||
test setup that can be extended if you want a fully functional LCD1602
|
||||
driver.
|
||||
|
@ -73,6 +73,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <semaphore.h>
|
||||
#include <ctype.h>
|
||||
#include <poll.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
@ -122,7 +123,6 @@
|
||||
|
||||
/* LCD **********************************************************************/
|
||||
|
||||
|
||||
#define LCD_NROWS 2
|
||||
#define LCD_NCOLUMNS 16
|
||||
#define LCD_NCHARS (LCD_NROWS * LCD_NCOLUMNS)
|
||||
@ -225,8 +225,9 @@ static struct lcd1602_2 g_lcd1602;
|
||||
static void lcd_dumpstate(FAR const char *msg)
|
||||
{
|
||||
uint8_t buffer[LCD_NCOLUMNS];
|
||||
uint8_t row;
|
||||
uint8_t column;
|
||||
uint8_t ch;
|
||||
int row;
|
||||
int column;
|
||||
|
||||
lcdvdbg("%s:\n", msg);
|
||||
lcdvdbg(" currow: %d curcol: %d\n",
|
||||
@ -234,10 +235,11 @@ static void lcd_dumpstate(FAR const char *msg)
|
||||
|
||||
for (row = 0, column = 0; row < LCD_NROWS; )
|
||||
{
|
||||
buffer[column] = lcd_readch(row, column);
|
||||
ch = lcd_readch(row, column);
|
||||
buffer[column] = isprint(ch) ? ch : '.';
|
||||
if (++column >= LCD_NCOLUMNS)
|
||||
{
|
||||
lcdvdbg(" %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n",
|
||||
lcdvdbg(" [%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c]\n",
|
||||
buffer[0], buffer[1], buffer[2], buffer[3],
|
||||
buffer[4], buffer[5], buffer[6], buffer[7],
|
||||
buffer[8], buffer[9], buffer[10], buffer[11],
|
||||
@ -551,9 +553,9 @@ static void lcd_action(enum slcdcode_e code, uint8_t count)
|
||||
{
|
||||
/* Don't permit movement past the bottom of the SLCD */
|
||||
|
||||
if (g_lcd1602.curcol < (LCD_NCOLUMNS - 1))
|
||||
if (g_lcd1602.currow < (LCD_NCOLUMNS - 1))
|
||||
{
|
||||
g_lcd1602.curcol++;
|
||||
g_lcd1602.currow++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user