/*******************************************************************************
 * (c) Copyright 2010 Actel Corporation.  All rights reserved.
 *
 *  API of sample basic driver for OLED display found on Actel SmartFusion
 *  development boards.
 *  This code is intended as an example of using the SmartFusion I2C driver.
 *
 * SVN $Revision: 2136 $
 * SVN $Date: 2010-02-10 14:59:17 +0000 (Wed, 10 Feb 2010) $
 */
#ifndef OLED_H_
#define OLED_H_

#include "../drivers/mss_i2c/mss_i2c.h"

/***************************************************************************//**
  The following defines can be used as parameter to the OLED_set_cursor()
  function.
 */
#define FIRST_LINE            0
#define SECOND_LINE           1

#define FIRST_CHARACTER       0

/***************************************************************************//**
  The OLED_init function initializes the OLED display.
 */
void OLED_init( void );

/***************************************************************************//**
  The OLED_clear_display function clears the content of the display RAM.
 */
void OLED_clear_display( void );

/***************************************************************************//**
  The OLED_set_cursor function sets the cursor position.
 
  @param line
    The line parameter specifies the line at which to set the cursor. It can
    take the values:
      - FIRST_LINE
      - SECOND_LINE
 
  @param char_offset
    The char_offset paraemter specifies the character offset on a line where to
    set the cursor location. It can be set to FIRST_CHARACTER to set the cursor
    at the start of a line.
 */
void OLED_set_cursor
(
    uint8_t line,
    uint8_t char_offset
);

/***************************************************************************//**
  The OLED_write_string function displays the input string to the OLED panel.
 
  @param string
    The string parameter is a pointer to the zero-terminated to display on the
    OLED.
 */
void OLED_write_string( const char *string);


/***************************************************************************//**
  The OLED_write_char function displays a single character to the display.
 
  @param data_char
    The data_char parameter is the ASCII code of the character to display.
*/
void OLED_write_char( const uint8_t data_char );

#endif
