/* ###################################################################
**     This component module is generated by Processor Expert. Do not modify it.
**     Filename    : McuGDisplaySSD1306.h
**     Project     : FRDM-K64F_Generator
**     Processor   : MK64FN1M0VLL12
**     Component   : GDisplay
**     Version     : Component 01.209, Driver 01.00, CPU db: 3.00.000
**     Compiler    : GNU C Compiler
**     Date/Time   : 2022-08-30, 10:39, # CodeGen: 787
**     Abstract    :
**          Graphical display driver for LCD or other displays
**     Settings    :
**          Component name                                 : McuGDisplaySSD1306
**          SDK                                            : McuLib
**          Inverted Pixels                                : no
**          Memory Buffer                                  : Enabled
**            Orientation                                  : Landscape
**          Clear screen on Init                           : no
**          Hardware                                       : 
**            Display                                      : McuSSD1306
**          Watchdog                                       : Disabled
**          RTOS                                           : Disabled
**     Contents    :
**         PutPixel              - void McuGDisplaySSD1306_PutPixel(McuGDisplaySSD1306_PixelDim x,...
**         SetPixel              - void McuGDisplaySSD1306_SetPixel(McuGDisplaySSD1306_PixelDim x,...
**         ClrPixel              - void McuGDisplaySSD1306_ClrPixel(McuGDisplaySSD1306_PixelDim x,...
**         Clear                 - void McuGDisplaySSD1306_Clear(void);
**         DrawBox               - void McuGDisplaySSD1306_DrawBox(McuGDisplaySSD1306_PixelDim x,...
**         DrawFilledBox         - void McuGDisplaySSD1306_DrawFilledBox(McuGDisplaySSD1306_PixelDim x,...
**         DrawHLine             - void McuGDisplaySSD1306_DrawHLine(McuGDisplaySSD1306_PixelDim x,...
**         DrawVLine             - void McuGDisplaySSD1306_DrawVLine(McuGDisplaySSD1306_PixelDim x,...
**         DrawLine              - void McuGDisplaySSD1306_DrawLine(McuGDisplaySSD1306_PixelDim xstart,...
**         DrawCircle            - void McuGDisplaySSD1306_DrawCircle(McuGDisplaySSD1306_PixelDim x0,...
**         DrawFilledCircle      - void McuGDisplaySSD1306_DrawFilledCircle(McuGDisplaySSD1306_PixelDim x0,...
**         DrawBarChart          - void McuGDisplaySSD1306_DrawBarChart(McuGDisplaySSD1306_PixelDim x,...
**         DrawMonoBitmap        - void McuGDisplaySSD1306_DrawMonoBitmap(McuGDisplaySSD1306_PixelDim x,...
**         DrawMonoBitmapMask    - void McuGDisplaySSD1306_DrawMonoBitmapMask(McuGDisplaySSD1306_PixelDim x,...
**         DrawColorBitmap       - void McuGDisplaySSD1306_DrawColorBitmap(McuGDisplaySSD1306_PixelDim x,...
**         Draw65kBitmap         - void McuGDisplaySSD1306_Draw65kBitmap(McuGDisplaySSD1306_PixelDim x1,...
**         Draw256BitmapLow      - void McuGDisplaySSD1306_Draw256BitmapLow(McuGDisplaySSD1306_PixelDim x1,...
**         Draw256BitmapHigh     - void McuGDisplaySSD1306_Draw256BitmapHigh(McuGDisplaySSD1306_PixelDim x1,...
**         UpdateFull            - void McuGDisplaySSD1306_UpdateFull(void);
**         UpdateRegion          - void McuGDisplaySSD1306_UpdateRegion(McuGDisplaySSD1306_PixelDim x,...
**         GetDisplayOrientation - McuGDisplaySSD1306_DisplayOrientation M...
**         SetDisplayOrientation - void McuGDisplaySSD1306_SetDisplayOrien...
**         GetWidth              - McuGDisplaySSD1306_PixelDim McuGDisplaySSD1306_GetWidth(void);
**         GetHeight             - McuGDisplaySSD1306_PixelDim McuGDisplaySSD1306_GetHeight(void);
**         GetLongerSide         - McuGDisplaySSD1306_PixelDim McuGDisplaySSD1306_GetLongerSide(void);
**         GetShorterSide        - McuGDisplaySSD1306_PixelDim McuGDisplaySSD1306_GetShorterSide(void);
**         GetDisplay            - void McuGDisplaySSD1306_GetDisplay(void);
**         GiveDisplay           - void McuGDisplaySSD1306_GiveDisplay(void);
**         Deinit                - void McuGDisplaySSD1306_Deinit(void);
**         Init                  - void McuGDisplaySSD1306_Init(void);
**
** * Copyright (c) 2013-2022, Erich Styger
**  * Web:         https://mcuoneclipse.com
**  * SourceForge: https://sourceforge.net/projects/mcuoneclipse
**  * Git:         https://github.com/ErichStyger/McuOnEclipse_PEx
**  * All rights reserved.
**  *
**  * Redistribution and use in source and binary forms, with or without modification,
**  * are permitted provided that the following conditions are met:
**  *
**  * - Redistributions of source code must retain the above copyright notice, this list
**  *   of conditions and the following disclaimer.
**  *
**  * - Redistributions in binary form must reproduce the above copyright notice, this
**  *   list of conditions and the following disclaimer in the documentation and/or
**  *   other materials provided with the distribution.
**  *
**  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
**  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
**  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
**  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
**  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
**  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
**  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
**  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
**  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
**  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
** ###################################################################*/
/*!
** @file McuGDisplaySSD1306.h
** @version 01.00
** @brief
**          Graphical display driver for LCD or other displays
*/         
/*!
**  @addtogroup McuGDisplaySSD1306_module McuGDisplaySSD1306 module documentation
**  @{
*/         

