diff --git a/configs/flipnclick-pic32mz/src/pic32mz_spi.c b/configs/flipnclick-pic32mz/src/pic32mz_spi.c index 6a0dd95f6f..cf9efb6a5f 100644 --- a/configs/flipnclick-pic32mz/src/pic32mz_spi.c +++ b/configs/flipnclick-pic32mz/src/pic32mz_spi.c @@ -115,6 +115,10 @@ void pic32mz_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selecte defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBD) if (devid == SPIDEV_DISPLAY(0)) { + /* Low: the display is selected + * High: the display is deselected + */ + pic32mz_gpiowrite(GPIO_HILETGO_CS, !selected); } #endif @@ -132,6 +136,10 @@ int pic32mz_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBD) if (devid == SPIDEV_DISPLAY(0)) { + /* High: the inputs are treated as display data. + * Low: the inputs are transferred to the command registers. + */ + pic32mz_gpiowrite(GPIO_HILETGO_DC, !cmd); } #endif @@ -150,6 +158,10 @@ void pic32mz_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selecte defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBB) if (devid == SPIDEV_DISPLAY(0)) { + /* Low: the display is selected + * High: the display is deselected + */ + pic32mz_gpiowrite(GPIO_HILETGO_CS, !selected); } #endif @@ -167,6 +179,10 @@ int pic32mz_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBB) if (devid == SPIDEV_DISPLAY(0)) { + /* High: the inputs are treated as display data. + * Low: the inputs are transferred to the command registers. + */ + pic32mz_gpiowrite(GPIO_HILETGO_DC, !cmd); } #endif diff --git a/drivers/lcd/pcd8544.h b/drivers/lcd/pcd8544.h index 9b03af9407..8bbf36c0e1 100644 --- a/drivers/lcd/pcd8544.h +++ b/drivers/lcd/pcd8544.h @@ -1,6 +1,5 @@ /************************************************************************************** * drivers/lcd/pcd8544.h - * * Definitions for the PCD8544 LCD Display * * Copyright (C) 2017 Alan Carvalho de Assis. All rights reserved.