From b90b4d40b633a9042bd0d9110a3bdb6c5d92da3b Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 17 Sep 2017 10:38:34 -0600 Subject: [PATCH] Fix typos/spelling. SAMV71-XULT: Update README, add support for fb_driver. --- arch/arm/src/lpc17xx/lpc17_lcd.c | 8 ++++---- configs/samv71-xult/README.txt | 6 ------ configs/samv71-xult/src/sam_bringup.c | 11 +++++++++++ drivers/video/fb.c | 3 ++- include/nuttx/video/fb.h | 8 ++++---- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/arch/arm/src/lpc17xx/lpc17_lcd.c b/arch/arm/src/lpc17xx/lpc17_lcd.c index f8a6c6db6c..dde2d50ae0 100644 --- a/arch/arm/src/lpc17xx/lpc17_lcd.c +++ b/arch/arm/src/lpc17xx/lpc17_lcd.c @@ -129,7 +129,7 @@ static int lpc17_putcmap(FAR struct fb_vtable_s *vtable, static int lpc17_getcursor(FAR struct fb_vtable_s *vtable, FAR struct fb_cursorattrib_s *attrib); static int lpc17_setcursor(FAR struct fb_vtable_s *vtable, - FAR struct fb_setcursor_s *setttings); + FAR struct fb_setcursor_s *settings); #endif /**************************************************************************** @@ -414,10 +414,10 @@ static int lpc17_getcursor(FAR struct fb_vtable_s *vtable, #ifdef CONFIG_FB_HWCURSOR static int lpc17_setcursor(FAR struct fb_vtable_s *vtable, - FAR struct fb_setcursor_s *setttings) + FAR struct fb_setcursor_s *settings) { - lcdinfo("vtable=%p setttings=%p\n", vtable, setttings); - if (vtable && setttings) + lcdinfo("vtable=%p settings=%p\n", vtable, settings); + if (vtable && settings) { lcdinfo("flags: %02x\n", settings->flags); if ((flags & FB_CUR_SETPOSITION) != 0) diff --git a/configs/samv71-xult/README.txt b/configs/samv71-xult/README.txt index 204271892d..3457ff5237 100644 --- a/configs/samv71-xult/README.txt +++ b/configs/samv71-xult/README.txt @@ -1706,12 +1706,6 @@ NOTES: System Type -> Toolchain: CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW=y : GNU ARM EABI toolchain - NOTE: As of this writing, there are issues with using this tool at - the -Os level of optimization. This has not been proven to be a - compiler issue (as least not one that might not be fixed with a - well placed volatile qualifier). However, in any event, it is - recommend that you use not more that -O2 optimization. - Configuration sub-directories ----------------------------- diff --git a/configs/samv71-xult/src/sam_bringup.c b/configs/samv71-xult/src/sam_bringup.c index 68460f1cb4..5d6e288e21 100644 --- a/configs/samv71-xult/src/sam_bringup.c +++ b/configs/samv71-xult/src/sam_bringup.c @@ -56,6 +56,7 @@ #include #include #include +#include #include "sam_twihs.h" #include "samv71-xult.h" @@ -551,6 +552,16 @@ int sam_bringup(void) } #endif +#ifdef CONFIG_VIDEO_FB + /* Initialize and register the LCD framebuffer driver */ + + ret = fb_register(0, 0); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: fb_register() failed: %d\n", ret); + } +#endif + /* If we got here then perhaps not all initialization was successful, but * at least enough succeeded to bring-up NSH with perhaps reduced * capabilities. diff --git a/drivers/video/fb.c b/drivers/video/fb.c index 92c79e1ce8..42b62776d6 100644 --- a/drivers/video/fb.c +++ b/drivers/video/fb.c @@ -184,7 +184,8 @@ static ssize_t fb_read(FAR struct file *filep, FAR char *buffer, size_t len) * Name: fb_write ****************************************************************************/ -static ssize_t fb_write(FAR struct file *filep, FAR const char *buffer, size_t len) +static ssize_t fb_write(FAR struct file *filep, FAR const char *buffer, + size_t len) { FAR struct inode *inode; FAR struct fb_chardev_s *fb; diff --git a/include/nuttx/video/fb.h b/include/nuttx/video/fb.h index 8a85d505b4..fdc283f263 100644 --- a/include/nuttx/video/fb.h +++ b/include/nuttx/video/fb.h @@ -230,10 +230,10 @@ typedef uint16_t fb_coord_t; struct fb_videoinfo_s { - uint8_t fmt; /* see FB_FMT_* */ - fb_coord_t xres; /* Horizontal resolution in pixel columns */ - fb_coord_t yres; /* Vertical resolution in pixel rows */ - uint8_t nplanes; /* Number of color planes supported */ + uint8_t fmt; /* see FB_FMT_* */ + fb_coord_t xres; /* Horizontal resolution in pixel columns */ + fb_coord_t yres; /* Vertical resolution in pixel rows */ + uint8_t nplanes; /* Number of color planes supported */ }; /* This structure describes one color plane. Some YUV formats may support