From 3c5c7361837c6a27257355312bde48cbfe090fb8 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Sat, 3 Nov 2012 02:23:58 +0100 Subject: [PATCH] docs --- docs/rsc/layout.xml | 184 +++++++ docs/rsc/logo.png | Bin 0 -> 16818 bytes templates/gdispXXX/gdisp_lld.c | 561 ++++++++++++++++++++ templates/gdispXXX/gdisp_lld.mk | 5 + templates/gdispXXX/gdisp_lld_config.h | 70 +++ templates/gdispXXX/readme.txt | 35 ++ templates/touchpadXXX/touchpad_lld.c | 151 ++++++ templates/touchpadXXX/touchpad_lld.mk | 6 + templates/touchpadXXX/touchpad_lld_config.h | 45 ++ 9 files changed, 1057 insertions(+) create mode 100644 docs/rsc/layout.xml create mode 100644 docs/rsc/logo.png create mode 100644 templates/gdispXXX/gdisp_lld.c create mode 100644 templates/gdispXXX/gdisp_lld.mk create mode 100644 templates/gdispXXX/gdisp_lld_config.h create mode 100644 templates/gdispXXX/readme.txt create mode 100644 templates/touchpadXXX/touchpad_lld.c create mode 100644 templates/touchpadXXX/touchpad_lld.mk create mode 100644 templates/touchpadXXX/touchpad_lld_config.h diff --git a/docs/rsc/layout.xml b/docs/rsc/layout.xml new file mode 100644 index 00000000..9ec514ba --- /dev/null +++ b/docs/rsc/layout.xml @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/rsc/logo.png b/docs/rsc/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..7948daefba4efcb498af91a331000ae5ac87c406 GIT binary patch literal 16818 zcmV(}K+wO5P)JQIp^fx z#}{+3fAj$Ue?IWW=DEijt33 zZ1GQ+@{i_|f4XBI3N3W3dPoYe)iK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Xks<79mM5de zVB@a;e(Wx_M#+?A=2X{|lsK^?KN$6dKlkd={k_Zg9{#>-xg2xpwhF3@rhGbe&0&G5 zh~dDda+a~|0I%pO8QEE3_Db1)ZVpH+Ey0fQrtGn8rn1&>H_>`~=`|Nz(zC13*pS={ zW#IrgA!WovSF*)tCRkYtpvq#6rYk{T`qQ8PaR2@GCcgI7J)_G@FAJW0lz-N=K>ez0 z1AvOZr7Ss^YMx+4@PnP3QvJGkxF))2!#(`@D_?|@IIyjRcm_supgs>Ly}D&1vTS)K4+bVlUYfA2eopNJ(v1Bpw6 zM@t_(+P!havmir2<^a0rcy7z5E_mR?{rZI${nxFx+ZUo>g|&5WF{{2>J#sd>kkdPo zm!Ep!=;)?c4x`O&*?Y;D;3_U09hy-h9Y zW^6z%Gst&HfNkcXOkjT5V)1 zGVGkA|2qDm6*#0fUw*Q)r?a3HF2CZ3pK(!s5XZBBd0^J~vTy~pjUz8U@taT1zxL`f z#ZHd9YW&4No44?~%JQ?M3I{1WRXUh^ecqAk+;#95Isf}dm6Q?Z6dGL2JacKFf|Q+x zqpccYFDobhqp0@?Rvso3FZb=&We?SK2vU)}x_7ACG4w5CoP6C$-2%ZKVl zhx`bSvAJi_Q*Njqaft#nEjf{ug~@&Q+zcPx_#c;z4HEC+G`NU)=do%ZS@X&x!@u&O z@rt2*DX;n4e_ngtE&cB|Jao;ke)Y4Tz4-deZGY4b)r}7A;T|u`llA+ry=kFuGCr_T zRB!+Ut}FqA0et?!fa#*6kBw(Q%SlWojxf#5W#?Rc(M>=7<}fdQ2+ZIAcaM)&y?Wl) zzWl?VeCwWV51th~^7pN86ru>&Z5w&lVA10>p_Imtl3i62CK!rXef&xNnO9#t{@_M`SK9_DWA@3GpD129PZP1Ll{M!fa%H%gDT2PJ!0!m7lP + + This file is part of ChibiOS/GFX. + + ChibiOS/GFX is free software; you can redistribute it and/or modify + 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. + + ChibiOS/GFX is distributed in the hope that it will be useful, + 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 . +*/ + +/** + * @file templates/gdispXXX/gdisp_lld.c + * @brief GDISP Graphics Driver subsystem low level driver source template. + * + * @addtogroup GDISP + * @{ + */ + +#include "ch.h" +#include "hal.h" +#include "gdisp.h" + +#if GFX_USE_GDISP || defined(__DOXYGEN__) + +/* Include the emulation code for things we don't support */ +#include "gdisp_emulation.c" + +#if GDISP_NEED_TEXT && GDISP_HARDWARE_TEXT + #include "gdisp_fonts.h" +#endif + +/* All the board specific code should go in these include file so the driver + * can be ported to another board just by creating a suitable file. + */ +#if defined(BOARD_YOURBOARDNAME) + #include "gdisp_lld_board_yourboardname.h" +#else + /* Include the user supplied board definitions */ + #include "gdisp_lld_board.h" +#endif + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ + +/* ---- Required Routines ---- */ +/* + The following 2 routines are required. + All other routines are optional. +*/ + +/** + * @brief Low level GDISP driver initialisation. + * @return TRUE if successful, FALSE on error. + * + * @notapi + */ +bool_t GDISP_LLD(init)(void) { + /* Initialise your display */ + + /* Initialise the GDISP structure to match */ + GDISP.Width = GDISP_SCREEN_WIDTH; + GDISP.Height = GDISP_SCREEN_HEIGHT; + GDISP.Orientation = GDISP_ROTATE_0; + GDISP.Powermode = powerOn; + GDISP.Backlight = 100; + GDISP.Contrast = 50; + #if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP + GDISP.clipx0 = 0; + GDISP.clipy0 = 0; + GDISP.clipx1 = GDISP.Width; + GDISP.clipy1 = GDISP.Height; + #endif + 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 + */ +void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) { + #if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP + if (x < GDISP.clipx0 || y < GDISP.clipy0 || x >= GDISP.clipx1 || y >= GDISP.clipy1) return; + #endif + /* Code here */ +} + +/* ---- Optional Routines ---- */ +/* + All the below routines are optional. + Defining them will increase speed but everything + will work if they are not defined. + If you are not using a routine - turn it off using + the appropriate GDISP_HARDWARE_XXXX macro. + Don't bother coding for obvious similar routines if + there is no performance penalty as the emulation software + makes a good job of using similar routines. + eg. If fillarea() is defined there is little + point in defining clear() unless the + performance bonus is significant. + For good performance it is suggested to implement + fillarea() and blitarea(). +*/ + +#if GDISP_HARDWARE_CLEARS || defined(__DOXYGEN__) + /** + * @brief Clear the display. + * @note Optional - The high level driver can emulate using software. + * + * @param[in] color The color of the pixel + * + * @notapi + */ + void GDISP_LLD(clear)(color_t color) { + /* Code here */ + } +#endif + +#if GDISP_HARDWARE_LINES || defined(__DOXYGEN__) + /** + * @brief Draw a line. + * @note Optional - The high level driver can emulate using software. + * + * @param[in] x0, y0 The start of the line + * @param[in] x1, y1 The end of the line + * @param[in] color The color of the line + * + * @notapi + */ + void GDISP_LLD(drawline)(coord_t x0, coord_t y0, coord_t x1, coord_t y1, color_t color) { + #if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP + /* Code here */ + #endif + /* Code here */ + } +#endif + +#if GDISP_HARDWARE_FILLS || defined(__DOXYGEN__) + /** + * @brief Fill an area with a color. + * @note Optional - The high level driver can emulate using software. + * + * @param[in] x, y The start filled area + * @param[in] cx, cy The width and height to be filled + * @param[in] color The color of the fill + * + * @notapi + */ + void GDISP_LLD(fillarea)(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) { + #if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP + if (x < GDISP.clipx0) { cx -= GDISP.clipx0 - x; x = GDISP.clipx0; } + if (y < GDISP.clipy0) { cy -= GDISP.clipy0 - y; y = GDISP.clipy0; } + if (cx <= 0 || cy <= 0 || x >= GDISP.clipx1 || y >= GDISP.clipy1) return; + if (x+cx > GDISP.clipx1) cx = GDISP.clipx1 - x; + if (y+cy > GDISP.clipy1) cy = GDISP.clipy1 - y; + #endif + /* Code here */ + } +#endif + +#if GDISP_HARDWARE_BITFILLS || defined(__DOXYGEN__) + /** + * @brief Fill an area with a bitmap. + * @note Optional - The high level driver can emulate using software. + * + * @param[in] x, y The start filled area + * @param[in] cx, cy The width and height to be filled + * @param[in] srcx, srcy The bitmap position to start the fill from + * @param[in] srccx The width of a line in the bitmap. + * @param[in] buffer The pixels to use to fill the area. + * + * @notapi + */ + void GDISP_LLD(blitareaex)(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) { + #if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP + if (x < GDISP.clipx0) { cx -= GDISP.clipx0 - x; srcx += GDISP.clipx0 - x; x = GDISP.clipx0; } + if (y < GDISP.clipy0) { cy -= GDISP.clipy0 - y; srcy += GDISP.clipy0 - y; y = GDISP.clipy0; } + if (srcx+cx > srccx) cx = srccx - srcx; + if (cx <= 0 || cy <= 0 || x >= GDISP.clipx1 || y >= GDISP.clipy1) return; + if (x+cx > GDISP.clipx1) cx = GDISP.clipx1 - x; + if (y+cy > GDISP.clipy1) cy = GDISP.clipy1 - y; + #endif + /* Code here */ + } +#endif + +/* Circular Drawing Functions */ +#if (GDISP_NEED_CIRCLE && GDISP_HARDWARE_CIRCLES) || defined(__DOXYGEN__) + /** + * @brief Draw a circle. + * @note Optional - The high level driver can emulate using software. + * @note If GDISP_NEED_CLIPPING is defined this routine MUST behave + * correctly if the circle is over the edges of the screen. + * + * @param[in] x, y The centre of the circle + * @param[in] radius The radius of the circle + * @param[in] color The color of the circle + * + * @notapi + */ + void GDISP_LLD(drawcircle)(coord_t x, coord_t y, coord_t radius, color_t color) { + #if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP + /* Code here */ + #endif + /* Code here */ + } +#endif + +#if (GDISP_NEED_CIRCLE && GDISP_HARDWARE_CIRCLEFILLS) || defined(__DOXYGEN__) + /** + * @brief Create a filled circle. + * @note Optional - The high level driver can emulate using software. + * @note If GDISP_NEED_CLIPPING is defined this routine MUST behave + * correctly if the circle is over the edges of the screen. + * + * @param[in] x, y The centre of the circle + * @param[in] radius The radius of the circle + * @param[in] color The color of the circle + * + * @notapi + */ + void GDISP_LLD(fillcircle)(coord_t x, coord_t y, coord_t radius, color_t color) { + #if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP + /* Code here */ + #endif + /* Code here */ + } +#endif + +#if (GDISP_NEED_ELLIPSE && GDISP_HARDWARE_ELLIPSES) || defined(__DOXYGEN__) + /** + * @brief Draw an ellipse. + * @note Optional - The high level driver can emulate using software. + * @note If GDISP_NEED_CLIPPING is defined this routine MUST behave + * correctly if the ellipse is over the edges of the screen. + * + * @param[in] x, y The centre of the ellipse + * @param[in] a, b The dimensions of the ellipse + * @param[in] color The color of the ellipse + * + * @notapi + */ + void GDISP_LLD(drawellipse)(coord_t x, coord_t y, coord_t a, coord_t b, color_t color) { + #if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP + /* Code here */ + #endif + /* Code here */ + } +#endif + +#if (GDISP_NEED_ELLIPSE && GDISP_HARDWARE_ELLIPSEFILLS) || defined(__DOXYGEN__) + /** + * @brief Create a filled ellipse. + * @note Optional - The high level driver can emulate using software. + * @note If GDISP_NEED_CLIPPING is defined this routine MUST behave + * correctly if the ellipse is over the edges of the screen. + * + * @param[in] x, y The centre of the ellipse + * @param[in] a, b The dimensions of the ellipse + * @param[in] color The color of the ellipse + * + * @notapi + */ + void GDISP_LLD(fillellipse)(coord_t x, coord_t y, coord_t a, coord_t b, color_t color) { + #if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP + /* Code here */ + #endif + /* Code here */ + } +#endif + +/* Arc Drawing Functions */ +#if (GDISP_NEED_ARC && GDISP_HARDWARE_ARCS) || defined(__DOXYGEN__) + /** + * @brief Draw an arc. + * @note Optional - The high level driver can emulate using software. + * @note If GDISP_NEED_CLIPPING is defined this routine MUST behave + * correctly if the circle is over the edges of the screen. + * + * @param[in] x, y The centre of the arc circle + * @param[in] radius The radius of the arc circle + * @param[in] startangle, endangle The start and end angles for the arc (0..359) + * @param[in] color The color of the circle + * + * @notapi + */ + void GDISP_LLD(drawarc)(coord_t x, coord_t y, coord_t radius, coord_t startangle, coord_t endangle, color_t color) { + #if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP + /* Code here */ + #endif + /* Code here */ + } +#endif + +#if (GDISP_NEED_ARC && GDISP_HARDWARE_ARCFILLS) || defined(__DOXYGEN__) + /** + * @brief Create a filled arc. + * @note Optional - The high level driver can emulate using software. + * @note If GDISP_NEED_CLIPPING is defined this routine MUST behave + * correctly if the circle is over the edges of the screen. + * + * @param[in] x, y The centre of the arc circle + * @param[in] radius The radius of the arc circle + * @param[in] startangle, endangle The start and end angles for the arc (0..359) + * @param[in] color The color of the circle + * + * @notapi + */ + void GDISP_LLD(fillarc)(coord_t x, coord_t y, coord_t radius, coord_t startangle, coord_t endangle, color_t color) { + #if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP + /* Code here */ + #endif + /* Code here */ + } +#endif + +#if (GDISP_NEED_TEXT && GDISP_HARDWARE_TEXT) || defined(__DOXYGEN__) + /** + * @brief Draw a character using a transparent background. + * @note Optional - The high level driver can emulate using software. + * + * @param[in] x, y The top-left corner of the text + * @param[in] c The character to print + * @param[in] font The font to use + * @param[in] color The color of the character + * + * @notapi + */ + void GDISP_LLD(drawchar)(coord_t x, coord_t y, char c, font_t font, color_t color) { + #if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP + /* Code here */ + #endif + /* Code here */ + } +#endif + +#if (GDISP_NEED_TEXT && GDISP_HARDWARE_TEXTFILLS) || defined(__DOXYGEN__) + /** + * @brief Draw a character using a filled background. + * @note Optional - The high level driver can emulate using software. + * + * @param[in] x, y The top-left corner of the text + * @param[in] c The character to print + * @param[in] font The font to use + * @param[in] color The color of the character + * @param[in] bgcolor The background color + * + * @notapi + */ + void GDISP_LLD(fillchar)(coord_t x, coord_t y, char c, font_t font, color_t color, color_t bgcolor) { + #if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP + /* Code here */ + #endif + /* Code here */ + } +#endif + +#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. + * @return The color of the specified pixel. + * + * @param[in] x, y The start of the text + * + * @notapi + */ + color_t GDISP_LLD(getpixelcolor)(coord_t x, coord_t y) { + #if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP + if (x < 0 || x >= GDISP.Width || y < 0 || y >= GDISP.Height) return 0; + #endif + /* Code here */ + } +#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 + */ + void GDISP_LLD(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) { + #if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP + if (x < GDISP.clipx0) { cx -= GDISP.clipx0 - x; x = GDISP.clipx0; } + if (y < GDISP.clipy0) { cy -= GDISP.clipy0 - y; y = GDISP.clipy0; } + if (!lines || cx <= 0 || cy <= 0 || x >= GDISP.clipx1 || y >= GDISP.clipy1) return; + if (x+cx > GDISP.clipx1) cx = GDISP.clipx1 - x; + if (y+cy > GDISP.clipy1) cy = GDISP.clipy1 - y; + #endif + /* Code here */ + } +#endif + +#if (GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL) || defined(__DOXYGEN__) + /** + * @brief Driver Control + * @details Unsupported control codes are ignored. + * @note The value parameter should always be typecast to (void *). + * @note There are some predefined and some specific to the low level driver. + * @note GDISP_CONTROL_POWER - Takes a gdisp_powermode_t + * GDISP_CONTROL_ORIENTATION - Takes a gdisp_orientation_t + * GDISP_CONTROL_BACKLIGHT - Takes an int from 0 to 100. For a driver + * that only supports off/on anything other + * than zero is on. + * GDISP_CONTROL_CONTRAST - Takes an int from 0 to 100. + * GDISP_CONTROL_LLD - Low level driver control constants start at + * this value. + * + * @param[in] what What to do. + * @param[in] value The value to use (always cast to a void *). + * + * @notapi + */ + void GDISP_LLD(control)(unsigned what, void *value) { + switch(what) { + case GDISP_CONTROL_POWER: + if (GDISP.Powermode == (gdisp_powermode_t)value) + return; + switch((gdisp_powermode_t)value) { + case powerOff: + /* Code here */ + break; + case powerOn: + /* Code here */ + /* You may need this --- + if (GDISP.Powermode != powerSleep) + GDISP_LLD(init)(); + */ + break; + case powerSleep: + /* Code here */ + break; + default: + return; + } + GDISP.Powermode = (gdisp_powermode_t)value; + return; + case GDISP_CONTROL_ORIENTATION: + if (GDISP.Orientation == (gdisp_orientation_t)value) + return; + switch((gdisp_orientation_t)value) { + case GDISP_ROTATE_0: + /* Code here */ + GDISP.Height = GDISP_SCREEN_HEIGHT; + GDISP.Width = GDISP_SCREEN_WIDTH; + break; + case GDISP_ROTATE_90: + /* Code here */ + GDISP.Height = GDISP_SCREEN_WIDTH; + GDISP.Width = GDISP_SCREEN_HEIGHT; + break; + case GDISP_ROTATE_180: + /* Code here */ + GDISP.Height = GDISP_SCREEN_HEIGHT; + GDISP.Width = GDISP_SCREEN_WIDTH; + break; + case GDISP_ROTATE_270: + /* Code here */ + GDISP.Height = GDISP_SCREEN_WIDTH; + GDISP.Width = GDISP_SCREEN_HEIGHT; + break; + default: + return; + } + #if GDISP_NEED_CLIP || GDISP_NEED_VALIDATION + GDISP.clipx0 = 0; + GDISP.clipy0 = 0; + GDISP.clipx1 = GDISP.Width; + GDISP.clipy1 = GDISP.Height; + #endif + GDISP.Orientation = (gdisp_orientation_t)value; + return; +/* + case GDISP_CONTROL_BACKLIGHT: + case GDISP_CONTROL_CONTRAST: +*/ + } + } +#endif + +#if (GDISP_NEED_QUERY && GDISP_HARDWARE_QUERY) || defined(__DOXYGEN__) +/** + * @brief Query a driver value. + * @details Typecase the result to the type you want. + * @note GDISP_QUERY_WIDTH - (coord_t) Gets the width of the screen + * GDISP_QUERY_HEIGHT - (coord_t) Gets the height of the screen + * GDISP_QUERY_POWER - (gdisp_powermode_t) Get the current powermode + * GDISP_QUERY_ORIENTATION - (gdisp_orientation_t) Get the current screen orientation + * GDISP_QUERY_BACKLIGHT - (coord_t) Get the backlight state (0 to 100) + * GDISP_QUERY_CONTRAST - (coord_t) Get the contrast (0 to 100). + * GDISP_QUERY_LLD - Low level driver control constants start at + * this value. + * + * @param[in] what What to Query + * + * @notapi + */ +void *GDISP_LLD(query)(unsigned what) { + switch(what) { + case GDISP_QUERY_WIDTH: return (void *)(unsigned)GDISP.Width; + case GDISP_QUERY_HEIGHT: return (void *)(unsigned)GDISP.Height; + case GDISP_QUERY_POWER: return (void *)(unsigned)GDISP.Powermode; + case GDISP_QUERY_ORIENTATION: return (void *)(unsigned)GDISP.Orientation; + case GDISP_QUERY_BACKLIGHT: return (void *)(unsigned)GDISP.Backlight; + case GDISP_QUERY_CONTRAST: return (void *)(unsigned)GDISP.Contrast; + case GDISP_QUERY_LLD+0: + /* Code here */ + default: return (void *)-1; + } +} +#endif + +#if GDISP_NEED_CLIP && GDISP_HARDWARE_CLIP + void GDISP_LLD(setclip)(coord_t x, coord_t y, coord_t cx, coord_t cy) { + #if GDISP_NEED_VALIDATION + if (x >= GDISP.Width || y >= GDISP.Height || cx < 0 || cy < 0) + return; + if (x < 0) x = 0; + if (y < 0) y = 0; + if (x+cx > GDISP.Width) cx = GDISP.Width - x; + if (y+cy > GDISP.Height) cy = GDISP.Height - y; + #endif + GDISP.clipx0 = x; + GDISP.clipy0 = y; + GDISP.clipx1 = x+cx; + GDISP.clipy1 = y+cy; + /* Code here to set hardware clipping */ + } +#endif + +#endif /* GFX_USE_GDISP */ +/** @} */ + diff --git a/templates/gdispXXX/gdisp_lld.mk b/templates/gdispXXX/gdisp_lld.mk new file mode 100644 index 00000000..434d5366 --- /dev/null +++ b/templates/gdispXXX/gdisp_lld.mk @@ -0,0 +1,5 @@ +# List the required driver. +GFXSRC += $(GFXLIB)/drivers/gdisp/gdispYOURDEVICE/gdisp_lld.c + +# Required include directories +GFXINC += $(GFXLIB)/drivers/gdisp/gdispYOURDEVICE diff --git a/templates/gdispXXX/gdisp_lld_config.h b/templates/gdispXXX/gdisp_lld_config.h new file mode 100644 index 00000000..b1c71729 --- /dev/null +++ b/templates/gdispXXX/gdisp_lld_config.h @@ -0,0 +1,70 @@ +/* + ChibiOS/GFX - Copyright (C) 2012 + Joel Bodenmann aka Tectu + + This file is part of ChibiOS/GFX. + + ChibiOS/GFX is free software; you can redistribute it and/or modify + 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. + + ChibiOS/GFX is distributed in the hope that it will be useful, + 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 . +*/ + +/** + * @file templates/gdispXXX/gdisp_lld_config.h + * @brief GDISP Graphic Driver subsystem low level driver header template. + * + * @addtogroup GDISP + * @{ + */ + +#ifndef _GDISP_LLD_CONFIG_H +#define _GDISP_LLD_CONFIG_H + +#if GFX_USE_GDISP || defined(__DOXYGEN__) + +/*===========================================================================*/ +/* Driver hardware support. */ +/*===========================================================================*/ + +#define GDISP_DRIVER_NAME "YourDriverName" +#define GDISP_LLD(x) gdisp_lld_##x##_YourDriverName + +#define GDISP_HARDWARE_LINES FALSE +#define GDISP_HARDWARE_CLEARS FALSE +#define GDISP_HARDWARE_FILLS FALSE +#define GDISP_HARDWARE_BITFILLS FALSE +#define GDISP_HARDWARE_CIRCLES FALSE +#define GDISP_HARDWARE_CIRCLEFILLS FALSE +#define GDISP_HARDWARE_ELLIPSES FALSE +#define GDISP_HARDWARE_ELLIPSEFILLS FALSE +#define GDISP_HARDWARE_ARCS FALSE +#define GDISP_HARDWARE_ARCFILLS FALSE +#define GDISP_HARDWARE_TEXT FALSE +#define GDISP_HARDWARE_TEXTFILLS FALSE +#define GDISP_HARDWARE_SCROLL FALSE +#define GDISP_HARDWARE_PIXELREAD FALSE +#define GDISP_HARDWARE_CONTROL FALSE +#define GDISP_HARDWARE_QUERY FALSE +#define GDISP_HARDWARE_CLIP FALSE + +#define GDISP_SOFTWARE_TEXTFILLDRAW FALSE +#define GDISP_SOFTWARE_TEXTBLITCOLUMN FALSE + +#define GDISP_PIXELFORMAT GDISP_PIXELFORMAT_RGB565 +#define GDISP_PACKED_PIXELS FALSE +#define GDISP_PACKED_LINES FALSE + +#endif /* GFX_USE_GDISP */ + +#endif /* _GDISP_LLD_CONFIG_H */ +/** @} */ + diff --git a/templates/gdispXXX/readme.txt b/templates/gdispXXX/readme.txt new file mode 100644 index 00000000..f173764d --- /dev/null +++ b/templates/gdispXXX/readme.txt @@ -0,0 +1,35 @@ +To use this driver template + 1. Copy this entire directory (including the directory itself) + into halext/drivers + 2. Rename the directory to match your hardware. + 3. Customise each file in the directory including the .mk file + and this file. An example for this file is below... + 4. Keep any board specific code in a file you create called + gdisp_lld_board_yourboardname.h and adjust gdisp.c to match. + This enables someone porting to a new board to add another + suitable boad definition without worrying about the rest of + the driver. See the gdispNokia6610 driver as an example. + +------------------------------------------------------------------ +To use this driver: + +1. Add in your halconf.h: + a) #define GFX_USE_GDISP TRUE + b) Any optional high level driver defines (see gdisp.h) eg: GDISP_NEED_MULTITHREAD + c) One (only) of: + #define GDISP_USE_GPIO + #define GDISP_USE_SPI + #define GDISP_USE_FSMC + d) All of the following (with appropriate values): + #define GDISP_SCREEN_WIDTH 128 + #define GDISP_SCREEN_HEIGHT 128 + e) If you are not using a known board then create a gdisp_lld_board.h file + and ensure it is on your include path. + Use the gdisp_lld_board_example.h file as a basis. + Currently known boards are: + XXXXXXXXX + + +2. To your makefile add the following lines: + include $(CHIBIOS)/os/halext/halext.mk + include $(CHIBIOS)/os/halext/drivers/gdispXXXXX/gdisp_lld.mk diff --git a/templates/touchpadXXX/touchpad_lld.c b/templates/touchpadXXX/touchpad_lld.c new file mode 100644 index 00000000..8a832d8c --- /dev/null +++ b/templates/touchpadXXX/touchpad_lld.c @@ -0,0 +1,151 @@ +/* + ChibiOS/GFX - Copyright (C) 2012 + Joel Bodenmann aka Tectu + + This file is part of ChibiOS/GFX. + + ChibiOS/GFX is free software; you can redistribute it and/or modify + 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. + + ChibiOS/GFX is distributed in the hope that it will be useful, + 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 . +*/ + +/** + * @file templates/touchpadXXX/touchpad_lld.c + * @brief Touchpad Driver subsystem low level driver source. + * + * @addtogroup TOUCHPAD + * @{ + */ + +#include "ch.h" +#include "hal.h" +#include "touchpad.h" + +#if GFX_USE_TOUCHPAD || defined(__DOXYGEN__) + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/* put needed macros for your interface/driver here. + * when using SPI, macros for setting and clearing CS line + */ +#define TP_CS_HIGH palSetPad(TP_CS_PORT, TP_CS) +#define TP_CS_LOW palClearPad(TP_CS_PORT, TP_CS) + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +#if !defined(__DOXYGEN__) + TOUCHPADDriver Touchpad; +#endif + +/*===========================================================================*/ +/* Driver local variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ + +/* ---- Required Routines ---- */ + +/** + * @brief Low level Touchpad driver initialization. + * + * @param[in] tp The touchpad driver struct + * + * @notapi + */ +void tp_lld_init(TOUCHPADDriver *tp) { + /* do communicate with the touchpad controller + * to do any inizialisation (mostly spiStart()) + */ +} + +/** + * @brief Reads out the X direction. + * + * @return The uncalibrated X coordinate + * + * @notapi + */ +uint16_t tp_lld_read_x(void) { + uint16_t x; + + /* do communicate with the touchpad controller + * to receive the X-Coordinate + */ + x = 0; + + return x; +} + +/* + * @brief Reads out the Y direction. + * + * @return The uncalibrated Y coordinate + * + * @notapi + */ +uint16_t tp_lld_read_y(void) { + uint16_t y; + + /* do communicate with the touchpad controller + * to receive the Y-Coordinate + */ + y = 0; + + return y; +} + +/* ---- Optional Routines ---- */ +#if TOUCHPAD_HAS_IRQ || defined(__DOXYGEN__) + /* + * @brief for checking if touchpad is pressed or not. + * + * @return 1 if pressed / 0 if not pressed + * + * @notapi + */ + uint8_t tp_lld_irq(void) { + /* do return PEN IRQ state if your + * touchpad controller does have any + */ + return 0; + } +#endif + +#if TOUCHPAD_HAS_PRESSURE || defined(__DOXYGEN__) + /* + * @brief Reads out the Z direction / pressure. + * + * @notapi + */ + uint16_t tp_lld_read_z(void) { + /* return the pressure */ + return 0; + } +#endif + +#endif /* GFX_USE_TOUCHPAD */ +/** @} */ + diff --git a/templates/touchpadXXX/touchpad_lld.mk b/templates/touchpadXXX/touchpad_lld.mk new file mode 100644 index 00000000..524a407b --- /dev/null +++ b/templates/touchpadXXX/touchpad_lld.mk @@ -0,0 +1,6 @@ +# List the required driver. +GFXSRC += $(GFXLIB)/drivers/touchpad/touchpadYOURDEVICE/touchpad_lld.c + +# Required include directories +GFXINC += $(GFXLIB)/drivers/touchpad/touchpadYOURDEVICE + diff --git a/templates/touchpadXXX/touchpad_lld_config.h b/templates/touchpadXXX/touchpad_lld_config.h new file mode 100644 index 00000000..e7d046da --- /dev/null +++ b/templates/touchpadXXX/touchpad_lld_config.h @@ -0,0 +1,45 @@ +/* + ChibiOS/GFX - Copyright (C) 2012 + Joel Bodenmann aka Tectu + + This file is part of ChibiOS/GFX. + + ChibiOS/GFX is free software; you can redistribute it and/or modify + 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. + + ChibiOS/GFX is distributed in the hope that it will be useful, + 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 . +*/ + +/** + * @file templates/touchpadXXX/touchpad_lld_config.h + * @brief Touchppad Driver subsystem low level driver. + * + * @addtogroup TOUCHPAD + * @{ + */ + +#ifndef _TOUCHPAD_LLD_CONFIG_H +#define _TOUCHPAD_LLD_CONFIG_H + +#if GFX_USE_TOUCHPAD || defined(__DOXYGEN__) + +/*===========================================================================*/ +/* Driver hardware support. */ +/*===========================================================================*/ + +#define TOUCHPAD_HAS_IRQ TRUE +#define TOUCHPAD_HAS_PRESSURE TRUE + +#endif /* GFX_USE_TOUCHPAD */ + +#endif /* _TOUCHPAD_LLD_CONFIG_H */ +/** @} */ +