boards/arm/stm32/hymini-stm32v/src/stm32_ssd1289.c: Appease nxstyle
This commit is contained in:
parent
4de9428d95
commit
ed974dc5e6
@ -34,6 +34,10 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -60,7 +64,7 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Configuration **********************************************************************/
|
/* Configuration ************************************************************/
|
||||||
|
|
||||||
#ifndef CONFIG_STM32_FSMC
|
#ifndef CONFIG_STM32_FSMC
|
||||||
# error "CONFIG_STM32_FSMC is required to use the LCD"
|
# error "CONFIG_STM32_FSMC is required to use the LCD"
|
||||||
@ -83,7 +87,10 @@
|
|||||||
|
|
||||||
#define LCD_BL_TIMER_PERIOD 8999
|
#define LCD_BL_TIMER_PERIOD 8999
|
||||||
|
|
||||||
/* LCD is connected to the FSMC_Bank1_NOR/SRAM1 and NE1 is used as ship select signal */
|
/* LCD is connected to the FSMC_Bank1_NOR/SRAM1 and NE1 is used as ship
|
||||||
|
* select signal
|
||||||
|
*/
|
||||||
|
|
||||||
/* RS <==> A16 */
|
/* RS <==> A16 */
|
||||||
|
|
||||||
#define LCD_INDEX 0x60000000 /* RS = 0 */
|
#define LCD_INDEX 0x60000000 /* RS = 0 */
|
||||||
@ -228,7 +235,8 @@ static void stm32_write(FAR struct ssd1289_lcd_s *dev, uint16_t data)
|
|||||||
* Name: stm32_backlight
|
* Name: stm32_backlight
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Enable/disable LCD panel power (0: full off - CONFIG_LCD_MAXPOWER: full on).
|
* Enable/disable LCD panel power (0: full off - CONFIG_LCD_MAXPOWER:
|
||||||
|
* full on).
|
||||||
* Used here to set pwm duty on timer used for backlight.
|
* Used here to set pwm duty on timer used for backlight.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -248,7 +256,8 @@ static void stm32_backlight(FAR struct ssd1289_lcd_s *dev, int power)
|
|||||||
* maximum power setting.
|
* maximum power setting.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
duty = ((uint32_t)LCD_BL_TIMER_PERIOD * (uint32_t)power) / CONFIG_LCD_MAXPOWER;
|
duty = ((uint32_t)LCD_BL_TIMER_PERIOD * (uint32_t)power) /
|
||||||
|
CONFIG_LCD_MAXPOWER;
|
||||||
if (duty >= LCD_BL_TIMER_PERIOD)
|
if (duty >= LCD_BL_TIMER_PERIOD)
|
||||||
{
|
{
|
||||||
duty = LCD_BL_TIMER_PERIOD - 1;
|
duty = LCD_BL_TIMER_PERIOD - 1;
|
||||||
@ -314,7 +323,7 @@ static void init_lcd_backlight(void)
|
|||||||
|
|
||||||
ccer &= !ATIM_CCER_CC2P;
|
ccer &= !ATIM_CCER_CC2P;
|
||||||
|
|
||||||
/* Enable channel 2*/
|
/* Enable channel 2 */
|
||||||
|
|
||||||
ccer |= ATIM_CCER_CC2E;
|
ccer |= ATIM_CCER_CC2E;
|
||||||
|
|
||||||
@ -327,7 +336,7 @@ static void init_lcd_backlight(void)
|
|||||||
|
|
||||||
modifyreg16(STM32_TIM3_CR1, 0, ATIM_CR1_ARPE);
|
modifyreg16(STM32_TIM3_CR1, 0, ATIM_CR1_ARPE);
|
||||||
|
|
||||||
/* Enable Backlight Timer !!!!*/
|
/* Enable Backlight Timer !!!! */
|
||||||
|
|
||||||
modifyreg16(STM32_TIM3_CR1, 0, ATIM_CR1_CEN);
|
modifyreg16(STM32_TIM3_CR1, 0, ATIM_CR1_CEN);
|
||||||
|
|
||||||
@ -409,9 +418,9 @@ static void stm32_extmemgpios(const uint16_t *gpios, int ngpios)
|
|||||||
/* Configure GPIOs */
|
/* Configure GPIOs */
|
||||||
|
|
||||||
for (i = 0; i < ngpios; i++)
|
for (i = 0; i < ngpios; i++)
|
||||||
{
|
{
|
||||||
stm32_configgpio(gpios[i]);
|
stm32_configgpio(gpios[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -422,9 +431,9 @@ static void stm32_extmemgpios(const uint16_t *gpios, int ngpios)
|
|||||||
* Name: board_lcd_initialize
|
* Name: board_lcd_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
* Initialize the LCD video hardware. The initial state of the LCD is
|
||||||
* initialized, display memory cleared, and the LCD ready to use, but with the power
|
* fully initialized, display memory cleared, and the LCD ready to use,
|
||||||
* setting at 0 (full off).
|
* but with the power setting at 0 (full off).
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -463,8 +472,8 @@ int board_lcd_initialize(void)
|
|||||||
* Name: board_lcd_getdev
|
* Name: board_lcd_getdev
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Return a a reference to the LCD object for the specified LCD. This allows support
|
* Return a a reference to the LCD object for the specified LCD. This
|
||||||
* for multiple LCD devices.
|
* allows support for multiple LCD devices.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user