/*******************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only
* intended for use with Renesas products. No other uses are authorized. This
* software is owned by Renesas Electronics Corporation and is protected under
* all applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software
* and to discontinue the availability of this software. By using this software,
* you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer *
* Copyright (C) 2014 Renesas Electronics Corporation
* and Renesas Solutions Corp. All rights reserved.
*******************************************************************************/
/*******************************************************************************
* File Name    : r_sci_iic_apl.h
* Version      : 1.00
* Device(s)    : Renesas
* Tool-Chain   : Renesas
* OS           : None
* H/W Platform : Independent
* Description  : This is simpleIIC application header file.
******************************************************************************/
/*****************************************************************************
* History : DD.MM.YYYY Version Description
*         : 01.09.2014 1.00    First Release
******************************************************************************/
#ifndef _R_SCI_IIC_APL_H_
#define _R_SCI_IIC_APL_H_

#ifndef SCI_IIC_INITIAL
#define SCI_IIC_EXTERN extern
#else
#define SCI_IIC_EXTERN
#endif

/*******************************************************************************
Includes   <System Includes> , "Project Includes"
*******************************************************************************/

/******************************************************************************
Macro definitions
******************************************************************************/
#define SCI_IIC_CH_NUM    6

/*******************************************************************************
Typedef definitions
*******************************************************************************/
typedef struct
{
    uint8_t   p_slv_adr;    /* Slave address           */
    uint8_t   p_sub_adr;    /* Sub address             */
    uint8_t*  p_data;       /* Pointer for Data buffer */
    uint8_t   cnt;          /* Data Counter            */
} simple_iic_info_t;

typedef enum /* error codes */
{
    SIMPLE_IIC_SUCCESS = 0U,
    SIMPLE_IIC_ERR
} simple_iic_return_t;

/******************************************************************************
Exported global variables
******************************************************************************/

/******************************************************************************
Exported global functions (to be accessed by other files)
******************************************************************************/
SCI_IIC_EXTERN void R_simple_iic_init( void );
SCI_IIC_EXTERN simple_iic_return_t R_simple_iic_write( simple_iic_info_t* info );
SCI_IIC_EXTERN simple_iic_return_t R_simple_iic_read( simple_iic_info_t* info );

#endif /* _R_SCI_APL_H_ */
/******************************************************************************
End  Of File
******************************************************************************/
