<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<CLIP CATEGORY="Grove" FILE="Grove/Grove 128x64 OLED display.pdsclip" DESC="Grove 128x64 OLED display Module" FAMILY="ARDUINO">
   <PERIPHERAL TYPE="Grove 128x64 OLED display" ELEMENT="LCD1" >
     <!-- Hardware Interface -->
     <INTERFACE OBJECT="GFX_Display&lt;Grove_SSD1308&gt;">
       <PORT NAME="I2C"/>
       <SETUP NAME="begin">
         <!-- I2C ADDRESS SELECTION -->
         <PROPERTY NAME="STATE" ELEMENT="JP1" TYPE="INTEGER"/>
       </SETUP>
        <CONFIG>
          <!-- JUMPERS DETERMINE I2C ADDRESS -->
          <PROPERTY NAME="STATE" ALIAS="JP1" ELEMENT="JP1" TYPE="JUMPERSTATE"/>
        </CONFIG>
     </INTERFACE>
   
     <!-- Firmware Driver -->
     <DRIVER HEADER="GFX_Display.h" RAM="1024">
       <REQUIRE HEADER="Core.h"/>
       <REQUIRE HEADER="SPI.h"/>
       <REQUIRE HEADER="Wire.h"/>

       <ENUMERATION NAME="COLOUR">
         <CONSTANT NAME="BLACK"   VALUE="0"/>
         <CONSTANT NAME="WHITE"   VALUE="1"/>
         <CONSTANT NAME="INVERSE" VALUE="2"/>
       </ENUMERATION>

       <!-- Methods -->
       <!-- Scrolling -->
       <METHOD NAME="writeCommand" DESC="Write a command.">
         <PARAMETER NAME="command" TYPE="INTEGER" DESC="Supported command to SSD1308 controller."/>
       </METHOD>
       <METHOD NAME="writeData" DESC="Write data.">
         <PARAMETER NAME="data" TYPE="INTEGER" DESC="Data to be written in the SSD1308 GDDRAM."/>
       </METHOD>
       <METHOD NAME="clearDisplay" DESC="Clear display.">
       </METHOD>
       <METHOD NAME="invertDisplay" DESC="Invert display (Black on White or White on Black).">
         <PARAMETER NAME="invert" TYPE="BOOLEAN" DEFAULT="TRUE" DESC="Invert TRUE/FALSE."/>
       </METHOD>
       <METHOD NAME="display" DESC="Display screen.">
       </METHOD>
       <METHOD NAME="startScrollRight" DESC="Activate Right Scroll rows from start to stop.">
         <PARAMETER NAME="start" TYPE="INTEGER" DEFAULT="0"  DESC="Start row."/>
         <PARAMETER NAME="stop"  TYPE="INTEGER" DEFAULT="15" DESC="Stop row."/>
       </METHOD>
       <METHOD NAME="startScrollLeft" DESC="Activate Left Scroll rows from start to stop.">
         <PARAMETER NAME="start" TYPE="INTEGER" DEFAULT="0"  DESC="Start row."/>
         <PARAMETER NAME="stop"  TYPE="INTEGER" DEFAULT="15" DESC="Stop row."/>
       </METHOD>
       <METHOD NAME="startScrollDiagRight" DESC="Activate Diagonal Right Scroll rows from start to stop.">
         <PARAMETER NAME="start" TYPE="INTEGER" DEFAULT="0"  DESC="Start row."/>
         <PARAMETER NAME="stop"  TYPE="INTEGER" DEFAULT="7" DESC="Stop row."/>
       </METHOD>
       <METHOD NAME="startScrollDiagLeft" DESC="Activate Diagonal Left Scroll rows from start to stop.">
         <PARAMETER NAME="start" TYPE="INTEGER" DEFAULT="0"  DESC="Start row."/>
         <PARAMETER NAME="stop"  TYPE="INTEGER" DEFAULT="7" DESC="Stop row."/>
       </METHOD>
       <METHOD NAME="stopScroll" DESC="Deactivate scroll mode.">
       </METHOD>
       
       <!-- Graphics -->
       <METHOD NAME="fillScreen"  DESC="Clear the screen to black.">
         <PARAMETER NAME="colour" TYPE="COLOUR" DESC="Colour to fill screen with." DEFAULT="BLACK"/>
       </METHOD>
       <METHOD NAME="drawPixel" DESC="Draw a single pixel">
         <PARAMETER NAME="x" TYPE="INTEGER" DESC="X coordinate of pixel"/>
         <PARAMETER NAME="y" TYPE="INTEGER" DESC="Y coordinate of pixel"/>
         <PARAMETER NAME="colour" TYPE="COLOUR" DESC="Colour to fill with." DEFAULT="WHITE"/>
       </METHOD>
       <METHOD NAME="drawLine" DESC="Draw a line.">
         <PARAMETER NAME="x1" TYPE="INTEGER" DESC="x-coord of line start"/>
         <PARAMETER NAME="y1" TYPE="INTEGER" DESC="y-coord of line start"/>
         <PARAMETER NAME="x2" TYPE="INTEGER" DESC="x-coord of line end"/>
         <PARAMETER NAME="y2" TYPE="INTEGER" DESC="y-coord of line end"/>
         <PARAMETER NAME="colour" TYPE="COLOUR" DESC="Colour to draw with" DEFAULT="WHITE"/>
       </METHOD>
       <METHOD NAME="drawRect" DESC="Draw a rectangle.">
         <PARAMETER NAME="x" TYPE="INTEGER" DESC="Left edge of rectangle"/>
         <PARAMETER NAME="y" TYPE="INTEGER" DESC="Right edge of rectangle"/>
         <PARAMETER NAME="width" TYPE="INTEGER" DESC="Width of rectangle"/>
         <PARAMETER NAME="height" TYPE="INTEGER" DESC="Height of rectangle"/>
         <PARAMETER NAME="colour" TYPE="COLOUR" DESC="Colour to fill with." DEFAULT="WHITE"/>
       </METHOD>
       <METHOD NAME="fillRect" DESC="Fill a rectangle.">
         <PARAMETER NAME="x" TYPE="INTEGER" DESC="Left edge of rectangle"/>
         <PARAMETER NAME="y" TYPE="INTEGER" DESC="Right edge of rectangle"/>
         <PARAMETER NAME="width" TYPE="INTEGER" DESC="Width of rectangle"/>
         <PARAMETER NAME="height" TYPE="INTEGER" DESC="Height of rectangle"/>
         <PARAMETER NAME="colour" TYPE="COLOUR" DESC="Colour to fill with." DEFAULT="WHITE"/>
       </METHOD>
       <METHOD NAME="drawCircle" DESC="Draw a circle.">
         <PARAMETER NAME="centreX" TYPE="INTEGER" DESC="x-coord of centre"/>
         <PARAMETER NAME="centreY" TYPE="INTEGER" DESC="y-coord of centre"/>
         <PARAMETER NAME="radius" TYPE="INTEGER" DESC="Radius of circle"/>
         <PARAMETER NAME="colour" TYPE="COLOUR" DESC="Colour to draw with." DEFAULT="WHITE"/>
       </METHOD>
       <METHOD NAME="fillCircle" DESC="Fill a circle.">
         <PARAMETER NAME="centreX" TYPE="INTEGER" DESC="x-coord of centre"/>
         <PARAMETER NAME="centreY" TYPE="INTEGER" DESC="y-coord of centre"/>
         <PARAMETER NAME="radius" TYPE="INTEGER" DESC="Radius of circle"/>
         <PARAMETER NAME="colour" TYPE="COLOUR" DESC="Colour to draw with." DEFAULT="WHITE"/>
       </METHOD>

       <!-- Print Functions -->
       <METHOD NAME="print" DESC="Write text to the display.">
          <PARAMETER TYPE="LIST" DESC="List of numbers or strings to print."/>
       </METHOD>
       <METHOD NAME="println" DESC="Write text, then move text cursor to new line.">
          <PARAMETER TYPE="LIST" DESC="List of numbers or strings to print."/>
       </METHOD>
       <METHOD NAME="setBase" DESC="Set the base to use for integer values.">
          <PARAMETER NAME="base" TYPE="BASE" DESC="Number base"/>
       </METHOD>
       <METHOD NAME="setPlaces" DESC="Set the number of places to use for floating point values.">
          <PARAMETER NAME="places" TYPE="INTEGER" DEFAULT="2" DESC="Number of decimal places"/>
       </METHOD>

       <!-- Text -->
       <METHOD NAME="drawChar" DESC="Draw a character.">
         <PARAMETER NAME="x" TYPE="INTEGER" DESC="X coordinate of cursor"/>
         <PARAMETER NAME="y" TYPE="INTEGER" DESC="Y coordinate of cursor"/>
         <PARAMETER NAME="c" TYPE="INTEGER" DESC="Text character"/>
         <PARAMETER NAME="foreground" TYPE="COLOUR" DESC="Foreground colour for text." DEFAULT="WHITE"/>
         <PARAMETER NAME="background" TYPE="COLOUR" DESC="Background colour for text." DEFAULT="WHITE"/>
         <PARAMETER NAME="size" TYPE="INTEGER" DESC="Text font size" DEFAULT="1"/>
       </METHOD>
       <METHOD NAME="setCursor" DESC="Set the position of the text cursor.">
         <PARAMETER NAME="x" TYPE="INTEGER" DESC="X coordinate of cursor"/>
         <PARAMETER NAME="y" TYPE="INTEGER" DESC="Y coordinate of cursor"/>
       </METHOD>
       <METHOD NAME="setTextColor" DESC="Set the foreground text colour.">
         <PARAMETER NAME="colour" TYPE="COLOUR" DESC="Foreground colour for text." DEFAULT="WHITE"/>
       </METHOD>
        <METHOD NAME="setTextBackground" DESC="Set a background colour for text.">
           <PARAMETER NAME="background" TYPE="COLOUR" DESC="Background colour for text." DEFAULT="BLACK"/>
        </METHOD>
        <METHOD NAME="setTextSize" DESC="Set the size of the text.">
         <PARAMETER NAME="size" TYPE="INTEGER" DESC="Text font size" DEFAULT="1"/>
       </METHOD>
       <METHOD NAME="setTextWrap" DESC="Set the size of the text.">
         <PARAMETER NAME="Wrap" TYPE="BOOLEAN" DESC="Text wrapping mode" DEFAULT="TRUE"/>
       </METHOD>
       <METHOD NAME="setRotation" DESC="Set orientation of the display.">
         <PARAMETER NAME="rotation" TYPE="INTEGER" DESC="Rotation value 0-3" DEFAULT="0"/>
       </METHOD>

     </DRIVER>
   </PERIPHERAL>
</CLIP>        



