Update lv_drv_conf

This commit is contained in:
fvanroie 2021-02-16 18:31:02 +01:00
parent a19d82f06c
commit 941c8c90d7
2 changed files with 72 additions and 20 deletions

View File

@ -60,7 +60,7 @@ IncludeIsMainRegex: '$'
IndentCaseLabels: true IndentCaseLabels: true
IndentWidth: 4 IndentWidth: 4
IndentWrappedFunctionNames: false IndentWrappedFunctionNames: false
IndentPPDirectives: BeforeHash # IndentPPDirectives: BeforeHash
JavaScriptQuotes: Leave JavaScriptQuotes: Leave
JavaScriptWrapImports: true JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true KeepEmptyLinesAtTheStartOfBlocks: true

View File

@ -1,6 +1,10 @@
/** /**
* @file lv_drv_conf.h * @file lv_drv_conf.h
* * Configuration file for v7.9.1
*/
/*
* COPY THIS FILE AS lv_drv_conf.h
*/ */
#if 1 /*Set it to "1" to enable the content*/ #if 1 /*Set it to "1" to enable the content*/
@ -13,9 +17,15 @@
/********************* /*********************
* DELAY INTERFACE * DELAY INTERFACE
*********************/ *********************/
#ifdef ARDUINO
#define LV_DRV_DELAY_INCLUDE <Arduino.h> /*Dummy include by default*/ #define LV_DRV_DELAY_INCLUDE <Arduino.h> /*Dummy include by default*/
#define LV_DRV_DELAY_US(us) delayMicroseconds(ud) /*Delay the given number of microseconds*/ #define LV_DRV_DELAY_US(us) delayMicroseconds(ud) /*Delay the given number of microseconds*/
#define LV_DRV_DELAY_MS(ms) delay(ms) /*Delay the given number of milliseconds*/ #define LV_DRV_DELAY_MS(ms) delay(ms) /*Delay the given number of milliseconds*/
#else
#define LV_DRV_DELAY_INCLUDE <stdint.h> /*Dummy include by default*/
#define LV_DRV_DELAY_US(us) /*delay_us(us)*/ /*Delay the given number of microseconds*/
#define LV_DRV_DELAY_MS(ms) /*delay_ms(ms)*/ /*Delay the given number of milliseconds*/
#endif
/********************* /*********************
* DISPLAY INTERFACE * DISPLAY INTERFACE
@ -93,7 +103,9 @@
#define MONITOR_VER_RES LV_VER_RES #define MONITOR_VER_RES LV_VER_RES
/* Scale window by this factor (useful when simulating small screens) */ /* Scale window by this factor (useful when simulating small screens) */
#ifndef MONITOR_ZOOM
#define MONITOR_ZOOM 1 #define MONITOR_ZOOM 1
#endif
/* Used to test true double buffering with only address changing. /* Used to test true double buffering with only address changing.
* Set LV_VDB_SIZE = (LV_HOR_RES * LV_VER_RES) and LV_VDB_DOUBLE = 1 and LV_COLOR_DEPTH = 32" */ * Set LV_VDB_SIZE = (LV_HOR_RES * LV_VER_RES) and LV_VDB_DOUBLE = 1 and LV_COLOR_DEPTH = 32" */
@ -102,9 +114,6 @@
/*Eclipse: <SDL2/SDL.h> Visual Studio: <SDL.h>*/ /*Eclipse: <SDL2/SDL.h> Visual Studio: <SDL.h>*/
#define MONITOR_SDL_INCLUDE_PATH <SDL2/SDL.h> #define MONITOR_SDL_INCLUDE_PATH <SDL2/SDL.h>
/*Different rendering might be used if running in a Virtual machine*/
#define MONITOR_VIRTUAL_MACHINE 0
/*Open two windows to test multi display support*/ /*Open two windows to test multi display support*/
#define MONITOR_DUAL 0 #define MONITOR_DUAL 0
#endif #endif
@ -116,12 +125,18 @@
#define USE_WINDOWS 0 #define USE_WINDOWS 0
#endif #endif
#define USE_WINDOWS 0
#if USE_WINDOWS #if USE_WINDOWS
#define WINDOW_HOR_RES 480 #define WINDOW_HOR_RES 480
#define WINDOW_VER_RES 320 #define WINDOW_VER_RES 320
#endif #endif
/*----------------------------------------
* GTK drivers (monitor, mouse, keyboard
*---------------------------------------*/
#ifndef USE_GTK
#define USE_GTK 0
#endif
/*---------------- /*----------------
* SSD1963 * SSD1963
*--------------*/ *--------------*/
@ -181,6 +196,17 @@
/*No settings*/ /*No settings*/
#endif /*USE_ST7565*/ #endif /*USE_ST7565*/
/*------------------------------
* GC9A01 (color, low res.)
*-----------------------------*/
#ifndef USE_GC9A01
#define USE_GC9A01 0
#endif
#if USE_GC9A01
/*No settings*/
#endif /*USE_GC9A01*/
/*------------------------------------------ /*------------------------------------------
* UC1610 (4 gray 160*[104|128]) * UC1610 (4 gray 160*[104|128])
* (EA DOGXL160 160x104 tested) * (EA DOGXL160 160x104 tested)
@ -218,6 +244,20 @@
b) /*((uint8_t) __REV(__RBIT(b)))*/ /*Architecture / compiler dependent byte bits order reverse*/ b) /*((uint8_t) __REV(__RBIT(b)))*/ /*Architecture / compiler dependent byte bits order reverse*/
#endif /*USE_SHARP_MIP*/ #endif /*USE_SHARP_MIP*/
/*-------------------------------------------------
* ILI9341 240X320 TFT LCD
*------------------------------------------------*/
#ifndef USE_ILI9341
#define USE_ILI9341 0
#endif
#if USE_ILI9341
#define ILI9341_HOR_RES LV_HOR_RES
#define ILI9341_VER_RES LV_VER_RES
#define ILI9341_GAMMA 1
#define ILI9341_TEARING 0
#endif /*USE_ILI9341*/
/*----------------------------------------- /*-----------------------------------------
* Linux frame buffer device (/dev/fbx) * Linux frame buffer device (/dev/fbx)
*-----------------------------------------*/ *-----------------------------------------*/
@ -240,6 +280,18 @@
#define FBDEV_PATH "/dev/fb0" #define FBDEV_PATH "/dev/fb0"
#endif #endif
/*-----------------------------------------
* DRM/KMS device (/dev/dri/cardX)
*-----------------------------------------*/
#ifndef USE_DRM
#define USE_DRM 0
#endif
#if USE_DRM
#define DRM_CARD "/dev/dri/card0"
#define DRM_CONNECTOR_ID -1 /* -1 for the first connected one */
#endif
/********************* /*********************
* INPUT DEVICES * INPUT DEVICES
*********************/ *********************/
@ -330,25 +382,25 @@
#define USE_EVDEV 0 #define USE_EVDEV 0
#endif #endif
#if USE_EVDEV #ifndef USE_BSD_EVDEV
#define EVDEV_NAME "/dev/input/event0" /*You can use the "evtest" Linux tool to get the list of devices and test \ #define USE_BSD_EVDEV 0
them*/ #endif
#define EVDEV_SWAP_AXES 0 /*Swap the x and y axes of the touchscreen*/
#define EVDEV_SCALE 0 /* Scale input, e.g. if touchscreen resolution does not match display resolution */ #if USE_EVDEV || USE_BSD_EVDEV
#if EVDEV_SCALE #define EVDEV_NAME \
#define EVDEV_SCALE_HOR_RES (4096) /* Horizontal resolution of touchscreen */ "/dev/input/event0" /*You can use the "evtest" Linux tool to get the list of devices and test \
#define EVDEV_SCALE_VER_RES (4096) /* Vertical resolution of touchscreen */ them*/
#endif /*EVDEV_SCALE*/ #define EVDEV_SWAP_AXES 0 /*Swap the x and y axes of the touchscreen*/
#define EVDEV_CALIBRATE \ #define EVDEV_CALIBRATE \
0 /*Scale and offset the touchscreen coordinates by using maximum and minimum values for each axis*/ 0 /*Scale and offset the touchscreen coordinates by using maximum and minimum values for each axis*/
#if EVDEV_CALIBRATE #if EVDEV_CALIBRATE
#define EVDEV_HOR_MIN 3800 /*If EVDEV_XXX_MIN > EVDEV_XXX_MAX the XXX axis is automatically inverted*/ #define EVDEV_HOR_MIN 0 /*to invert axis swap EVDEV_XXX_MIN by EVDEV_XXX_MAX*/
#define EVDEV_HOR_MAX 200 #define EVDEV_HOR_MAX 4096 /*"evtest" Linux tool can help to get the correct calibraion values>*/
#define EVDEV_VER_MIN 200 #define EVDEV_VER_MIN 0
#define EVDEV_VER_MAX 3800 #define EVDEV_VER_MAX 4096
#endif /*EVDEV_SCALE*/ #endif /*EVDEV_CALIBRATE*/
#endif /*USE_EVDEV*/ #endif /*USE_EVDEV*/
/*------------------------------- /*-------------------------------