diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-04-04 10:16:30 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-04-04 10:16:30 -0600 |
commit | 6c0df9bdef90762526d5c541b04f6e2b701c8628 (patch) | |
tree | c110f5c3c256e22c0d9b92a715a694228f7bec7a /nuttx/configs | |
parent | 0d7c6b589c7b82fb1b47d715c7ea2f98cca75e15 (diff) | |
download | px4-nuttx-6c0df9bdef90762526d5c541b04f6e2b701c8628.tar.gz px4-nuttx-6c0df9bdef90762526d5c541b04f6e2b701c8628.tar.bz2 px4-nuttx-6c0df9bdef90762526d5c541b04f6e2b701c8628.zip |
ILI9488: Correct some data width issues. Now the ILI9488 driver works fine.
Diffstat (limited to 'nuttx/configs')
-rw-r--r-- | nuttx/configs/samv71-xult/src/sam_ili9488.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nuttx/configs/samv71-xult/src/sam_ili9488.c b/nuttx/configs/samv71-xult/src/sam_ili9488.c index 68d8d394a..734b9794b 100644 --- a/nuttx/configs/samv71-xult/src/sam_ili9488.c +++ b/nuttx/configs/samv71-xult/src/sam_ili9488.c @@ -670,7 +670,7 @@ static int sam_setwindow(FAR struct sam_dev_s *priv, sam_color_t row, sam_color_t col, sam_color_t width, sam_color_t height) { - uint8_t buffer[4]; + uint16_t buffer[4]; int ret; lcdvdbg("row=%d col=%d width=%d height=%d\n", row, col, width, height); @@ -681,7 +681,8 @@ static int sam_setwindow(FAR struct sam_dev_s *priv, sam_color_t row, buffer[1] = col & 0xff; buffer[2] = ((col + width - 1) >> 8) & 0xff; buffer[3] = (col + width - 1) & 0xff; - ret = sam_lcd_put(priv, ILI9488_CMD_COLUMN_ADDRESS_SET, (FAR uint16_t*)buffer, 4); + ret = sam_lcd_put(priv, ILI9488_CMD_COLUMN_ADDRESS_SET, buffer, + 4 * sizeof(uint16_t)); if (ret < 0) { return ret; @@ -699,7 +700,8 @@ static int sam_setwindow(FAR struct sam_dev_s *priv, sam_color_t row, buffer[1] = row & 0xff; buffer[2] = ((row + height - 1) >> 8) & 0xff; buffer[3] = (row + height - 1) & 0xff; - ret = sam_lcd_put(priv, ILI9488_CMD_PAGE_ADDRESS_SET, (FAR uint16_t*)buffer, 4); + ret = sam_lcd_put(priv, ILI9488_CMD_PAGE_ADDRESS_SET, buffer, + 4 * sizeof(uint16_t)); if (ret < 0) { return ret; |