在drivers/kitronix320x240x16_ssd2119_8bit.c中修改如下的宏,就可以改变显示的方向了。 //*****************************************************************************
//
// This driver operates in four different screen orientations. They are:
//
// * Portrait - The screen is taller than it is wide, and the flex connector is
// on the left of the display. This is selected by defining
// PORTRAIT.
//
// * Landscape - The screen is wider than it is tall, and the flex connector is
// on the bottom of the display. This is selected by defining
// LANDSCAPE.
//
// * Portrait flip - The screen is taller than it is wide, and the flex
// connector is on the right of the display. This is
// selected by defining PORTRAIT_FLIP.
//
// * Landscape flip - The screen is wider than it is tall, and the flex
// connector is on the top of the display. This is
// selected by defining LANDSCAPE_FLIP.
//
// These can also be imagined in terms of screen rotation; if portrait mode is
// 0 degrees of screen rotation, landscape is 90 degrees of counter-clockwise
// rotation, portrait flip is 180 degrees of rotation, and landscape flip is
// 270 degress of counter-clockwise rotation.
//
// If no screen orientation is selected, "landscape flip" mode will be used.
//
//*****************************************************************************
#if ! defined(PORTRAIT) && ! defined(PORTRAIT_FLIP) &&
! defined(LANDSCAPE) && ! defined(LANDSCAPE_FLIP)
#define LANDSCAPE_FLIP
#endif
//*****************************************************************************
//
// This driver operates in four different screen orientations. They are:
//
// * Portrait - The screen is taller than it is wide, and the flex connector is
// on the left of the display. This is selected by defining
// PORTRAIT.
//
// * Landscape - The screen is wider than it is tall, and the flex connector is
// on the bottom of the display. This is selected by defining
// LANDSCAPE.
//
// * Portrait flip - The screen is taller than it is wide, and the flex
// connector is on the right of the display. This is
// selected by defining PORTRAIT_FLIP.
//
// * Landscape flip - The screen is wider than it is tall, and the flex
// connector is on the top of the display. This is
// selected by defining LANDSCAPE_FLIP.
//
// These can also be imagined in terms of screen rotation; if portrait mode is
// 0 degrees of screen rotation, landscape is 90 degrees of counter-clockwise
// rotation, portrait flip is 180 degrees of rotation, and landscape flip is
// 270 degress of counter-clockwise rotation.
//
// If no screen orientation is selected, "landscape flip" mode will be used.
//
//*****************************************************************************
#if ! defined(PORTRAIT) && ! defined(PORTRAIT_FLIP) &&
! defined(LANDSCAPE) && ! defined(LANDSCAPE_FLIP)
#define LANDSCAPE_FLIP
#endif
一周热门 更多>