diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-06-04 20:36:18 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-06-04 20:36:18 +0000 |
commit | acd914acaa2bd4e4c2d06b9e8b8127439192c388 (patch) | |
tree | db612b74230d33223637fc9f342d440f78a91684 /nuttx/drivers | |
parent | 4db71bbe20f1415ed9a7bb1021992d33d0900f01 (diff) | |
download | px4-nuttx-acd914acaa2bd4e4c2d06b9e8b8127439192c388.tar.gz px4-nuttx-acd914acaa2bd4e4c2d06b9e8b8127439192c388.tar.bz2 px4-nuttx-acd914acaa2bd4e4c2d06b9e8b8127439192c388.zip |
The PIC32MX7 MMB's mio832qt2 LCD is functional
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4803 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers')
-rw-r--r-- | nuttx/drivers/lcd/mio283qt2.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/nuttx/drivers/lcd/mio283qt2.c b/nuttx/drivers/lcd/mio283qt2.c index ce373de7e..1758e230c 100644 --- a/nuttx/drivers/lcd/mio283qt2.c +++ b/nuttx/drivers/lcd/mio283qt2.c @@ -284,14 +284,17 @@ struct mio283qt2_dev_s /* Low Level LCD access */ static void mio283qt2_putreg(FAR struct mio283qt2_lcd_s *lcd, uint8_t regaddr, - uint16_t regval); + uint16_t regval); #ifndef CONFIG_LCD_NOGETRUN static uint16_t mio283qt2_readreg(FAR struct mio283qt2_lcd_s *lcd, uint8_t regaddr); #endif -static inline void mio283qt2_gramwrite(FAR struct mio283qt2_lcd_s *lcd, uint16_t rgbcolor); +static inline void mio283qt2_gramwrite(FAR struct mio283qt2_lcd_s *lcd, + uint16_t rgbcolor); #ifndef CONFIG_LCD_NOGETRUN -static inline void mio283qt2_readsetup(FAR struct mio283qt2_lcd_s *lcd, FAR uint16_t *accum); -static inline uint16_t mio283qt2_gramread(FAR struct mio283qt2_lcd_s *lcd, FAR uint16_t *accum); +static inline void mio283qt2_readsetup(FAR struct mio283qt2_lcd_s *lcd, + FAR uint16_t *accum); +static inline uint16_t mio283qt2_gramread(FAR struct mio283qt2_lcd_s *lcd, + FAR uint16_t *accum); #endif static void mio283qt2_setarea(FAR struct mio283qt2_lcd_s *lcd, uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1); @@ -356,7 +359,8 @@ static struct mio283qt2_dev_s g_lcddev; * **************************************************************************************/ -static void mio283qt2_putreg(FAR struct mio283qt2_lcd_s *lcd, uint8_t regaddr, uint16_t regval) +static void mio283qt2_putreg(FAR struct mio283qt2_lcd_s *lcd, + uint8_t regaddr, uint16_t regval) { /* Set the index register to the register address and write the register contents */ @@ -375,7 +379,7 @@ static void mio283qt2_putreg(FAR struct mio283qt2_lcd_s *lcd, uint8_t regaddr, u #ifndef CONFIG_LCD_NOGETRUN static uint16_t mio283qt2_readreg(FAR struct mio283qt2_lcd_s *lcd, uint8_t regaddr) { - /* Set the index register to the register address and read the register contents */ + /* Set the index register to the register address and read the register contents. */ lcd->index(lcd, regaddr); return lcd->read(lcd); @@ -421,11 +425,14 @@ static inline void mio283qt2_gramwrite(FAR struct mio283qt2_lcd_s *lcd, uint16_t **************************************************************************************/ #ifndef CONFIG_LCD_NOGETRUN -static inline void mio283qt2_readsetup(FAR struct mio283qt2_lcd_s *lcd, FAR uint16_t *accum) +static inline void mio283qt2_readsetup(FAR struct mio283qt2_lcd_s *lcd, + FAR uint16_t *accum) { +#if 0 /* Probably not necessary... untested */ /* Read-ahead one pixel */ *accum = lcd->read(lcd); +#endif } #endif @@ -441,7 +448,8 @@ static inline void mio283qt2_readsetup(FAR struct mio283qt2_lcd_s *lcd, FAR uint **************************************************************************************/ #ifndef CONFIG_LCD_NOGETRUN -static inline uint16_t mio283qt2_gramread(FAR struct mio283qt2_lcd_s *lcd, FAR uint16_t *accum) +static inline uint16_t mio283qt2_gramread(FAR struct mio283qt2_lcd_s *lcd, + FAR uint16_t *accum) { /* Read the value (GRAM register already selected) */ @@ -516,7 +524,7 @@ static void mio283qt2_dumprun(FAR const char *msg, FAR uint16_t *run, size_t npi **************************************************************************************/ static int mio283qt2_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer, - size_t npixels) + size_t npixels) { FAR struct mio283qt2_dev_s *priv = &g_lcddev; FAR struct mio283qt2_lcd_s *lcd = priv->lcd; @@ -564,7 +572,7 @@ static int mio283qt2_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *b **************************************************************************************/ static int mio283qt2_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, - size_t npixels) + size_t npixels) { #ifndef CONFIG_LCD_NOGETRUN FAR struct mio283qt2_dev_s *priv = &g_lcddev; @@ -620,7 +628,7 @@ static int mio283qt2_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, **************************************************************************************/ static int mio283qt2_getvideoinfo(FAR struct lcd_dev_s *dev, - FAR struct fb_videoinfo_s *vinfo) + FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); lcdvdbg("fmt: %d xres: %d yres: %d nplanes: 1\n", @@ -642,7 +650,7 @@ static int mio283qt2_getvideoinfo(FAR struct lcd_dev_s *dev, **************************************************************************************/ static int mio283qt2_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, - FAR struct lcd_planeinfo_s *pinfo) + FAR struct lcd_planeinfo_s *pinfo) { FAR struct mio283qt2_dev_s *priv = (FAR struct mio283qt2_dev_s *)dev; |