2012-08-13 02:12:42 +00:00
|
|
|
/*
|
|
|
|
ChibiOS/RT - Copyright (C) 2012
|
|
|
|
Joel Bodenmann aka Tectu <joel@unormal.org>
|
|
|
|
|
2012-09-24 22:19:10 +00:00
|
|
|
This file is part of ChibiOS/GFX.
|
2012-08-13 02:12:42 +00:00
|
|
|
|
2012-09-24 22:19:10 +00:00
|
|
|
ChibiOS/GFX is free software; you can redistribute it and/or modify
|
2012-08-13 02:12:42 +00:00
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
2012-09-24 22:19:10 +00:00
|
|
|
ChibiOS/GFX is distributed in the hope that it will be useful,
|
2012-08-13 02:12:42 +00:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file gdispTestStub/gdisp_lld.c
|
|
|
|
* @brief GDISP Graphics Driver subsystem low level driver source (stub).
|
|
|
|
*
|
|
|
|
* @addtogroup GDISP
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "ch.h"
|
|
|
|
#include "hal.h"
|
|
|
|
#include "gdisp.h"
|
|
|
|
|
|
|
|
#if HAL_USE_GDISP || defined(__DOXYGEN__)
|
|
|
|
|
|
|
|
/* Include the emulation code for things we don't support */
|
|
|
|
#include "gdisp_emulation.c"
|
|
|
|
|
|
|
|
/* ---- Required Routines ---- */
|
|
|
|
/*
|
|
|
|
The following 2 routines are required.
|
|
|
|
All other routines are optional.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Low level GDISP driver initialization.
|
|
|
|
*
|
|
|
|
* @notapi
|
|
|
|
*/
|
|
|
|
bool_t GDISP_LLD(init)(void) {
|
|
|
|
/* Initialise the GDISP structure */
|
|
|
|
GDISP.Width = 128;
|
|
|
|
GDISP.Height = 128;
|
2012-10-05 07:20:39 +00:00
|
|
|
GDISP.Orientation = GDISP_ROTATE_0;
|
2012-08-13 02:12:42 +00:00
|
|
|
GDISP.Powermode = powerOff;
|
|
|
|
GDISP.Backlight = 100;
|
|
|
|
GDISP.Contrast = 50;
|
2012-09-10 05:54:22 +00:00
|
|
|
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
|
|
|
|
GDISP.clipx0 = 0;
|
|
|
|
GDISP.clipy0 = 0;
|
2012-09-10 10:38:54 +00:00
|
|
|
GDISP.clipx1 = GDISP.Width;
|
|
|
|
GDISP.clipy1 = GDISP.Height;
|
2012-09-10 05:54:22 +00:00
|
|
|
#endif
|
2012-08-13 02:12:42 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Draws a pixel on the display.
|
|
|
|
*
|
|
|
|
* @param[in] x X location of the pixel
|
|
|
|
* @param[in] y Y location of the pixel
|
|
|
|
* @param[in] color The color of the pixel
|
|
|
|
*
|
|
|
|
* @notapi
|
|
|
|
*/
|
2012-09-26 18:18:18 +00:00
|
|
|
void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
|
|
|
|
(void)x;
|
|
|
|
(void)y;
|
|
|
|
(void)color;
|
2012-08-13 02:12:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ---- Optional Routines ---- */
|
|
|
|
|
|
|
|
#if (GDISP_NEED_PIXELREAD && GDISP_HARDWARE_PIXELREAD) || defined(__DOXYGEN__)
|
|
|
|
/**
|
|
|
|
* @brief Get the color of a particular pixel.
|
|
|
|
* @note Optional.
|
|
|
|
* @note If x,y is off the screen, the result is undefined.
|
|
|
|
*
|
|
|
|
* @param[in] x, y The start of the text
|
|
|
|
*
|
|
|
|
* @notapi
|
|
|
|
*/
|
2012-09-26 18:18:18 +00:00
|
|
|
color_t GDISP_LLD(getpixelcolor)(coord_t x, coord_t y) {
|
|
|
|
(void)x;
|
|
|
|
(void)y;
|
|
|
|
|
2012-08-13 02:12:42 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (GDISP_NEED_SCROLL && GDISP_HARDWARE_SCROLL) || defined(__DOXYGEN__)
|
|
|
|
/**
|
|
|
|
* @brief Scroll vertically a section of the screen.
|
|
|
|
* @note Optional.
|
|
|
|
* @note If x,y + cx,cy is off the screen, the result is undefined.
|
|
|
|
* @note If lines is >= cy, it is equivelent to a area fill with bgcolor.
|
|
|
|
*
|
|
|
|
* @param[in] x, y The start of the area to be scrolled
|
|
|
|
* @param[in] cx, cy The size of the area to be scrolled
|
|
|
|
* @param[in] lines The number of lines to scroll (Can be positive or negative)
|
|
|
|
* @param[in] bgcolor The color to fill the newly exposed area.
|
|
|
|
*
|
|
|
|
* @notapi
|
|
|
|
*/
|
2012-09-26 18:18:18 +00:00
|
|
|
void GDISP_LLD(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
|
|
|
|
(void)x;
|
|
|
|
(void)y;
|
|
|
|
(void)cx;
|
|
|
|
(void)cy;
|
|
|
|
(void)lines;
|
|
|
|
(void)bgcolor;
|
2012-08-13 02:12:42 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* HAL_USE_GDISP */
|
|
|
|
/** @} */
|