Add support for a default application orientation.
Also remove old unneeded GDISP_USE_CUSTOM_BOARD macro
This commit is contained in:
parent
daa4e8bbd7
commit
1f99d5c9fa
1
demos/3rdparty/tdisp_f4_discovery/gfxconf.h
vendored
1
demos/3rdparty/tdisp_f4_discovery/gfxconf.h
vendored
@ -136,7 +136,6 @@
|
||||
|
||||
/* Optional Low Level Driver Definitions */
|
||||
/*
|
||||
#define GDISP_USE_CUSTOM_BOARD FALSE
|
||||
#define GDISP_SCREEN_WIDTH 320
|
||||
#define GDISP_SCREEN_HEIGHT 240
|
||||
#define GDISP_USE_FSMC
|
||||
|
@ -50,10 +50,11 @@
|
||||
#define GDISP_NEED_TEXT TRUE
|
||||
#define GDISP_NEED_IMAGE TRUE
|
||||
#define GDISP_NEED_CONVEX_POLYGON TRUE
|
||||
#define GDISP_NEED_CONTROL TRUE
|
||||
#define GDISP_DEFAULT_ORIENTATION GDISP_ROTATE_LANDSCAPE
|
||||
|
||||
/* The following are optional depending on your hardware */
|
||||
//#define GDISP_NEED_SCROLL TRUE
|
||||
//#define GDISP_NEED_CONTROL TRUE
|
||||
|
||||
/* GDISP fonts to include */
|
||||
#define GDISP_INCLUDE_FONT_UI2 TRUE
|
||||
|
@ -171,6 +171,7 @@
|
||||
|
||||
/* Optional Parameters for various subsystems */
|
||||
/*
|
||||
#define GDISP_DEFAULT_ORIENTATION GDISP_ROTATE_LANDSCAPE
|
||||
#define GDISP_LINEBUF_SIZE 128
|
||||
#define GEVENT_MAXIMUM_SIZE 32
|
||||
#define GEVENT_MAX_SOURCE_LISTENERS 32
|
||||
|
@ -346,14 +346,10 @@
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @brief Use a custom board definition even if a board definition exists.
|
||||
* @details Defaults to FALSE
|
||||
* @details If TRUE, add gdisp_lld_board.h to your project directory and customise it.
|
||||
* @note Not all GDISP low level drivers currently use board definition files.
|
||||
* @brief Define the default orientation for all displays in the system.
|
||||
* @note GDISP_NEED_CONTROL must also be set (and the hardware must support it)
|
||||
*/
|
||||
#ifndef GDISP_USE_CUSTOM_BOARD
|
||||
#define GDISP_USE_CUSTOM_BOARD FALSE
|
||||
#endif
|
||||
// #define GDISP_DEFAULT_ORIENTATION GDISP_ROTATE_LANDSCAPE
|
||||
/**
|
||||
* @brief Set the screen height and width.
|
||||
* @note Ignored by some low level GDISP drivers, optional for others.
|
||||
@ -368,8 +364,8 @@
|
||||
* @details Only required by the SSD1963 driver.
|
||||
* @note This will be replaced eventually by board definition files
|
||||
*/
|
||||
/* #define GDISP_USE_FSMC */
|
||||
/* #define GDISP_USE_GPIO */
|
||||
// #define GDISP_USE_FSMC
|
||||
// #define GDISP_USE_GPIO
|
||||
/** @} */
|
||||
|
||||
#endif /* _GDISP_OPTIONS_H */
|
||||
|
@ -587,6 +587,15 @@ void _gdispInit(void) {
|
||||
g->flags = 0;
|
||||
gdisp_lld_init(g);
|
||||
|
||||
#if defined(GDISP_DEFAULT_ORIENTATION) && GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL
|
||||
g->p.x = GDISP_CONTROL_ORIENTATION;
|
||||
g->p.ptr = GDISP_DEFAULT_ORIENTATION;
|
||||
#if GDISP_HARDWARE_CONTROL == HARDWARE_AUTODETECT
|
||||
if (g->vmt->control)
|
||||
#endif
|
||||
gdisp_lld_control(g);
|
||||
#endif
|
||||
|
||||
// Set the initial clipping region
|
||||
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user