summaryrefslogtreecommitdiff
path: root/nuttx/configs/pcblogic-pic32mx/src/pic32mx_lcd1602.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/configs/pcblogic-pic32mx/src/pic32mx_lcd1602.c')
-rw-r--r--nuttx/configs/pcblogic-pic32mx/src/pic32mx_lcd1602.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/nuttx/configs/pcblogic-pic32mx/src/pic32mx_lcd1602.c b/nuttx/configs/pcblogic-pic32mx/src/pic32mx_lcd1602.c
index e2be0a243..d12c6bdab 100644
--- a/nuttx/configs/pcblogic-pic32mx/src/pic32mx_lcd1602.c
+++ b/nuttx/configs/pcblogic-pic32mx/src/pic32mx_lcd1602.c
@@ -786,26 +786,28 @@ static int lcd_ioctl(FAR struct file *filp, int cmd, unsigned long arg)
switch (cmd)
{
- /* SLCDIOC_GEOMETRY: Get the SLCD geometry (rows x characters)
+ /* SLCDIOC_GETATTRIBUTES: Get the attributes of the SLCD
*
- * argument: Pointer to struct slcd_geometry_s in which values will be
+ * argument: Pointer to struct slcd_attributes_s in which values will be
* returned
*/
- case SLCDIOC_GEOMETRY:
+ case SLCDIOC_GETATTRIBUTES:
{
- FAR struct slcd_geometry_s *geo = (FAR struct slcd_geometry_s *)((uintptr_t)arg);
+ FAR struct slcd_attributes_s *attr = (FAR struct slcd_attributes_s *)((uintptr_t)arg);
- lcdvdbg("SLCDIOC_GEOMETRY: nrows=%d ncolumns=%d\n", LCD_NROWS, LCD_NCOLUMNS);
+ lcdvdbg("SLCDIOC_GETATTRIBUTES:\n");
- if (!geo)
+ if (!attr)
{
return -EINVAL;
}
- geo->nrows = LCD_NROWS;
- geo->ncolumns = LCD_NCOLUMNS;
- geo->nbars = 0;
+ attr->nrows = LCD_NROWS;
+ attr->ncolumns = LCD_NCOLUMNS;
+ attr->nbars = 0;
+ attr->maxcontrast = 0;
+ attr->maxbrightness = 0
}
break;
@@ -832,10 +834,11 @@ static int lcd_ioctl(FAR struct file *filp, int cmd, unsigned long arg)
}
break;
- case SLCDIOC_SETBAR: /* SLCDIOC_SETBAR: Set bars on a bar display */
- case SLCDIOC_GETCONTRAST: /* SLCDIOC_GETCONTRAST: Get the current contrast setting */
- case SLCDIOC_MAXCONTRAST: /* SLCDIOC_MAXCONTRAST: Get the maximum contrast setting */
- case SLCDIOC_SETCONTRAST: /* SLCDIOC_SETCONTRAST: Set the contrast to a new value */
+ case SLCDIOC_SETBAR: /* SLCDIOC_SETBAR: Set bars on a bar display */
+ case SLCDIOC_GETCONTRAST: /* SLCDIOC_GETCONTRAST: Get the current contrast setting */
+ case SLCDIOC_SETCONTRAST: /* SLCDIOC_SETCONTRAST: Set the contrast to a new value */
+ case SLCDIOC_GETBRIGHTNESS: /* Get the current brightness setting */
+ case SLCDIOC_SETBRIGHTNESS: /* Set the brightness to a new value */
default:
return -ENOTTY;
}