Centralize definitions associated with CONFIG_DEBUG_LCD
This commit is contained in:
parent
ba03134bed
commit
24c51ec1ff
31
Kconfig
31
Kconfig
@ -882,9 +882,34 @@ config DEBUG_LCD
|
|||||||
default n
|
default n
|
||||||
depends on LCD
|
depends on LCD
|
||||||
---help---
|
---help---
|
||||||
Enable low level debug SYSLOG output from the LCD driver (disabled
|
Enable LCD driver debug features.
|
||||||
by default). Support for this debug option is board-specific and
|
|
||||||
may not be available for some boards.
|
Support for this debug option is board-specific and may not
|
||||||
|
be available for some boards.
|
||||||
|
if DEBUG_LCD
|
||||||
|
|
||||||
|
config DEBUG_LCD_ERROR
|
||||||
|
bool "LCD Driver Error Output"
|
||||||
|
default n
|
||||||
|
depends on DEBUG_ERROR
|
||||||
|
---help---
|
||||||
|
Enable LCD driver error output to SYSLOG.
|
||||||
|
|
||||||
|
config DEBUG_LCD_WARN
|
||||||
|
bool "LCD Driver Warnings Output"
|
||||||
|
default n
|
||||||
|
depends on DEBUG_WARN
|
||||||
|
---help---
|
||||||
|
Enable LCD driver warning output to SYSLOG.
|
||||||
|
|
||||||
|
config DEBUG_LCD_INFO
|
||||||
|
bool "LCD Driver Informational Output"
|
||||||
|
default n
|
||||||
|
depends on DEBUG_INFO
|
||||||
|
---help---
|
||||||
|
Enable LCD driver informational output to SYSLOG.
|
||||||
|
|
||||||
|
endif # DEBUG_LCD
|
||||||
|
|
||||||
config DEBUG_LEDS
|
config DEBUG_LEDS
|
||||||
bool "Low-level LED Debug Output"
|
bool "Low-level LED Debug Output"
|
||||||
|
@ -100,18 +100,6 @@
|
|||||||
# error "Unsupported BPP"
|
# error "Unsupported BPP"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define lcdwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -75,15 +75,8 @@
|
|||||||
#define LCD_XRES 98
|
#define LCD_XRES 98
|
||||||
#define LCD_YRES 67
|
#define LCD_YRES 67
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
/* This should be put elsewhere */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** This should be put elsewhere */
|
|
||||||
#ifdef __CC_ARM /* ARM Compiler */
|
#ifdef __CC_ARM /* ARM Compiler */
|
||||||
#define lcd_inline static __inline
|
#define lcd_inline static __inline
|
||||||
#elif defined (__ICCARM__) /* for IAR Compiler */
|
#elif defined (__ICCARM__) /* for IAR Compiler */
|
||||||
|
@ -91,18 +91,6 @@
|
|||||||
|
|
||||||
#define LCD_ID 0x1505
|
#define LCD_ID 0x1505
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdwarn warn
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This should be put elsewhere (possibly include/nuttx/compiler.h) */
|
/* This should be put elsewhere (possibly include/nuttx/compiler.h) */
|
||||||
|
|
||||||
#ifdef __CC_ARM /* ARM Compiler */
|
#ifdef __CC_ARM /* ARM Compiler */
|
||||||
|
@ -65,20 +65,6 @@
|
|||||||
# error "CONFIG_STM32_FSMC is required to use the LCD"
|
# error "CONFIG_STM32_FSMC is required to use the LCD"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Color depth and format */
|
/* Color depth and format */
|
||||||
|
|
||||||
#define LCD_BPP 16
|
#define LCD_BPP 16
|
||||||
@ -102,18 +88,6 @@
|
|||||||
#define LCD_INDEX 0x60000000 /* RS = 0 */
|
#define LCD_INDEX 0x60000000 /* RS = 0 */
|
||||||
#define LCD_DATA 0x60020000 /* RS = 1 */
|
#define LCD_DATA 0x60020000 /* RS = 1 */
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdwarn warn
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@ -49,39 +49,6 @@
|
|||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "kwikstik-k40.h"
|
#include "kwikstik-k40.h"
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
**************************************************************************************/
|
|
||||||
|
|
||||||
/* Configuration **********************************************************************/
|
|
||||||
|
|
||||||
/* Display/Color Properties ***********************************************************/
|
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
|
||||||
* Private Type Definition
|
|
||||||
**************************************************************************************/
|
|
||||||
|
|
||||||
/**************************************************************************************
|
|
||||||
* Private Function Prototypes
|
|
||||||
**************************************************************************************/
|
|
||||||
|
|
||||||
/**************************************************************************************
|
|
||||||
* Private Data
|
|
||||||
**************************************************************************************/
|
|
||||||
|
|
||||||
/**************************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
**************************************************************************************/
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@ -69,27 +69,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
/* Debug ********************************************************************/
|
||||||
/* Define the CONFIG_DEBUG_LCD to enable detailed debug output (stuff you
|
|
||||||
* would never want to see unless you are debugging this file).
|
|
||||||
*
|
|
||||||
* Verbose debug must also be enabled
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
#ifdef CONFIG_DEBUG_LCD
|
||||||
# define ugerr(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
# define oleddc_dumpgpio(m) lpc17_dumpgpio(LPCXPRESSO_OLED_POWER, m)
|
# define oleddc_dumpgpio(m) lpc17_dumpgpio(LPCXPRESSO_OLED_POWER, m)
|
||||||
# define oledcs_dumpgpio(m) lpc17_dumpgpio(LPCXPRESSO_OLED_CS, m)
|
# define oledcs_dumpgpio(m) lpc17_dumpgpio(LPCXPRESSO_OLED_CS, m)
|
||||||
#else
|
#else
|
||||||
# define ugerr(x...)
|
|
||||||
# define oleddc_dumpgpio(m)
|
# define oleddc_dumpgpio(m)
|
||||||
# define oledcs_dumpgpio(m)
|
# define oledcs_dumpgpio(m)
|
||||||
#endif
|
#endif
|
||||||
|
@ -67,28 +67,6 @@
|
|||||||
#define EXTCOMIN_FREQ 24
|
#define EXTCOMIN_FREQ 24
|
||||||
#define TIMER_FREQ 1200 /* 72000000/60000 */
|
#define TIMER_FREQ 1200 /* 72000000/60000 */
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -67,21 +67,6 @@
|
|||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
/* Configuration **********************************************************************/
|
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Mikroe-STM32F4 Hardware Definitions ************************************************/
|
/* Mikroe-STM32F4 Hardware Definitions ************************************************/
|
||||||
/* --- ---------------------------------- -------------------- ------------------------
|
/* --- ---------------------------------- -------------------- ------------------------
|
||||||
@ -117,16 +102,6 @@
|
|||||||
* 96 PB9 DRIVEB TFT display
|
* 96 PB9 DRIVEB TFT display
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@ -68,21 +68,6 @@
|
|||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
/* Configuration **********************************************************************/
|
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Mikroe-STM32F4 Hardware Definitions ************************************************/
|
/* Mikroe-STM32F4 Hardware Definitions ************************************************/
|
||||||
/* --- ---------------------------------- -------------------- ------------------------
|
/* --- ---------------------------------- -------------------- ------------------------
|
||||||
@ -118,16 +103,6 @@
|
|||||||
* 96 PB9 DRIVEB TFT display
|
* 96 PB9 DRIVEB TFT display
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@ -71,16 +71,6 @@
|
|||||||
# error "The configuration requires the SPI 4-wire interface"
|
# error "The configuration requires the SPI 4-wire interface"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -75,24 +75,15 @@
|
|||||||
|
|
||||||
/* Define the CONFIG_LCD_NOKIADBG to enable detailed debug output (stuff you
|
/* Define the CONFIG_LCD_NOKIADBG to enable detailed debug output (stuff you
|
||||||
* would never want to see unless you are debugging this file).
|
* would never want to see unless you are debugging this file).
|
||||||
*
|
|
||||||
* Verbose debug must also be enabled
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
#ifndef CONFIG_DEBUG_INFO
|
||||||
# undef CONFIG_LCD_NOKIADBG
|
# undef CONFIG_LCD_NOKIADBG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_LCD_NOKIADBG
|
#ifdef CONFIG_LCD_NOKIADBG
|
||||||
# define lcderr(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
# define lcd_dumpgpio(m) lpc17_dumpgpio(LPC1766STK_LCD_RST, m)
|
# define lcd_dumpgpio(m) lpc17_dumpgpio(LPC1766STK_LCD_RST, m)
|
||||||
#else
|
#else
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcd_dumpgpio(m)
|
# define lcd_dumpgpio(m)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -102,20 +102,6 @@
|
|||||||
# error "CONFIG_PIC32MX_PMP is required to use the LCD"
|
# error "CONFIG_PIC32MX_PMP is required to use the LCD"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The ever-present MIN/MAX macros ******************************************/
|
/* The ever-present MIN/MAX macros ******************************************/
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
@ -137,16 +123,6 @@
|
|||||||
#define LCD_NCOLUMNS 16
|
#define LCD_NCOLUMNS 16
|
||||||
#define LCD_NCHARS (LCD_NROWS * LCD_NCOLUMNS)
|
#define LCD_NCHARS (LCD_NROWS * LCD_NCOLUMNS)
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -174,7 +150,7 @@ struct lcd1602_2
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Debug */
|
/* Debug */
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_INFO)
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
static void lcd_dumpstate(FAR const char *msg);
|
static void lcd_dumpstate(FAR const char *msg);
|
||||||
static void lcd_dumpstream(FAR const char *msg,
|
static void lcd_dumpstream(FAR const char *msg,
|
||||||
FAR const struct lcd_instream_s *stream);
|
FAR const struct lcd_instream_s *stream);
|
||||||
@ -234,7 +210,7 @@ static struct lcd1602_2 g_lcd1602;
|
|||||||
* Name: lcd_dumpstate
|
* Name: lcd_dumpstate
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_INFO)
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
static void lcd_dumpstate(FAR const char *msg)
|
static void lcd_dumpstate(FAR const char *msg)
|
||||||
{
|
{
|
||||||
uint8_t buffer[LCD_NCOLUMNS];
|
uint8_t buffer[LCD_NCOLUMNS];
|
||||||
@ -269,7 +245,7 @@ static void lcd_dumpstate(FAR const char *msg)
|
|||||||
* Name: lcd_dumpstate
|
* Name: lcd_dumpstate
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_INFO)
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
static void lcd_dumpstream(FAR const char *msg,
|
static void lcd_dumpstream(FAR const char *msg,
|
||||||
FAR const struct lcd_instream_s *stream)
|
FAR const struct lcd_instream_s *stream)
|
||||||
{
|
{
|
||||||
|
@ -69,20 +69,6 @@
|
|||||||
# error "CONFIG_PIC32MX_PMP is required to use the LCD"
|
# error "CONFIG_PIC32MX_PMP is required to use the LCD"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* PIC32MX7MMB LCD Hardware Definitions ***********************************************/
|
/* PIC32MX7MMB LCD Hardware Definitions ***********************************************/
|
||||||
/* --- ---------------------------------- -------------------- ------------------------
|
/* --- ---------------------------------- -------------------- ------------------------
|
||||||
* PIN CONFIGURATIONS SIGNAL NAME ON-BOARD CONNECTIONS
|
* PIN CONFIGURATIONS SIGNAL NAME ON-BOARD CONNECTIONS
|
||||||
@ -136,16 +122,6 @@
|
|||||||
|
|
||||||
#define GPIO_LCD_RS (GPIO_OUTPUT|GPIO_VALUE_ZERO|GPIO_PORTB|GPIO_PIN15)
|
#define GPIO_LCD_RS (GPIO_OUTPUT|GPIO_VALUE_ZERO|GPIO_PORTB|GPIO_PIN15)
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_LCD_MIO283QT2
|
#ifdef CONFIG_LCD_MIO283QT2
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
|
@ -157,28 +157,6 @@
|
|||||||
# error "CONFIG_LCD_MAXCONTRAST must be defined in the range 1 to 31"
|
# error "CONFIG_LCD_MAXCONTRAST must be defined in the range 1 to 31"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_LCD_REGDEBUG
|
|
||||||
# define regerr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define regwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
||||||
# define reginfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define regerr(x...)
|
|
||||||
# define regwarn(x...)
|
|
||||||
# define reginfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define lcdwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Graphics Capbilities ***************************************************************/
|
/* Graphics Capbilities ***************************************************************/
|
||||||
|
|
||||||
/* LCD resolution: 320 (columns) by 240 (rows). The physical dimensions of the device
|
/* LCD resolution: 320 (columns) by 240 (rows). The physical dimensions of the device
|
||||||
@ -320,7 +298,7 @@ struct sam_dev_s
|
|||||||
/* Low-level HX834x Register access */
|
/* Low-level HX834x Register access */
|
||||||
|
|
||||||
static void sam_putreg(uint16_t reg, uint16_t data);
|
static void sam_putreg(uint16_t reg, uint16_t data);
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
static uint16_t sam_getreg(uint16_t reg);
|
static uint16_t sam_getreg(uint16_t reg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -333,7 +311,7 @@ static inline uint16_t sam_rdram(void);
|
|||||||
static void sam_lcdon(void);
|
static void sam_lcdon(void);
|
||||||
static void sam_lcdoff(void);
|
static void sam_lcdoff(void);
|
||||||
|
|
||||||
#if 0 /* CONFIG_DEBUG_LCD */
|
#if 0 /* CONFIG_DEBUG_LCD_INFO */
|
||||||
static void sam_dumpreg(uint8_t startreg, uint8_t endreg);
|
static void sam_dumpreg(uint8_t startreg, uint8_t endreg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -444,7 +422,8 @@ static struct sam_dev_s g_lcddev_s =
|
|||||||
|
|
||||||
static void sam_putreg(uint16_t reg, uint16_t data)
|
static void sam_putreg(uint16_t reg, uint16_t data)
|
||||||
{
|
{
|
||||||
reginfo("base: %08x RS: %04x data: %04x\n", LCD_BASE, LCD_BASE + HX843X_LCD_RS, data);
|
lcdinfo("base: %08x RS: %04x data: %04x\n",
|
||||||
|
LCD_BASE, LCD_BASE + HX843X_LCD_RS, data);
|
||||||
putreg16(reg, LCD_BASE);
|
putreg16(reg, LCD_BASE);
|
||||||
putreg16(data, LCD_BASE + HX843X_LCD_RS);
|
putreg16(data, LCD_BASE + HX843X_LCD_RS);
|
||||||
}
|
}
|
||||||
@ -457,13 +436,15 @@ static void sam_putreg(uint16_t reg, uint16_t data)
|
|||||||
*
|
*
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
static uint16_t sam_getreg(uint16_t reg)
|
static uint16_t sam_getreg(uint16_t reg)
|
||||||
{
|
{
|
||||||
uint16_t data;
|
uint16_t data;
|
||||||
|
|
||||||
putreg16(reg, LCD_BASE);
|
putreg16(reg, LCD_BASE);
|
||||||
data = getreg16(LCD_BASE + HX843X_LCD_RS);
|
data = getreg16(LCD_BASE + HX843X_LCD_RS);
|
||||||
reginfo("base: %08x RS: %04x data: %04x\n", LCD_BASE, LCD_BASE + HX843X_LCD_RS, data);
|
lcdinfo("base: %08x RS: %04x data: %04x\n",
|
||||||
|
LCD_BASE, LCD_BASE + HX843X_LCD_RS, data);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -583,7 +564,7 @@ static void sam_lcdoff(void)
|
|||||||
*
|
*
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
|
||||||
#if 0 /* CONFIG_DEBUG_LCD */
|
#if 0 /* CONFIG_DEBUG_LCD_INFO */
|
||||||
static void sam_dumpreg(uint8_t startreg, uint8_t endreg)
|
static void sam_dumpreg(uint8_t startreg, uint8_t endreg)
|
||||||
{
|
{
|
||||||
uint16_t value;
|
uint16_t value;
|
||||||
@ -874,7 +855,7 @@ static int sam_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
|||||||
|
|
||||||
int board_lcd_initialize(void)
|
int board_lcd_initialize(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
uint16_t hxregval;
|
uint16_t hxregval;
|
||||||
#endif
|
#endif
|
||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
@ -918,7 +899,8 @@ int board_lcd_initialize(void)
|
|||||||
/* Enable SMC peripheral clock */
|
/* Enable SMC peripheral clock */
|
||||||
|
|
||||||
putreg32((1 << SAM_PID_SMC), SAM_PMC_PCER);
|
putreg32((1 << SAM_PID_SMC), SAM_PMC_PCER);
|
||||||
reginfo("PMC PCSR: %08x SMC: %08x\n", getreg32(SAM_PMC_PCSR), (1 << SAM_PID_SMC));
|
lcdinfo("PMC PCSR: %08x SMC: %08x\n",
|
||||||
|
getreg32(SAM_PMC_PCSR), (1 << SAM_PID_SMC));
|
||||||
|
|
||||||
/* Configure SMC CS2 */
|
/* Configure SMC CS2 */
|
||||||
|
|
||||||
@ -938,16 +920,16 @@ int board_lcd_initialize(void)
|
|||||||
regval |= (SMCCS_MODE_READMODE) | (SMCCS_MODE_WRITEMODE) | (SMCCS_MODE_DBW_16BITS);
|
regval |= (SMCCS_MODE_READMODE) | (SMCCS_MODE_WRITEMODE) | (SMCCS_MODE_DBW_16BITS);
|
||||||
putreg32(regval, SAM_SMCCS_MODE(2));
|
putreg32(regval, SAM_SMCCS_MODE(2));
|
||||||
|
|
||||||
reginfo("SMC SETUP[%08x]: %08x PULSE[%08x]: %08x\n",
|
lcdinfo("SMC SETUP[%08x]: %08x PULSE[%08x]: %08x\n",
|
||||||
SAM_SMCCS_SETUP(2), getreg32(SAM_SMCCS_SETUP(2)),
|
SAM_SMCCS_SETUP(2), getreg32(SAM_SMCCS_SETUP(2)),
|
||||||
SAM_SMCCS_PULSE(2), getreg32(SAM_SMCCS_PULSE(2)));
|
SAM_SMCCS_PULSE(2), getreg32(SAM_SMCCS_PULSE(2)));
|
||||||
reginfo(" CYCLE[%08x]: %08x MODE[%08x]: %08x\n",
|
lcdinfo(" CYCLE[%08x]: %08x MODE[%08x]: %08x\n",
|
||||||
SAM_SMCCS_CYCLE(2), getreg32(SAM_SMCCS_CYCLE(2)),
|
SAM_SMCCS_CYCLE(2), getreg32(SAM_SMCCS_CYCLE(2)),
|
||||||
SAM_SMCCS_MODE(2), getreg32(SAM_SMCCS_MODE(2)));
|
SAM_SMCCS_MODE(2), getreg32(SAM_SMCCS_MODE(2)));
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
/* Check HX8347 Chip ID */
|
/* Check HX8347 Chip ID */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
hxregval = sam_getreg(HX8347_R67H);
|
hxregval = sam_getreg(HX8347_R67H);
|
||||||
lcdinfo("Chip ID: %04x\n", hxregval);
|
lcdinfo("Chip ID: %04x\n", hxregval);
|
||||||
if (hxregval != HX8347_CHIPID)
|
if (hxregval != HX8347_CHIPID)
|
||||||
|
@ -197,21 +197,6 @@
|
|||||||
# define CONFIG_SAM4EEK_LCD_BGCOLOR 0
|
# define CONFIG_SAM4EEK_LCD_BGCOLOR 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
# undef CONFIG_LCD_REGDEBUG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Display/Color Properties ***********************************************************/
|
/* Display/Color Properties ***********************************************************/
|
||||||
/* Display Resolution */
|
/* Display Resolution */
|
||||||
|
|
||||||
@ -266,16 +251,6 @@
|
|||||||
#define BKL_ENABLE_DURATION (128*1024)
|
#define BKL_ENABLE_DURATION (128*1024)
|
||||||
#define BKL_DISABLE_DURATION (128*1024)
|
#define BKL_DISABLE_DURATION (128*1024)
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
@ -198,21 +198,6 @@
|
|||||||
# define CONFIG_SAM4EEK_LCD_BGCOLOR 0
|
# define CONFIG_SAM4EEK_LCD_BGCOLOR 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
# undef CONFIG_LCD_REGDEBUG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Display/Color Properties ***********************************************************/
|
/* Display/Color Properties ***********************************************************/
|
||||||
/* Display Resolution */
|
/* Display Resolution */
|
||||||
|
|
||||||
@ -269,16 +254,6 @@
|
|||||||
#define BKL_ENABLE_DURATION (128*1024)
|
#define BKL_ENABLE_DURATION (128*1024)
|
||||||
#define BKL_DISABLE_DURATION (128*1024)
|
#define BKL_DISABLE_DURATION (128*1024)
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
@ -72,10 +72,6 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Configuration ************************************************************/
|
/* Configuration ************************************************************/
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug
|
|
||||||
* must also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_LIB_SLCDCODEC
|
#ifndef CONFIG_LIB_SLCDCODEC
|
||||||
# error This SLCD driver requires CONFIG_LIB_SLCDCODEC
|
# error This SLCD driver requires CONFIG_LIB_SLCDCODEC
|
||||||
#endif
|
#endif
|
||||||
@ -85,16 +81,6 @@
|
|||||||
# error CONFIG_SAM34_RC32K be selected in the board configuration
|
# error CONFIG_SAM34_RC32K be selected in the board configuration
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The ever-present MIN/MAX macros ******************************************/
|
/* The ever-present MIN/MAX macros ******************************************/
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
@ -248,16 +234,6 @@
|
|||||||
#define SLCD_PM (&g_einfo[6])
|
#define SLCD_PM (&g_einfo[6])
|
||||||
#define SLCD_AM (&g_einfo[7])
|
#define SLCD_AM (&g_einfo[7])
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -294,7 +270,7 @@ struct slcd_pixel_s
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Debug */
|
/* Debug */
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_INFO)
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
static void slcd_dumpstate(FAR const char *msg);
|
static void slcd_dumpstate(FAR const char *msg);
|
||||||
static void slcd_dumpslcd(FAR const char *msg);
|
static void slcd_dumpslcd(FAR const char *msg);
|
||||||
#else
|
#else
|
||||||
@ -405,7 +381,7 @@ static const struct slcd_pixel_s g_einfo[SLCD_NE] =
|
|||||||
* Name: slcd_dumpstate
|
* Name: slcd_dumpstate
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_INFO)
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
static void slcd_dumpstate(FAR const char *msg)
|
static void slcd_dumpstate(FAR const char *msg)
|
||||||
{
|
{
|
||||||
lcdinfo("%s:\n", msg);
|
lcdinfo("%s:\n", msg);
|
||||||
@ -424,7 +400,7 @@ static void slcd_dumpstate(FAR const char *msg)
|
|||||||
* Name: slcd_dumpslcd
|
* Name: slcd_dumpslcd
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_INFO)
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
static void slcd_dumpslcd(FAR const char *msg)
|
static void slcd_dumpslcd(FAR const char *msg)
|
||||||
{
|
{
|
||||||
lcdinfo("%s:\n", msg);
|
lcdinfo("%s:\n", msg);
|
||||||
|
@ -114,16 +114,6 @@
|
|||||||
# error "The OLED driver requires CONFIG_SPI_CMDDATA in the configuration"
|
# error "The OLED driver requires CONFIG_SPI_CMDDATA in the configuration"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -144,16 +144,6 @@
|
|||||||
# error "The OLED driver requires CONFIG_SPI_CMDDATA in the configuration"
|
# error "The OLED driver requires CONFIG_SPI_CMDDATA in the configuration"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -144,16 +144,6 @@
|
|||||||
# error "The OLED driver requires CONFIG_SPI_CMDDATA in the configuration"
|
# error "The OLED driver requires CONFIG_SPI_CMDDATA in the configuration"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -144,16 +144,6 @@
|
|||||||
# error "The OLED driver requires CONFIG_SPI_CMDDATA in the configuration"
|
# error "The OLED driver requires CONFIG_SPI_CMDDATA in the configuration"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -203,21 +203,6 @@
|
|||||||
# define CONFIG_SAMV71XULT_LCD_BGCOLOR 0
|
# define CONFIG_SAMV71XULT_LCD_BGCOLOR 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
# undef CONFIG_LCD_REGDEBUG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Display/Color Properties **************************************************/
|
/* Display/Color Properties **************************************************/
|
||||||
/* Display Resolution */
|
/* Display Resolution */
|
||||||
|
|
||||||
@ -300,14 +285,6 @@
|
|||||||
|
|
||||||
/* Debug *********************************************************************/
|
/* Debug *********************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_DMA
|
#ifdef CONFIG_DEBUG_DMA
|
||||||
# define SAMPLENDX_BEFORE_SETUP 0
|
# define SAMPLENDX_BEFORE_SETUP 0
|
||||||
# define SAMPLENDX_AFTER_SETUP 1
|
# define SAMPLENDX_AFTER_SETUP 1
|
||||||
|
@ -202,21 +202,6 @@
|
|||||||
#undef CONFIG_LCD_FASTCONFIG
|
#undef CONFIG_LCD_FASTCONFIG
|
||||||
#define CONFIG_LCD_FASTCONFIG 1
|
#define CONFIG_LCD_FASTCONFIG 1
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
# undef CONFIG_LCD_REGDEBUG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Display/Color Properties ***********************************************************/
|
/* Display/Color Properties ***********************************************************/
|
||||||
/* Display Resolution */
|
/* Display Resolution */
|
||||||
|
|
||||||
@ -368,16 +353,6 @@
|
|||||||
#define ILI9331_ID 0x9331
|
#define ILI9331_ID 0x9331
|
||||||
#define ILI9919_ID 0x9919
|
#define ILI9919_ID 0x9919
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
@ -67,35 +67,10 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
/* Configuration ********************************************************************/
|
/* Configuration ********************************************************************/
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
# undef CONFIG_LCD_REGDEBUG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#undef CONFIG_LCD_FASTCONFIG
|
#undef CONFIG_LCD_FASTCONFIG
|
||||||
#define CONFIG_LCD_FASTCONFIG 1
|
#define CONFIG_LCD_FASTCONFIG 1
|
||||||
|
|
||||||
/* Shenzhou LCD Hardware Definitions ************************************************/
|
|
||||||
/* Debug ****************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
@ -159,20 +159,6 @@
|
|||||||
|
|
||||||
#define SPFD5408B_RDSHIFT 5
|
#define SPFD5408B_RDSHIFT 5
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Display/Color Properties ***********************************************************/
|
/* Display/Color Properties ***********************************************************/
|
||||||
/* Display Resolution */
|
/* Display Resolution */
|
||||||
|
|
||||||
@ -311,18 +297,6 @@
|
|||||||
#define SPFD5408B_ID 0x5408
|
#define SPFD5408B_ID 0x5408
|
||||||
#define R61580_ID 0x1580
|
#define R61580_ID 0x1580
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define lcdwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@ -110,20 +110,6 @@
|
|||||||
# define CONFIG_LCD_LANDSCAPE 1
|
# define CONFIG_LCD_LANDSCAPE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Display/Color Properties ***********************************************************/
|
/* Display/Color Properties ***********************************************************/
|
||||||
/* Display Resolution */
|
/* Display Resolution */
|
||||||
|
|
||||||
@ -263,18 +249,6 @@
|
|||||||
#define ILI9321_ID 0x9321
|
#define ILI9321_ID 0x9321
|
||||||
#define ILI9325_ID 0x9325
|
#define ILI9325_ID 0x9325
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdwarn warn
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@ -110,20 +110,6 @@
|
|||||||
# define CONFIG_LCD_LANDSCAPE 1
|
# define CONFIG_LCD_LANDSCAPE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Display/Color Properties ***********************************************************/
|
/* Display/Color Properties ***********************************************************/
|
||||||
/* Display Resolution */
|
/* Display Resolution */
|
||||||
|
|
||||||
@ -263,18 +249,6 @@
|
|||||||
#define ILI9321_ID 0x9321
|
#define ILI9321_ID 0x9321
|
||||||
#define ILI9325_ID 0x9325
|
#define ILI9325_ID 0x9325
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdwarn warn
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@ -132,18 +132,6 @@
|
|||||||
# define ILI93414WS_SPI
|
# define ILI93414WS_SPI
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug option */
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdwarn warn
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -280,18 +280,6 @@
|
|||||||
#define ILI9341_YRES BOARD_LTDC_HEIGHT
|
#define ILI9341_YRES BOARD_LTDC_HEIGHT
|
||||||
#endif /* CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE */
|
#endif /* CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE */
|
||||||
|
|
||||||
/* Debug */
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdwarn warn
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
@ -333,7 +321,7 @@ static int stm32_ili9341_initialize(void)
|
|||||||
lcdinfo("Initialize ili9341 lcd driver\n");
|
lcdinfo("Initialize ili9341 lcd driver\n");
|
||||||
lcd->select(lcd);
|
lcd->select(lcd);
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
/* Read display identification */
|
/* Read display identification */
|
||||||
|
|
||||||
lcd->sendcmd(lcd, ILI9341_READ_ID1);
|
lcd->sendcmd(lcd, ILI9341_READ_ID1);
|
||||||
|
@ -86,14 +86,14 @@
|
|||||||
# undef HAVE_RGBLED
|
# undef HAVE_RGBLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
#ifdef CONFIG_DEBUG_LEDS
|
||||||
# define lcderr llerr
|
# define lederr llerr
|
||||||
# define lcdwarn llwarn
|
# define ledwarn llwarn
|
||||||
# define lcdinfo llinfo
|
# define ledinfo llinfo
|
||||||
#else
|
#else
|
||||||
# define lcderr(x...)
|
# define lederr(x...)
|
||||||
# define lcdwarn(x...)
|
# define ledwarn(x...)
|
||||||
# define lcdinfo(x...)
|
# define ledinfo(x...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_RGBLED
|
#ifdef HAVE_RGBLED
|
||||||
@ -129,7 +129,7 @@ int stm32_rgbled_setup(void)
|
|||||||
ledr = stm32_pwminitialize(1);
|
ledr = stm32_pwminitialize(1);
|
||||||
if (!ledr)
|
if (!ledr)
|
||||||
{
|
{
|
||||||
lcderr("ERROR: Failed to get the STM32 PWM lower half to LEDR\n");
|
lederr("ERROR: Failed to get the STM32 PWM lower half to LEDR\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ int stm32_rgbled_setup(void)
|
|||||||
ledg = stm32_pwminitialize(2);
|
ledg = stm32_pwminitialize(2);
|
||||||
if (!ledg)
|
if (!ledg)
|
||||||
{
|
{
|
||||||
lcderr("ERROR: Failed to get the STM32 PWM lower half to LEDG\n");
|
lederr("ERROR: Failed to get the STM32 PWM lower half to LEDG\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ int stm32_rgbled_setup(void)
|
|||||||
ledb = stm32_pwminitialize(3);
|
ledb = stm32_pwminitialize(3);
|
||||||
if (!ledb)
|
if (!ledb)
|
||||||
{
|
{
|
||||||
lcderr("ERROR: Failed to get the STM32 PWM lower half to LEDB\n");
|
lederr("ERROR: Failed to get the STM32 PWM lower half to LEDB\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ int stm32_rgbled_setup(void)
|
|||||||
ret = rgbled_register("/dev/rgbled0", ledr, ledg, ledb);
|
ret = rgbled_register("/dev/rgbled0", ledr, ledg, ledb);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
lcderr("ERROR: rgbled_register failed: %d\n", ret);
|
lederr("ERROR: rgbled_register failed: %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,20 +72,6 @@
|
|||||||
# error "CONFIG_STM32_FSMC is required to use the LCD"
|
# error "CONFIG_STM32_FSMC is required to use the LCD"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* STM32F4Discovery LCD Hardware Definitions ******************************************/
|
/* STM32F4Discovery LCD Hardware Definitions ******************************************/
|
||||||
/* LCD /CS is CE1 == NOR/SRAM Bank 1
|
/* LCD /CS is CE1 == NOR/SRAM Bank 1
|
||||||
*
|
*
|
||||||
@ -107,23 +93,10 @@
|
|||||||
#define LCD_NADDRLINES 1 /* A16 */
|
#define LCD_NADDRLINES 1 /* A16 */
|
||||||
#define LCD_NDATALINES 16 /* D0-15 */
|
#define LCD_NDATALINES 16 /* D0-15 */
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
|
||||||
* Private Type Definition
|
|
||||||
**************************************************************************************/
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Private Function Protototypes
|
* Private Function Protototypes
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
|
||||||
/* Low Level LCD access */
|
/* Low Level LCD access */
|
||||||
|
|
||||||
static void stm32_select(FAR struct ssd1289_lcd_s *dev);
|
static void stm32_select(FAR struct ssd1289_lcd_s *dev);
|
||||||
|
@ -71,18 +71,6 @@
|
|||||||
# error "The configuration requires the SPI 4-wire interface"
|
# error "The configuration requires the SPI 4-wire interface"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define lcdwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -93,18 +93,6 @@
|
|||||||
|
|
||||||
/* Definitions in stm32f4discovery.h */
|
/* Definitions in stm32f4discovery.h */
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define lcdwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -93,18 +93,6 @@
|
|||||||
|
|
||||||
/* Definitions in stm32f4discovery.h */
|
/* Definitions in stm32f4discovery.h */
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define lcdwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -76,24 +76,12 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Configuration ************************************************************/
|
/* Configuration ************************************************************/
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug
|
/* Define CONFIG_DEBUG_LCD_INFO to enable detailed LCD debug output. */
|
||||||
* must also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_LIB_SLCDCODEC
|
#ifndef CONFIG_LIB_SLCDCODEC
|
||||||
# error "This SLCD driver requires CONFIG_LIB_SLCDCODEC"
|
# error "This SLCD driver requires CONFIG_LIB_SLCDCODEC"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The ever-present MIN/MAX macros ******************************************/
|
/* The ever-present MIN/MAX macros ******************************************/
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
@ -259,16 +247,6 @@
|
|||||||
(((uint32_t)(s) & 0x03) << 14)
|
(((uint32_t)(s) & 0x03) << 14)
|
||||||
#define SLCD_CHAR6_UPDATE3(s) SLCD_CHAR6_UPDATE2(s)
|
#define SLCD_CHAR6_UPDATE3(s) SLCD_CHAR6_UPDATE2(s)
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -298,7 +276,7 @@ struct stm32_slcdstate_s
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Debug */
|
/* Debug */
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_INFO)
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
static void slcd_dumpstate(FAR const char *msg);
|
static void slcd_dumpstate(FAR const char *msg);
|
||||||
static void slcd_dumpslcd(FAR const char *msg);
|
static void slcd_dumpslcd(FAR const char *msg);
|
||||||
#else
|
#else
|
||||||
@ -440,7 +418,7 @@ static uint32_t g_slcdgpio[BOARD_SLCD_NGPIOS] =
|
|||||||
* Name: slcd_dumpstate
|
* Name: slcd_dumpstate
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_INFO)
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
static void slcd_dumpstate(FAR const char *msg)
|
static void slcd_dumpstate(FAR const char *msg)
|
||||||
{
|
{
|
||||||
lcdinfo("%s:\n", msg);
|
lcdinfo("%s:\n", msg);
|
||||||
@ -461,7 +439,7 @@ static void slcd_dumpstate(FAR const char *msg)
|
|||||||
* Name: slcd_dumpslcd
|
* Name: slcd_dumpslcd
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_INFO)
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
static void slcd_dumpslcd(FAR const char *msg)
|
static void slcd_dumpslcd(FAR const char *msg)
|
||||||
{
|
{
|
||||||
lcdinfo("%s:\n", msg);
|
lcdinfo("%s:\n", msg);
|
||||||
|
@ -109,20 +109,6 @@
|
|||||||
# define CONFIG_LCD_MAXPOWER 100
|
# define CONFIG_LCD_MAXPOWER 100
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The ever-present MIN/MAX macros ******************************************/
|
/* The ever-present MIN/MAX macros ******************************************/
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
@ -141,16 +127,6 @@
|
|||||||
|
|
||||||
#define NOP __asm__ __volatile__ ("nop");
|
#define NOP __asm__ __volatile__ ("nop");
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -179,7 +155,7 @@ struct lcd1602_2
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Debug */
|
/* Debug */
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_INFO)
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
static void lcd_dumpstate(FAR const char *msg);
|
static void lcd_dumpstate(FAR const char *msg);
|
||||||
static void lcd_dumpstream(FAR const char *msg,
|
static void lcd_dumpstream(FAR const char *msg,
|
||||||
FAR const struct lcd_instream_s *stream);
|
FAR const struct lcd_instream_s *stream);
|
||||||
@ -243,7 +219,7 @@ static struct lcd1602_2 g_lcd1602;
|
|||||||
* Name: lcd_dumpstate
|
* Name: lcd_dumpstate
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_INFO)
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
static void lcd_dumpstate(FAR const char *msg)
|
static void lcd_dumpstate(FAR const char *msg)
|
||||||
{
|
{
|
||||||
uint8_t buffer[LCD_NCOLUMNS];
|
uint8_t buffer[LCD_NCOLUMNS];
|
||||||
@ -278,7 +254,7 @@ static void lcd_dumpstate(FAR const char *msg)
|
|||||||
* Name: lcd_dumpstate
|
* Name: lcd_dumpstate
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_INFO)
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
static void lcd_dumpstream(FAR const char *msg,
|
static void lcd_dumpstream(FAR const char *msg,
|
||||||
FAR const struct lcd_instream_s *stream)
|
FAR const struct lcd_instream_s *stream)
|
||||||
{
|
{
|
||||||
|
@ -64,20 +64,6 @@
|
|||||||
# error "CONFIG_STM32_FSMC is required to use the LCD"
|
# error "CONFIG_STM32_FSMC is required to use the LCD"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Color depth and format */
|
/* Color depth and format */
|
||||||
|
|
||||||
#define LCD_BPP 16
|
#define LCD_BPP 16
|
||||||
@ -101,22 +87,6 @@
|
|||||||
#define LCD_INDEX 0x60000000 /* RS = 0 */
|
#define LCD_INDEX 0x60000000 /* RS = 0 */
|
||||||
#define LCD_DATA 0x60020000 /* RS = 1 */
|
#define LCD_DATA 0x60020000 /* RS = 1 */
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdwarn warn
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
|
||||||
* Private Type Definition
|
|
||||||
**************************************************************************************/
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@ -97,18 +97,6 @@
|
|||||||
# define RESET_DIR_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_DIR_OFFSET)
|
# define RESET_DIR_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_DIR_OFFSET)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define lcdwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarm(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -365,20 +365,6 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Add next LCD display */
|
|
||||||
|
|
||||||
/* Debug option */
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdinfo warn
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -767,7 +753,7 @@ static int ili9341_getrun(int devno, fb_coord_t row, fb_coord_t col,
|
|||||||
|
|
||||||
static int ili9341_hwinitialize(FAR struct ili9341_dev_s *dev)
|
static int ili9341_hwinitialize(FAR struct ili9341_dev_s *dev)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
uint8_t param;
|
uint8_t param;
|
||||||
#endif
|
#endif
|
||||||
FAR struct ili9341_lcd_s *lcd = dev->lcd;
|
FAR struct ili9341_lcd_s *lcd = dev->lcd;
|
||||||
@ -777,15 +763,17 @@ static int ili9341_hwinitialize(FAR struct ili9341_dev_s *dev)
|
|||||||
lcdinfo("Initialize lcd driver\n");
|
lcdinfo("Initialize lcd driver\n");
|
||||||
lcd->select(lcd);
|
lcd->select(lcd);
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
/* Read display identification */
|
/* Read display identification */
|
||||||
|
|
||||||
lcd->sendcmd(lcd, ILI9341_READ_ID1);
|
lcd->sendcmd(lcd, ILI9341_READ_ID1);
|
||||||
lcd->recvparam(lcd, ¶m);
|
lcd->recvparam(lcd, ¶m);
|
||||||
lcdinfo("ili9341 LCD driver: LCD modules manufacturer ID: %d\n", param);
|
lcdinfo("ili9341 LCD driver: LCD modules manufacturer ID: %d\n", param);
|
||||||
|
|
||||||
lcd->sendcmd(lcd, ILI9341_READ_ID2);
|
lcd->sendcmd(lcd, ILI9341_READ_ID2);
|
||||||
lcd->recvparam(lcd, ¶m);
|
lcd->recvparam(lcd, ¶m);
|
||||||
lcdinfo("ili9341 LCD driver: LCD modules driver version ID: %d\n", param);
|
lcdinfo("ili9341 LCD driver: LCD modules driver version ID: %d\n", param);
|
||||||
|
|
||||||
lcd->sendcmd(lcd, ILI9341_READ_ID3);
|
lcd->sendcmd(lcd, ILI9341_READ_ID3);
|
||||||
lcd->recvparam(lcd, ¶m);
|
lcd->recvparam(lcd, ¶m);
|
||||||
lcdinfo("ili9341 LCD driver: LCD modules driver ID: %d\n", param);
|
lcdinfo("ili9341 LCD driver: LCD modules driver ID: %d\n", param);
|
||||||
|
@ -109,18 +109,6 @@
|
|||||||
#define LS_BIT (1 << 0)
|
#define LS_BIT (1 << 0)
|
||||||
#define MS_BIT (1 << 7)
|
#define MS_BIT (1 << 7)
|
||||||
|
|
||||||
/* Debug */
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define lcdwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -102,20 +102,6 @@
|
|||||||
# define CONFIG_LCD_LANDSCAPE 1
|
# define CONFIG_LCD_LANDSCAPE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Display/Color Properties ***********************************************************/
|
/* Display/Color Properties ***********************************************************/
|
||||||
/* Display Resolution */
|
/* Display Resolution */
|
||||||
|
|
||||||
@ -237,18 +223,6 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdwarn warn
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@ -96,20 +96,6 @@
|
|||||||
# define CONFIG_LCD_LANDSCAPE 1
|
# define CONFIG_LCD_LANDSCAPE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Display/Color Properties ***********************************************************/
|
/* Display/Color Properties ***********************************************************/
|
||||||
/* Display Resolution */
|
/* Display Resolution */
|
||||||
|
|
||||||
@ -136,18 +122,6 @@
|
|||||||
#define ILI9341_ID_1 0x93
|
#define ILI9341_ID_1 0x93
|
||||||
#define ILI9341_ID_2 0x41
|
#define ILI9341_ID_2 0x41
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdwarn warn
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@ -305,18 +305,6 @@
|
|||||||
#define NOKIA_ENDPAGE 131
|
#define NOKIA_ENDPAGE 131
|
||||||
#define NOKIA_ENDCOL 131
|
#define NOKIA_ENDCOL 131
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_LCD_REGDEBUG
|
|
||||||
# define lcderr(format, ...) llerr(format, ##__VA_ARGS__)
|
|
||||||
# define lcdwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@ -78,16 +78,6 @@
|
|||||||
#define CMD_SET_CGADDR 0x40
|
#define CMD_SET_CGADDR 0x40
|
||||||
#define CMD_SET_DDADDR 0x80
|
#define CMD_SET_DDADDR 0x80
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdwarn warn
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MAX_OPENCNT (255) /* Limit of uint8_t */
|
#define MAX_OPENCNT (255) /* Limit of uint8_t */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -99,20 +99,6 @@
|
|||||||
# define CONFIG_LCD_LANDSCAPE 1
|
# define CONFIG_LCD_LANDSCAPE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Display/Color Properties ***********************************************************/
|
/* Display/Color Properties ***********************************************************/
|
||||||
/* Display Resolution */
|
/* Display Resolution */
|
||||||
|
|
||||||
@ -172,16 +158,6 @@
|
|||||||
# define RA8875_2LAYER_POSSIBLE 1
|
# define RA8875_2LAYER_POSSIBLE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@ -100,20 +100,6 @@
|
|||||||
# define CONFIG_LCD_LANDSCAPE 1
|
# define CONFIG_LCD_LANDSCAPE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must
|
|
||||||
* also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_GRAPHICS
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Display/Color Properties ***********************************************************/
|
/* Display/Color Properties ***********************************************************/
|
||||||
/* Display Resolution */
|
/* Display Resolution */
|
||||||
|
|
||||||
@ -226,18 +212,6 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdwarn warn
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@ -209,16 +209,6 @@
|
|||||||
#define LS_BIT (1 << 0)
|
#define LS_BIT (1 << 0)
|
||||||
#define MS_BIT (1 << 7)
|
#define MS_BIT (1 << 7)
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Public Type Definition
|
* Public Type Definition
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@ -260,16 +260,6 @@
|
|||||||
#define LS_BIT (1 << 0)
|
#define LS_BIT (1 << 0)
|
||||||
#define MS_BIT (1 << 7)
|
#define MS_BIT (1 << 7)
|
||||||
|
|
||||||
/* Debug ******************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
|
||||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Private Type Definition
|
* Private Type Definition
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@ -123,16 +123,6 @@
|
|||||||
# undef CONFIG_LCD_RPORTRAIT
|
# undef CONFIG_LCD_RPORTRAIT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Verbose debug must also be enabled to use the extra OLED debug */
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Check contrast selection */
|
/* Check contrast selection */
|
||||||
|
|
||||||
#ifndef CONFIG_LCD_MAXCONTRAST
|
#ifndef CONFIG_LCD_MAXCONTRAST
|
||||||
|
@ -33,10 +33,6 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Compilation Switches
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -549,6 +549,30 @@
|
|||||||
# define irqllinfo(x...)
|
# define irqllinfo(x...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_LCD_ERROR
|
||||||
|
# define lcderr(format, ...) err(format, ##__VA_ARGS__)
|
||||||
|
# define lcdllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||||
|
#else
|
||||||
|
# define lcderr(x...)
|
||||||
|
# define lcdllerr(x...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_LCD_WARN
|
||||||
|
# define lcdwarn(format, ...) warn(format, ##__VA_ARGS__)
|
||||||
|
# define lcdllwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
||||||
|
#else
|
||||||
|
# define lcdwarn(x...)
|
||||||
|
# define lcdllwarn(x...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
|
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
||||||
|
# define lcdllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
||||||
|
#else
|
||||||
|
# define lcdinfo(x...)
|
||||||
|
# define lcdllinfo(x...)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_GPIO_ERROR
|
#ifdef CONFIG_DEBUG_GPIO_ERROR
|
||||||
# define gpioerr(format, ...) err(format, ##__VA_ARGS__)
|
# define gpioerr(format, ...) err(format, ##__VA_ARGS__)
|
||||||
# define gpiollerr(format, ...) llerr(format, ##__VA_ARGS__)
|
# define gpiollerr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||||
@ -1018,6 +1042,30 @@
|
|||||||
# define irqllinfo (void)
|
# define irqllinfo (void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_LCD_ERROR
|
||||||
|
# define lcderr err
|
||||||
|
# define lcdllerr llerr
|
||||||
|
#else
|
||||||
|
# define lcderr (void)
|
||||||
|
# define lcdllerr (void)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_LCD_WARN
|
||||||
|
# define lcdwarn warn
|
||||||
|
# define lcdllwarn llwarn
|
||||||
|
#else
|
||||||
|
# define lcdwarn (void)
|
||||||
|
# define lcdllwarn (void)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||||
|
# define lcdinfo info
|
||||||
|
# define lcdllinfo llinfo
|
||||||
|
#else
|
||||||
|
# define lcdinfo (void)
|
||||||
|
# define lcdllinfo (void)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_GPIO_ERROR
|
#ifdef CONFIG_DEBUG_GPIO_ERROR
|
||||||
# define gpioerr err
|
# define gpioerr err
|
||||||
# define gpiollerr llerr
|
# define gpiollerr llerr
|
||||||
@ -1212,6 +1260,14 @@
|
|||||||
# define irqinfodumpbuffer(m,b,n)
|
# define irqinfodumpbuffer(m,b,n)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_LCD
|
||||||
|
# define lcderrdumpbuffer(m,b,n) errdumpbuffer(m,b,n)
|
||||||
|
# define lcdinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
||||||
|
#else
|
||||||
|
# define lcderrdumpbuffer(m,b,n)
|
||||||
|
# define lcdinfodumpbuffer(m,b,n)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_GPIO
|
#ifdef CONFIG_DEBUG_GPIO
|
||||||
# define gpioerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n)
|
# define gpioerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n)
|
||||||
# define gpioinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
# define gpioinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
||||||
|
@ -52,19 +52,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Configuration ************************************************************/
|
|
||||||
/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose
|
|
||||||
* debug must also be enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_FEATURES
|
|
||||||
# undef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG_INFO
|
|
||||||
# undef CONFIG_DEBUG_LCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Indices, counts, helper macros ******************************************/
|
/* Indices, counts, helper macros ******************************************/
|
||||||
|
|
||||||
@ -89,18 +76,6 @@
|
|||||||
#define IS_CODE(a) (((a) >= CODE_MIN) && ((a) <= CODE_MAX))
|
#define IS_CODE(a) (((a) >= CODE_MIN) && ((a) <= CODE_MAX))
|
||||||
#define CODE_RETURN(a) (enum slcdcode_e)((a) - 'A')
|
#define CODE_RETURN(a) (enum slcdcode_e)((a) - 'A')
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LCD
|
|
||||||
# define lcderr err
|
|
||||||
# define lcdwarn warn
|
|
||||||
# define lcdinfo info
|
|
||||||
#else
|
|
||||||
# define lcderr(x...)
|
|
||||||
# define lcdwarn(x...)
|
|
||||||
# define lcdinfo(x...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user