/* Set the x and y coordinate of the next pixel to draw.  */
EMSTATUS setPixelAddress(uint16_t x, uint16_t y)
/* Set the x and y coordinate of the next pixel to draw.  */
EMSTATUS setPixelAddress(uint16_t x, uint16_t y)
{
  if (x > dimensions.clipWidth || y > dimensions.clipHeight)
  {
    return DMD_ERROR_PIXEL_OUT_OF_BOUNDS;
  }
  DMDIF_writeReg(DMD_SSD2119_SET_X_ADDRESS_COUNTER,
                 x + dimensions.xClipStart);
  DMDIF_writeReg(DMD_SSD2119_SET_Y_ADDRESS_COUNTER,
                 y + dimensions.yClipStart);
  return DMD_OK;
}