/*
 Author: Obrtac Tomas  
 Mail: obrtac.tomas@gmail.com
 2017
 */

#ifndef I2Ccommands
#define	I2Ccommands

#include <xc.h> // include processor files - each processor file is guarded.  
#define _XTAL_FREQ 20000000
#define BAUD 100 // Desired Baud Rate in kbps
#define FOSC 8000 // Oscillator Clock in kHz


void Setting_I2C();
void Send_I2C_Data(unsigned char databyte);
void Send_I2C_StartBit(void);
void Send_I2C_StopBit(void);
void WaitMSSP();
unsigned int Read_I2C_Data(void);


void Setting_I2C2();
void Send_I2C2_Data(unsigned char databyte);
void Send_I2C2_StartBit(void);
void Send_I2C2_StopBit(void);
void WaitMSSP2();
unsigned int Read_I2C2_Data(void);
void Disable_I2C2();
void Port_I2C2_UP(void);
Enable_I2C2(void);


#endif	/* XC_HEADER_TEMPLATE_H */