#ifndef __McuGDisplaySSD1306_H
#define __McuGDisplaySSD1306_H

/* MODULE McuGDisplaySSD1306. */
#include "McuLib.h" /* SDK and API used */
#include "McuGDisplaySSD1306config.h" /* configuration */

#ifdef __cplusplus
extern "C" {
#endif

#ifndef _TIMAGE_IS_DEFINED
  #define _TIMAGE_IS_DEFINED
  /* this type is declared in PE_Types.h for non-LDD processors, need to declare it locally otherwise */
  typedef struct {                         /* Image */
    uint16_t width;                        /* Image width  */
    uint16_t height;                       /* Image height */
    const uint8_t *pixmap;                 /* Image pixel bitmap */
    uint16_t size;                         /* Image size   */
    const char *name;                      /* Image name   */
  } TIMAGE;
  typedef TIMAGE* PIMAGE ;                 /* Pointer to image */
#endif /* _TIMAGE_IS_DEFINED */

#include "McuSSD1306.h"

#define McuGDisplaySSD1306_RGB565(R,G,B)     ((McuGDisplaySSD1306_PixelColor)((((R)&0x1f)<<11)+(((G)&0x3f)<<5)+((B)&0x1f))) /* convert RGB into 565 color format */

#define McuGDisplaySSD1306_COLOR_PIXEL_SET          McuSSD1306_COLOR_PIXEL_SET       /* value for a pixel set */
#define McuGDisplaySSD1306_COLOR_PIXEL_CLR          McuSSD1306_COLOR_PIXEL_CLR       /* value for a pixel cleared */
#if McuGDisplaySSD1306_CONFIG_INVERTED_PIXEL_COLOR
  #define McuGDisplaySSD1306_COLOR_BLACK              McuSSD1306_COLOR_WHITE           /* white color */
  #define McuGDisplaySSD1306_COLOR_WHITE              McuSSD1306_COLOR_BLACK           /* black color */
  #define McuGDisplaySSD1306_COLOR_RED                (~McuSSD1306_COLOR_RED)          /* red color */
  #define McuGDisplaySSD1306_COLOR_BRIGHT_RED         (~McuSSD1306_COLOR_BRIGHT_RED)   /* bright red color */
  #define McuGDisplaySSD1306_COLOR_DARK_RED           (~McuSSD1306_COLOR_DARK_RED)     /* dark red color */
  #define McuGDisplaySSD1306_COLOR_GREEN              (~McuSSD1306_COLOR_GREEN)        /* green color */
  #define McuGDisplaySSD1306_COLOR_DARK_GREEN         (~McuSSD1306_COLOR_DARK_GREEN)   /* dark green color */
  #define McuGDisplaySSD1306_COLOR_BRIGHT_GREEN       (~McuSSD1306_COLOR_BRIGHT_GREEN) /* bright green color */
  #define McuGDisplaySSD1306_COLOR_BLUE               (~McuSSD1306_COLOR_BLUE)         /* blue color */
  #define McuGDisplaySSD1306_COLOR_BRIGHT_BLUE        (~McuSSD1306_COLOR_BRIGHT_BLUE)  /* bright blue color */
  #define McuGDisplaySSD1306_COLOR_DARK_BLUE          (~McuSSD1306_COLOR_DARK_BLUE)    /* dark blue color */
  #define McuGDisplaySSD1306_COLOR_YELLOW             (~McuSSD1306_COLOR_YELLOW)       /* yellow color */
  #define McuGDisplaySSD1306_COLOR_BRIGHT_YELLOW      (~McuSSD1306_COLOR_BRIGHT_YELLOW)/* bright yellow color */
  #define McuGDisplaySSD1306_COLOR_ORANGE             (~McuSSD1306_COLOR_ORANGE)       /* orange color */
  #define McuGDisplaySSD1306_COLOR_GREY               (~McuSSD1306_COLOR_GREY)         /* grey color */
  #define McuGDisplaySSD1306_COLOR_BRIGHT_GREY        (~McuSSD1306_COLOR_BRIGHT_GREY)  /* bright grey color */
#else
  #define McuGDisplaySSD1306_COLOR_BLACK              McuSSD1306_COLOR_BLACK           /* black color */
  #define McuGDisplaySSD1306_COLOR_WHITE              McuSSD1306_COLOR_WHITE           /* white color */
  #define McuGDisplaySSD1306_COLOR_RED                McuSSD1306_COLOR_RED             /* red color */
  #define McuGDisplaySSD1306_COLOR_BRIGHT_RED         McuSSD1306_COLOR_BRIGHT_RED      /* bright red color */
  #define McuGDisplaySSD1306_COLOR_DARK_RED           McuSSD1306_COLOR_DARK_RED        /* dark red color */
  #define McuGDisplaySSD1306_COLOR_GREEN              McuSSD1306_COLOR_GREEN           /* green color */
  #define McuGDisplaySSD1306_COLOR_DARK_GREEN         McuSSD1306_COLOR_DARK_GREEN      /* dark green color */
  #define McuGDisplaySSD1306_COLOR_BRIGHT_GREEN       McuSSD1306_COLOR_BRIGHT_GREEN    /* bright green color */
  #define McuGDisplaySSD1306_COLOR_BLUE               McuSSD1306_COLOR_BLUE            /* blue color */
  #define McuGDisplaySSD1306_COLOR_BRIGHT_BLUE        McuSSD1306_COLOR_BRIGHT_BLUE     /* bright blue color */
  #define McuGDisplaySSD1306_COLOR_DARK_BLUE          McuSSD1306_COLOR_DARK_BLUE       /* dark blue color */
  #define McuGDisplaySSD1306_COLOR_YELLOW             McuSSD1306_COLOR_YELLOW          /* yellow color */
  #define McuGDisplaySSD1306_COLOR_BRIGHT_YELLOW      McuSSD1306_COLOR_BRIGHT_YELLOW   /* bright yellow color */
  #define McuGDisplaySSD1306_COLOR_ORANGE             McuSSD1306_COLOR_ORANGE          /* orange color */
  #define McuGDisplaySSD1306_COLOR_GREY               McuSSD1306_COLOR_GREY            /* grey color */
  #define McuGDisplaySSD1306_COLOR_BRIGHT_GREY        McuSSD1306_COLOR_BRIGHT_GREY     /* bright grey color */
#endif

typedef McuSSD1306_PixelDim   McuGDisplaySSD1306_PixelDim; /* Display specific type for a pixel coordinate. */
typedef McuSSD1306_PixelColor McuGDisplaySSD1306_PixelColor; /* Display specific color type. */
typedef McuSSD1306_PixelCount McuGDisplaySSD1306_PixelCount; /* Type able to hold the number of pixels for the display. */

/* wrappers for the low level display orientation enumeration and type */
typedef McuSSD1306_DisplayOrientation McuGDisplaySSD1306_DisplayOrientation;
#define McuGDisplaySSD1306_ORIENTATION_PORTRAIT     McuSSD1306_ORIENTATION_PORTRAIT
#define McuGDisplaySSD1306_ORIENTATION_PORTRAIT180  McuSSD1306_ORIENTATION_PORTRAIT180
#define McuGDisplaySSD1306_ORIENTATION_LANDSCAPE    McuSSD1306_ORIENTATION_LANDSCAPE
#define McuGDisplaySSD1306_ORIENTATION_LANDSCAPE180 McuSSD1306_ORIENTATION_LANDSCAPE180

/* using Memory Buffer */
/* Landscape */

#define McuGDisplaySSD1306_BUF_BYTE(x,y)  /* how to access a byte in the display buf[][] */ \
  /* one bit per pixel */\
      McuSSD1306_DisplayBuf[(y)/8][x]
#if McuGDisplaySSD1306_CONFIG_NOF_BITS_PER_PIXEL==1
  #define McuGDisplaySSD1306_BUF_BYTE_PIXEL_BIT_NO(x,y) /* pixel bit number inside display buffer byte (0 is LSB, 7 MSB) */ \
      ((uint8_t)((y)%8))
#endif

#if McuGDisplaySSD1306_CONFIG_NOF_BITS_PER_PIXEL==1
  #define McuGDisplaySSD1306_BUF_BYTE_PIXEL_MASK(x,y)  /* pixel mask for an individual bit inside a display buffer byte */ \
    (1<<McuGDisplaySSD1306_BUF_BYTE_PIXEL_BIT_NO(x,y))
  #define McuGDisplaySSD1306_BUF_BYTE_GET_PIXEL(x,y)  /* extract a pixel */ \
    ((McuGDisplaySSD1306_BUF_BYTE(x,y)&McuGDisplaySSD1306_BUF_BYTE_PIXEL_MASK(x,y))>>McuGDisplaySSD1306_BUF_BYTE_PIXEL_BIT_NO(x,y))
#elif McuGDisplaySSD1306_CONFIG_NOF_BITS_PER_PIXEL==8
  #define McuGDisplaySSD1306_BUF_BYTE_PIXEL_MASK(x,y)  /* pixel mask for an individual bit inside a display buffer byte */ \
    0xff
  #define McuGDisplaySSD1306_BUF_BYTE_GET_PIXEL(x,y)  /* extract a pixel */ \
    McuGDisplaySSD1306_BUF_BYTE(x,y)
#elif McuGDisplaySSD1306_CONFIG_NOF_BITS_PER_PIXEL==16
  /* no byte access used */
#elif McuGDisplaySSD1306_CONFIG_NOF_BITS_PER_PIXEL==24
  /* Neopixels, no byte access used */
#else
  #error "not supported"
#endif

void McuGDisplaySSD1306_Clear(void);
/*
** ===================================================================
**     Method      :  Clear (component GDisplay)
**
**     Description :
**         Clears the display buffer.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_SetPixel(McuGDisplaySSD1306_PixelDim x, McuGDisplaySSD1306_PixelDim y);
/*
** ===================================================================
**     Method      :  SetPixel (component GDisplay)
**
**     Description :
**         Sets a pixel in the display buffer
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - Pixel x position
**         y               - Pixel y position
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_ClrPixel(McuGDisplaySSD1306_PixelDim x, McuGDisplaySSD1306_PixelDim y);
/*
** ===================================================================
**     Method      :  ClrPixel (component GDisplay)
**
**     Description :
**         Clears a single pixel in the display.
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - Pixel x position.
**         y               - Pixel y position.
**     Returns     : Nothing
** ===================================================================
*/

#define McuGDisplaySSD1306_UpdateFull()   McuSSD1306_UpdateFull()
/*
** ===================================================================
**     Method      :  UpdateFull (component GDisplay)
**
**     Description :
**         Updates the image on the display. This is needed in case the
**         display requires a periodic refresh. For display using
**         windowing, this function may be implemented as dummy stub,
**         as the display content already is written.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_DrawFilledBox(McuGDisplaySSD1306_PixelDim x, McuGDisplaySSD1306_PixelDim y, McuGDisplaySSD1306_PixelDim width, McuGDisplaySSD1306_PixelDim height, McuGDisplaySSD1306_PixelColor color);
/*
** ===================================================================
**     Method      :  DrawFilledBox (component GDisplay)
**
**     Description :
**         Draws a rectangle box (filled)
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - x left upper coordinate
**         y               - y left upper coordinate
**         width           - Width in pixels
**         height          - Height in pixels
**         color           - color to be used to fill the box.
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_PutPixel(McuGDisplaySSD1306_PixelDim x, McuGDisplaySSD1306_PixelDim y, McuGDisplaySSD1306_PixelColor color);
/*
** ===================================================================
**     Method      :  PutPixel (component GDisplay)
**
**     Description :
**         
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - x coordinate
**         y               - y coordinate
**         color           - color to be used for the pixel
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_DrawBox(McuGDisplaySSD1306_PixelDim x, McuGDisplaySSD1306_PixelDim y, McuGDisplaySSD1306_PixelDim width, McuGDisplaySSD1306_PixelDim height, McuGDisplaySSD1306_PixelDim lineWidth, McuGDisplaySSD1306_PixelColor color);
/*
** ===================================================================
**     Method      :  DrawBox (component GDisplay)
**
**     Description :
**         Draws a rectangle line box
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - x left upper coordinate
**         y               - y left upper coordinate
**         width           - width in pixels
**         height          - height in pixels
**         lineWidth       - width of the line
**         color           - color for the box
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_DrawMonoBitmap(McuGDisplaySSD1306_PixelDim x, McuGDisplaySSD1306_PixelDim y, PIMAGE image, McuGDisplaySSD1306_PixelColor pixelColor, McuGDisplaySSD1306_PixelColor backgroundColor);
/*
** ===================================================================
**     Method      :  DrawMonoBitmap (component GDisplay)
**
**     Description :
**         Draws a B/W bitmap.
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - x position of left upper corner
**         y               - y position of left upper corner
**         image           - Pointer to image structure and
**                           information.
**         pixelColor      - Color to be used for pixels
**                           (pixel set)
**         backgroundColor - Color to be used
**                           for background (pixel not set)
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_DrawHLine(McuGDisplaySSD1306_PixelDim x, McuGDisplaySSD1306_PixelDim y, McuGDisplaySSD1306_PixelDim length, McuGDisplaySSD1306_PixelColor color);
/*
** ===================================================================
**     Method      :  DrawHLine (component GDisplay)
**
**     Description :
**         Draws a horizontal line
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - x left upper coordinate
**         y               - y left upper coordinate
**         length          - Length of line in pixels
**         color           - color to be used to fill the box.
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_DrawVLine(McuGDisplaySSD1306_PixelDim x, McuGDisplaySSD1306_PixelDim y, McuGDisplaySSD1306_PixelDim length, McuGDisplaySSD1306_PixelColor color);
/*
** ===================================================================
**     Method      :  DrawVLine (component GDisplay)
**
**     Description :
**         Draws a vertical line
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - x left upper coordinate
**         y               - y left upper coordinate
**         length          - Length of line in pixels
**         color           - color to be used to fill the box.
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_DrawBarChart(McuGDisplaySSD1306_PixelDim x, McuGDisplaySSD1306_PixelDim y, McuGDisplaySSD1306_PixelDim width, McuGDisplaySSD1306_PixelDim height, uint8_t *data, uint8_t nofData, McuGDisplaySSD1306_PixelColor barColor, uint8_t borderWidth, McuGDisplaySSD1306_PixelColor borderColor, uint8_t borderSpace);
/*
** ===================================================================
**     Method      :  DrawBarChart (component GDisplay)
**
**     Description :
**         Draws a series of bars for a chart
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - upper left corner x coordinate
**         y               - upper left corner y coordinate
**         width           - Chart box width
**         height          - Chart box height
**       * data            - Pointer to data (series of % values
**                           from 0...100%)
**         nofData         - number of data bytes
**         barColor        - Color to be used for the bars.
**         borderWidth     - width of a border to be
**                           draw. Pass zero if there shall be no border.
**         borderColor     - Color to be used for the
**                           border (if borderWidth is not zero)
**         borderSpace     - Space to be used in pixels
**                           between border and bars.
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_DrawColorBitmap(McuGDisplaySSD1306_PixelDim x, McuGDisplaySSD1306_PixelDim y, PIMAGE image);
/*
** ===================================================================
**     Method      :  DrawColorBitmap (component GDisplay)
**
**     Description :
**         Draws a color bitmap. Pixel data is in 3-3-2 RGB format.
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - x position of left upper corner
**         y               - y position of left upper corner
**         image           - Pointer to image structure and
**                           information.
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_DrawLine(McuGDisplaySSD1306_PixelDim xstart, McuGDisplaySSD1306_PixelDim ystart, McuGDisplaySSD1306_PixelDim xend, McuGDisplaySSD1306_PixelDim yend, McuGDisplaySSD1306_PixelColor color);
/*
** ===================================================================
**     Method      :  DrawLine (component GDisplay)
**
**     Description :
**         Draws a line using the Bresenham method
**     Parameters  :
**         NAME            - DESCRIPTION
**         xstart          - x start coordinate
**         ystart          - y start coordinate
**         xend            - x end coordinate
**         yend            - y end coordinate
**         color           - color to be used for the line
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_DrawCircle(McuGDisplaySSD1306_PixelDim x0, McuGDisplaySSD1306_PixelDim y0, McuGDisplaySSD1306_PixelDim radius, McuGDisplaySSD1306_PixelColor color);
/*
** ===================================================================
**     Method      :  DrawCircle (component GDisplay)
**
**     Description :
**         Draws a circle using the Bresenham method
**     Parameters  :
**         NAME            - DESCRIPTION
**         x0              - x start coordinate
**         y0              - y start coordinate
**         radius          - Radius of the circle
**         color           - color to be used for the line
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_Draw65kBitmap(McuGDisplaySSD1306_PixelDim x1, McuGDisplaySSD1306_PixelDim y1, McuGDisplaySSD1306_PixelDim x2, McuGDisplaySSD1306_PixelDim y2, uint16_t *bmp, bool compressed);
/*
** ===================================================================
**     Method      :  Draw65kBitmap (component GDisplay)
**
**     Description :
**         Draws a 65k color bitmap (compressed or uncompressed)
**     Parameters  :
**         NAME            - DESCRIPTION
**         x1              - left upper starting corner
**         y1              - left upper starting corner
**         x2              - right lower corner
**         y2              - right lower corner
**       * bmp             - Pointer to bitmap
**         compressed      - 
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_Draw256BitmapLow(McuGDisplaySSD1306_PixelDim x1, McuGDisplaySSD1306_PixelDim y1, McuGDisplaySSD1306_PixelDim x2, McuGDisplaySSD1306_PixelDim y2, uint8_t *bmp, bool compressed);
/*
** ===================================================================
**     Method      :  Draw256BitmapLow (component GDisplay)
**
**     Description :
**         Draws a 256 color bitmap (compressed or uncompressed)
**     Parameters  :
**         NAME            - DESCRIPTION
**         x1              - left upper starting corner
**         y1              - left upper starting corner
**         x2              - right lower corner
**         y2              - right lower corner
**       * bmp             - Pointer to bitmap
**         compressed      - 
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_Draw256BitmapHigh(McuGDisplaySSD1306_PixelDim x1, McuGDisplaySSD1306_PixelDim y1, McuGDisplaySSD1306_PixelDim x2, McuGDisplaySSD1306_PixelDim y2, uint8_t *bmp, McuGDisplaySSD1306_PixelColor *ColorTable, bool compressed);
/*
** ===================================================================
**     Method      :  Draw256BitmapHigh (component GDisplay)
**
**     Description :
**         Draws a 256 color bitmap (compressed or uncompressed) with a
**         color table.
**     Parameters  :
**         NAME            - DESCRIPTION
**         x1              - left upper starting corner
**         y1              - left upper starting corner
**         x2              - right lower corner
**         y2              - right lower corner
**       * bmp             - Pointer to bitmap
**       * ColorTable      - Pointer to array of colors
**                           (color table)
**         compressed      - 
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_UpdateRegion(McuGDisplaySSD1306_PixelDim x, McuGDisplaySSD1306_PixelDim y, McuGDisplaySSD1306_PixelDim w, McuGDisplaySSD1306_PixelDim h);
/*
** ===================================================================
**     Method      :  UpdateRegion (component GDisplay)
**
**     Description :
**         Update a region of the display.
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - x coordinate
**         y               - y coordinate
**         w               - Width of the update region
**         h               - height of the update region
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_DrawFilledCircle(McuGDisplaySSD1306_PixelDim x0, McuGDisplaySSD1306_PixelDim y0, McuGDisplaySSD1306_PixelDim radius, McuGDisplaySSD1306_PixelColor color);
/*
** ===================================================================
**     Method      :  DrawFilledCircle (component GDisplay)
**
**     Description :
**         Draws a circle using the Bresenham method
**     Parameters  :
**         NAME            - DESCRIPTION
**         x0              - x start coordinate
**         y0              - y start coordinate
**         radius          - Radius of the circle
**         color           - fill color to be used
**     Returns     : Nothing
** ===================================================================
*/

#define McuGDisplaySSD1306_GetDisplayOrientation McuSSD1306_GetDisplayOrientation
/*
** ===================================================================
**     Method      :  GetDisplayOrientation (component GDisplay)
**
**     Description :
**         Returns the current display orientation
**     Parameters  : None
**     Returns     :
**         ---             - current display orientation
** ===================================================================
*/

#define McuGDisplaySSD1306_SetDisplayOrientation McuSSD1306_SetDisplayOrientation
/*
** ===================================================================
**     Method      :  SetDisplayOrientation (component GDisplay)
**
**     Description :
**         Sets the display orientation. If you enable this method,
**         then the orientation of the display can be changed at
**         runtime. However, this requires additional resources.
**     Parameters  :
**         NAME            - DESCRIPTION
**         newOrientation  - new orientation to
**                           be used
**     Returns     : Nothing
** ===================================================================
*/

#define McuGDisplaySSD1306_GetWidth McuSSD1306_GetWidth
/*
** ===================================================================
**     Method      :  GetWidth (component GDisplay)
**
**     Description :
**         Returns the width of the display in pixels (in x direction)
**     Parameters  : None
**     Returns     :
**         ---             - pixel count
** ===================================================================
*/

#define McuGDisplaySSD1306_GetHeight McuSSD1306_GetHeight
/*
** ===================================================================
**     Method      :  GetHeight (component GDisplay)
**
**     Description :
**         Returns the height of the display in pixels (in y direction)
**     Parameters  : None
**     Returns     :
**         ---             - pixel count
** ===================================================================
*/

#define McuGDisplaySSD1306_GetLongerSide McuSSD1306_GetLongerSide
/*
** ===================================================================
**     Method      :  GetLongerSide (component GDisplay)
**
**     Description :
**         Returns the size of the longer side of the display
**     Parameters  : None
**     Returns     :
**         ---             - Error code
** ===================================================================
*/

#define McuGDisplaySSD1306_GetShorterSide McuSSD1306_GetShorterSide
/*
** ===================================================================
**     Method      :  GetShorterSide (component GDisplay)
**
**     Description :
**         Returns the size of the shorter side of the display
**     Parameters  : None
**     Returns     :
**         ---             - Error code
** ===================================================================
*/

void McuGDisplaySSD1306_GetDisplay(void);
/*
** ===================================================================
**     Method      :  GetDisplay (component GDisplay)
**
**     Description :
**         Method used to reserve the display (for mutual exclusive
**         access)
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_GiveDisplay(void);
/*
** ===================================================================
**     Method      :  GiveDisplay (component GDisplay)
**
**     Description :
**         Returns the display after having it reserved with
**         GetDisplay()
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_Init(void);
/*
** ===================================================================
**     Method      :  Init (component GDisplay)
**
**     Description :
**         Driver initialization
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_Deinit(void);
/*
** ===================================================================
**     Method      :  Deinit (component GDisplay)
**
**     Description :
**         Driver de-initialization
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/

void McuGDisplaySSD1306_DrawMonoBitmapMask(McuGDisplaySSD1306_PixelDim x, McuGDisplaySSD1306_PixelDim y, PIMAGE image, McuGDisplaySSD1306_PixelColor pixelColor);
/*
** ===================================================================
**     Method      :  DrawMonoBitmapMask (component GDisplay)
**
**     Description :
**         Draws a B/W bitmap, but only the pixels which are set
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - x position of left upper corner
**         y               - y position of left upper corner
**         image           - Pointer to image structure and
**                           information.
**         pixelColor      - Color to be used for pixels
**                           (pixel set)
**     Returns     : Nothing
** ===================================================================
*/

/* END McuGDisplaySSD1306. */

#ifdef __cplusplus
}
#endif

#endif
/* ifndef __McuGDisplaySSD1306_H */
/*!
** @}
*/
