mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
Remove whitespace from the end of lines
This commit is contained in:
@@ -567,24 +567,24 @@ static void lcd_init(FAR struct pcf8574_lcd_dev_s *priv)
|
|||||||
latch_nybble(priv, 0x20>>4, false);
|
latch_nybble(priv, 0x20>>4, false);
|
||||||
|
|
||||||
/* Function set: DL=0;Interface is 4 bits, N=1 (2 Lines), F=0 (5x8 dots font) */
|
/* Function set: DL=0;Interface is 4 bits, N=1 (2 Lines), F=0 (5x8 dots font) */
|
||||||
|
|
||||||
lcd_putcmd(priv, 0x28);
|
lcd_putcmd(priv, 0x28);
|
||||||
|
|
||||||
/* Display Off: D=0 (Display off), C=0 (Cursor Off), B=0 (Blinking Off) */
|
/* Display Off: D=0 (Display off), C=0 (Cursor Off), B=0 (Blinking Off) */
|
||||||
|
|
||||||
lcd_putcmd(priv, 0x08);
|
lcd_putcmd(priv, 0x08);
|
||||||
|
|
||||||
/* Display Clear */
|
/* Display Clear */
|
||||||
|
|
||||||
lcd_putcmd(priv, CMD_CLEAR);
|
lcd_putcmd(priv, CMD_CLEAR);
|
||||||
up_udelay(DELAY_US_HOMECLEAR); /* clear needs extra time */
|
up_udelay(DELAY_US_HOMECLEAR); /* clear needs extra time */
|
||||||
|
|
||||||
/* Entry Mode Set: I/D=1 (Increment), S=0 (No shift) */
|
/* Entry Mode Set: I/D=1 (Increment), S=0 (No shift) */
|
||||||
|
|
||||||
lcd_putcmd(priv, 0x06);
|
lcd_putcmd(priv, 0x06);
|
||||||
|
|
||||||
/* Display On, Cursor Off */
|
/* Display On, Cursor Off */
|
||||||
|
|
||||||
lcd_putcmd(priv, 0x0C);
|
lcd_putcmd(priv, 0x0C);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -610,7 +610,7 @@ static void lcd_create_char(FAR struct pcf8574_lcd_dev_s *priv,
|
|||||||
{
|
{
|
||||||
int nIdx;
|
int nIdx;
|
||||||
uint8_t addr;
|
uint8_t addr;
|
||||||
|
|
||||||
(void)lcd_read_busy_addr(priv, &addr);
|
(void)lcd_read_busy_addr(priv, &addr);
|
||||||
lcd_putcmd(priv, CMD_SET_CGADDR | (idxchar << 3)); /* set CGRAM address */
|
lcd_putcmd(priv, CMD_SET_CGADDR | (idxchar << 3)); /* set CGRAM address */
|
||||||
|
|
||||||
@@ -737,7 +737,7 @@ static void lcd_codec_action(FAR struct pcf8574_lcd_dev_s *priv,
|
|||||||
{
|
{
|
||||||
if (count <= 0) /* silly case */
|
if (count <= 0) /* silly case */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
uint8_t row;
|
uint8_t row;
|
||||||
@@ -817,12 +817,12 @@ static void lcd_codec_action(FAR struct pcf8574_lcd_dev_s *priv,
|
|||||||
{
|
{
|
||||||
end = priv->cfg.cols;
|
end = priv->cfg.cols;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (nIdx = col; nIdx < end; ++nIdx)
|
for (nIdx = col; nIdx < end; ++nIdx)
|
||||||
{
|
{
|
||||||
lcd_putdata(priv, ' ');
|
lcd_putdata(priv, ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
lcd_set_curpos(priv, row, col);
|
lcd_set_curpos(priv, row, col);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -841,12 +841,12 @@ static void lcd_codec_action(FAR struct pcf8574_lcd_dev_s *priv,
|
|||||||
uint8_t nIdx;
|
uint8_t nIdx;
|
||||||
|
|
||||||
lcd_get_curpos(priv, &row, &col);
|
lcd_get_curpos(priv, &row, &col);
|
||||||
|
|
||||||
for (nIdx = col; nIdx < priv->cfg.cols; ++nIdx)
|
for (nIdx = col; nIdx < priv->cfg.cols; ++nIdx)
|
||||||
{
|
{
|
||||||
lcd_putdata(priv, ' ');
|
lcd_putdata(priv, ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
lcd_set_curpos(priv, row, col);
|
lcd_set_curpos(priv, row, col);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -932,7 +932,7 @@ static void lcd_codec_action(FAR struct pcf8574_lcd_dev_s *priv,
|
|||||||
lcd_set_curpos(priv, row, 0);
|
lcd_set_curpos(priv, row, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SLCDCODE_END: /* Cursor end */
|
case SLCDCODE_END: /* Cursor end */
|
||||||
{
|
{
|
||||||
uint8_t row;
|
uint8_t row;
|
||||||
@@ -1356,7 +1356,7 @@ int pcf8574_lcd_backpack_register(FAR const char *devpath,
|
|||||||
{
|
{
|
||||||
FAR struct pcf8574_lcd_dev_s *priv;
|
FAR struct pcf8574_lcd_dev_s *priv;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Sanity check on geometry */
|
/* Sanity check on geometry */
|
||||||
|
|
||||||
if (cfg->rows < 1 || cfg->rows > 4)
|
if (cfg->rows < 1 || cfg->rows > 4)
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ E.g.:
|
|||||||
|
|
||||||
#include <nuttx/i2c/i2c_master.h>
|
#include <nuttx/i2c/i2c_master.h>
|
||||||
#include "pcf8574_lcd_backpack.h"
|
#include "pcf8574_lcd_backpack.h"
|
||||||
|
|
||||||
#define MJKDZ_I2C_PORTNO 1
|
#define MJKDZ_I2C_PORTNO 1
|
||||||
#define MJKDZ_DEVICE_NAME "/dev/lcd0"
|
#define MJKDZ_DEVICE_NAME "/dev/lcd0"
|
||||||
|
|
||||||
@@ -242,4 +242,4 @@ Troubleshooting
|
|||||||
range of voltages at this pin is very narrow, and outside that
|
range of voltages at this pin is very narrow, and outside that
|
||||||
range there will be nothing visible on the display, so most of the
|
range there will be nothing visible on the display, so most of the
|
||||||
turn range of the pot is non-useful. Much of human life has been
|
turn range of the pot is non-useful. Much of human life has been
|
||||||
wasted in the rediscovery of this farcically idiotic
|
wasted in the rediscovery of this farcically idiotic
|
||||||
|
|||||||
Reference in New Issue
Block a user