#ifndef __I2C2H__        /* Schutz gegen mehrfaches #include */
#define __I2C2H__

/***********************************************************************
 *      i2c.h
 *      Funktion: Headerdatei fuer das Softwaremodul "i2c_1.c".
 *
*/

#define I2C_CTL_READ	1
#define I2C_CTL_WRITE	0

// <TITLE I2C_2_Init>
// Description:
// Initializes the I2C_1-Interface. The Hardware resourses are shared with the UART.
// Pin P3.0 is used as SDA, Pin P3.1 is used as SCL. External Pull-Up Resistors (2...5 kOhm) are required
// Parameter:
// none
// Result:
// none
u8_t   I2C_2_Init(void);

// <TITLE I2C_2_Start>
// Description:
// Generates Start-Sequence for I2C-Bus.
// Parameter:
// none
// Result:
// none
void    I2C_2_Start(void);

// <TITLE I2C_2_MasterWrite()>
// Description:
// Writes ony Byte to the I2C_1-Bus. 
// Parameter:
// input_byte: Byte that is written to the I2C_Bus.
// Result:
// 0: acknowledge-error
//
// 1: write successful 
u8_t   I2C_2_MasterWrite(u8_t input_byte);

// <TITLE I2C_2_MasterRead()>
// Description:
// Reads ony Byte from the I2C-Bus. 
// Parameter:
// ack: 1 generate no acknowledge 
//
// 0: generate acknowledge
// Result:
// Data from I2C-Bus.
u8_t   I2C_2_MasterRead(u8_t ack);

// <TITLE I2C_2_Stop>
// Description:
// Generates Stop-Sequence for I2C-Bus.
// Parameter:
// none
// Result:
// none
u8_t   I2C_2_Stop(void);


#endif
