diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-09-24 16:10:15 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-09-24 16:10:15 +1000 |
commit | 973e34089e33f06cfd9ed560db968870e22c2b8a (patch) | |
tree | 1acfcb855bf0865f3d3c9aa1208c9caac8678d5b /include/gdisp | |
parent | 40ec5a4e522450458fac6f4c5c9011623b9fa328 (diff) | |
download | uGFX-973e34089e33f06cfd9ed560db968870e22c2b8a.tar.gz uGFX-973e34089e33f06cfd9ed560db968870e22c2b8a.tar.bz2 uGFX-973e34089e33f06cfd9ed560db968870e22c2b8a.zip |
GDISP streaming bug fixes
Win32 bitmap support
Win32 Rotation is back to front. Need to check touch and other drivers.
Diffstat (limited to 'include/gdisp')
-rw-r--r-- | include/gdisp/gdisp.h | 52 | ||||
-rw-r--r-- | include/gdisp/lld/gdisp_lld.h | 26 |
2 files changed, 65 insertions, 13 deletions
diff --git a/include/gdisp/gdisp.h b/include/gdisp/gdisp.h index cb98b46d..6b2f5b47 100644 --- a/include/gdisp/gdisp.h +++ b/include/gdisp/gdisp.h @@ -430,6 +430,58 @@ void gdispBlitAreaEx(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, */ void gdispDrawBox(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color); +/* Streaming Functions */ + +#if GDISP_NEED_STREAMING || defined(__DOXYGEN__) + /** + * @brief Start a streaming operation. + * @details Stream data to a window on the display sequentially and very fast. + * @note While streaming is in operation - no other calls to GDISP functions + * can be made (with the exception of @p gdispBlendColor() and streaming + * functions). If a call is made (eg in a multi-threaded application) the other + * call is blocked waiting for the streaming operation to finish. + * @note @p gdispStreamStop() must be called to finish the streaming operation. + * @note If more data is written than the defined area then the results are unspecified. + * Some drivers may wrap back to the beginning of the area, others may just + * ignore subsequent data. + * @note Unlike most operations that clip the defined area to the display to generate + * a smaller active area, this call will just silently fail if any of the stream + * region lies outside the current clipping area. + * @note A streaming operation may be terminated early (without writing to every location + * in the stream area) by calling @p gdispStreamStop(). + * + * @param[in] x,y The start position + * @param[in] cx,cy The size of the streamable area + * + * @api + */ + void gdispStreamStart(coord_t x, coord_t y, coord_t cx, coord_t cy); + + /** + * @brief Send pixel data to the stream. + * @details Write a pixel to the next position in the streamed area and increment the position + * @pre @p gdispStreamStart() has been called. + * @note If the gdispStreamStart() has not been called (or failed due to clipping), the + * data provided here is simply thrown away. + * + * @param[in] color The color of the pixel to write + * + * @api + */ + void gdispStreamColor(color_t color); + + /** + * @brief Finish the current streaming operation. + * @details Completes the current streaming operation and allows other GDISP calls to operate again. + * @pre @p gdispStreamStart() has been called. + * @note If the gdispStreamStart() has not been called (or failed due to clipping), this + * call is simply ignored. + * + * @api + */ + void gdispStreamStop(void); +#endif + /* Clipping Functions */ #if GDISP_NEED_CLIP || defined(__DOXYGEN__) diff --git a/include/gdisp/lld/gdisp_lld.h b/include/gdisp/lld/gdisp_lld.h index 38c0ccc0..3698efb0 100644 --- a/include/gdisp/lld/gdisp_lld.h +++ b/include/gdisp/lld/gdisp_lld.h @@ -184,7 +184,7 @@ typedef struct GDISPDriver { } GDISPDriver; -#if !GDISP_MULTIPLE_DRIVERS || defined(GDISP_LLD_DECLARATIONS) +#if !GDISP_MULTIPLE_DRIVERS || defined(GDISP_LLD_DECLARATIONS) || defined(__DOXYGEN__) #if GDISP_MULTIPLE_DRIVERS #define LLDSPEC static #else @@ -203,7 +203,7 @@ typedef struct GDISPDriver { */ LLDSPEC bool_t gdisp_lld_init(GDISPDriver *g); - #if GDISP_HARDWARE_STREAM + #if GDISP_HARDWARE_STREAM || defined(__DOXYGEN__) /** * @brief Start a streamed operation * @pre GDISP_HARDWARE_STREAM is TRUE @@ -228,7 +228,7 @@ typedef struct GDISPDriver { */ LLDSPEC void gdisp_lld_stream_color(GDISPDriver *g); - #if GDISP_HARDWARE_STREAM_READ + #if GDISP_HARDWARE_STREAM_READ || defined(__DOXYGEN__) /** * @brief Read a pixel from the current streaming position and then increment that position * @return The color at the current position @@ -241,7 +241,7 @@ typedef struct GDISPDriver { LLDSPEC color_t gdisp_lld_stream_read(GDISPDriver *g); #endif - #if GDISP_HARDWARE_STREAM_END + #if GDISP_HARDWARE_STREAM_END || defined(__DOXYGEN__) /** * @brief End the current streaming operation * @pre GDISP_HARDWARE_STREAM and GDISP_HARDWARE_STREAM_END is TRUE @@ -254,7 +254,7 @@ typedef struct GDISPDriver { #endif #endif - #if GDISP_HARDWARE_DRAWPIXEL + #if GDISP_HARDWARE_DRAWPIXEL || defined(__DOXYGEN__) /** * @brief Draw a pixel * @pre GDISP_HARDWARE_DRAWPIXEL is TRUE @@ -268,7 +268,7 @@ typedef struct GDISPDriver { LLDSPEC void gdisp_lld_draw_pixel(GDISPDriver *g); #endif - #if GDISP_HARDWARE_CLEARS + #if GDISP_HARDWARE_CLEARS || defined(__DOXYGEN__) /** * @brief Clear the screen using the defined color * @pre GDISP_HARDWARE_CLEARS is TRUE @@ -281,7 +281,7 @@ typedef struct GDISPDriver { LLDSPEC void gdisp_lld_clear(GDISPDriver *g); #endif - #if GDISP_HARDWARE_FILLS + #if GDISP_HARDWARE_FILLS || defined(__DOXYGEN__) /** * @brief Fill an area with a single color * @pre GDISP_HARDWARE_FILLS is TRUE @@ -296,7 +296,7 @@ typedef struct GDISPDriver { LLDSPEC void gdisp_lld_fill_area(GDISPDriver *g); #endif - #if GDISP_HARDWARE_BITFILLS + #if GDISP_HARDWARE_BITFILLS || defined(__DOXYGEN__) /** * @brief Fill an area using a bitmap * @pre GDISP_HARDWARE_BITFILLS is TRUE @@ -313,7 +313,7 @@ typedef struct GDISPDriver { LLDSPEC void gdisp_lld_blit_area(GDISPDriver *g); #endif - #if GDISP_HARDWARE_PIXELREAD + #if GDISP_HARDWARE_PIXELREAD || defined(__DOXYGEN__) /** * @brief Read a pixel from the display * @return The color at the defined position @@ -327,7 +327,7 @@ typedef struct GDISPDriver { LLDSPEC color_t gdisp_lld_get_pixel_color(GDISPDriver *g); #endif - #if GDISP_HARDWARE_SCROLL && GDISP_NEED_SCROLL + #if (GDISP_HARDWARE_SCROLL && GDISP_NEED_SCROLL) || defined(__DOXYGEN__) /** * @brief Scroll an area of the screen * @pre GDISP_HARDWARE_SCROLL is TRUE (and the application needs it) @@ -346,7 +346,7 @@ typedef struct GDISPDriver { LLDSPEC void gdisp_lld_vertical_scroll(GDISPDriver *g); #endif - #if GDISP_HARDWARE_CONTROL && GDISP_NEED_CONTROL + #if (GDISP_HARDWARE_CONTROL && GDISP_NEED_CONTROL) || defined(__DOXYGEN__) /** * @brief Control some feature of the hardware * @pre GDISP_HARDWARE_CONTROL is TRUE (and the application needs it) @@ -360,7 +360,7 @@ typedef struct GDISPDriver { LLDSPEC void gdisp_lld_control(GDISPDriver *g); #endif - #if GDISP_HARDWARE_QUERY && GDISP_NEED_QUERY + #if (GDISP_HARDWARE_QUERY && GDISP_NEED_QUERY) || defined(__DOXYGEN__) /** * @brief Query some feature of the hardware * @return The information requested (typecast as void *) @@ -374,7 +374,7 @@ typedef struct GDISPDriver { LLDSPEC void *gdisp_lld_query(GDISPDriver *g); // Uses p.x (=what); #endif - #if GDISP_HARDWARE_CLIP && (GDISP_NEED_CLIP || GDISP_NEED_VALIDATION) + #if (GDISP_HARDWARE_CLIP && (GDISP_NEED_CLIP || GDISP_NEED_VALIDATION)) || defined(__DOXYGEN__) /** * @brief Set the hardware clipping area * @pre GDISP_HARDWARE_CLIP is TRUE (and the application needs it) |