2019-08-13 18:08:49 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_lcd.c
|
2013-03-28 18:12:11 +01:00
|
|
|
*
|
2021-03-17 18:14:12 +01:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2013-03-28 18:12:11 +01:00
|
|
|
*
|
2021-03-17 18:14:12 +01:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2013-03-28 18:12:11 +01:00
|
|
|
*
|
2021-03-17 18:14:12 +01:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2013-03-28 18:12:11 +01:00
|
|
|
*
|
2019-08-13 18:08:49 +02:00
|
|
|
****************************************************************************/
|
2013-03-28 18:12:11 +01:00
|
|
|
|
2019-08-13 18:08:49 +02:00
|
|
|
/****************************************************************************
|
2013-03-28 18:12:11 +01:00
|
|
|
* Included Files
|
2019-08-13 18:08:49 +02:00
|
|
|
****************************************************************************/
|
2013-03-28 18:12:11 +01:00
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <debug.h>
|
|
|
|
|
2019-07-11 18:50:00 +02:00
|
|
|
#include "lpc17_40_lcd.h"
|
|
|
|
#include "lpc17_40_gpio.h"
|
2013-03-28 18:12:11 +01:00
|
|
|
|
2019-07-11 18:50:00 +02:00
|
|
|
#include "lpc4088-devkit.h"
|
2013-03-28 18:12:11 +01:00
|
|
|
|
2019-07-11 18:50:00 +02:00
|
|
|
#ifdef CONFIG_LPC17_40_LCD
|
2013-03-28 18:12:11 +01:00
|
|
|
|
2019-08-13 18:08:49 +02:00
|
|
|
/****************************************************************************
|
2013-03-28 18:12:11 +01:00
|
|
|
* Public Functions
|
2019-08-13 18:08:49 +02:00
|
|
|
****************************************************************************/
|
2013-03-28 18:12:11 +01:00
|
|
|
|
2019-08-13 18:08:49 +02:00
|
|
|
/****************************************************************************
|
2019-07-11 18:50:00 +02:00
|
|
|
* Name: lpc4088_devkit_lcd_initialize
|
2013-03-28 18:12:11 +01:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Initialize the LCD. Setup backlight (initially off)
|
|
|
|
*
|
2019-08-13 18:08:49 +02:00
|
|
|
****************************************************************************/
|
2013-03-28 18:12:11 +01:00
|
|
|
|
2019-07-11 18:50:00 +02:00
|
|
|
void lpc4088_devkit_lcd_initialize(void)
|
2013-03-28 18:12:11 +01:00
|
|
|
{
|
|
|
|
/* Configure the LCD backlight (and turn the backlight off) */
|
2019-08-13 18:08:49 +02:00
|
|
|
|
2019-07-11 18:50:00 +02:00
|
|
|
#ifdef CONFIG_LPC17_40_LCD_BACKLIGHT
|
|
|
|
lpc17_40_configgpio(GPIO_LCD_BL);
|
|
|
|
#endif
|
2013-03-28 18:12:11 +01:00
|
|
|
}
|
|
|
|
|
2019-08-13 18:08:49 +02:00
|
|
|
/****************************************************************************
|
2019-07-11 18:50:00 +02:00
|
|
|
* Name: lpc17_40_backlight
|
2013-03-28 18:12:11 +01:00
|
|
|
*
|
|
|
|
* Description:
|
2019-08-13 18:08:49 +02:00
|
|
|
* If CONFIG_LPC17_40_LCD_BACKLIGHT is defined, then the board-specific
|
|
|
|
* logic must provide this interface to turn the backlight on and off.
|
2013-03-28 18:12:11 +01:00
|
|
|
*
|
2019-08-13 18:08:49 +02:00
|
|
|
****************************************************************************/
|
2013-03-28 18:12:11 +01:00
|
|
|
|
2019-07-11 18:50:00 +02:00
|
|
|
#ifdef CONFIG_LPC17_40_LCD_BACKLIGHT
|
|
|
|
void lpc17_40_backlight(bool blon)
|
2013-03-28 18:12:11 +01:00
|
|
|
{
|
2019-07-11 18:50:00 +02:00
|
|
|
lpc17_40_gpiowrite(GPIO_LCD_BL, blon);
|
2013-03-28 18:12:11 +01:00
|
|
|
}
|
|
|
|
#endif
|
2019-07-11 18:50:00 +02:00
|
|
|
#endif /* CONFIG_LPC17_40_LCD */
|