//#ifndef _TWIS_MASTER	// flo
//#define _TWIS_MASTER	// flo

#include "api.h"
#define TWIM_READ    1
#define TWIM_WRITE   0

// flo
/* Addresses of the TWI-devices */




/* Elements necessary for TWI communication */
#define TWI_MAX_DATA_ELEMENTS 8					// Maximum data elements in one transfer
extern uint8_t twi_data[TWI_MAX_DATA_ELEMENTS];	// Data array
extern uint8_t twi_bytes_to_transceive;			// How much bytes to send/receive.

/* Function-declaration for writing/reading TWI */
void Twim_Write_Data(uint8_t Address, uint8_t twi_bytes_to_transceive, uint8_t twi_data[TWI_MAX_DATA_ELEMENTS]);
void Twim_Read_Data(uint8_t Address, uint8_t twi_bytes_to_transceive, uint8_t twi_data[TWI_MAX_DATA_ELEMENTS]);

void Twim_Mpx_Switch_Channel(uint8_t Channel);



uint8_t Twim_Init (uint32_t TWI_Bitrate);
void Write_to_slave( struct uartStruct *ptr_uartStruct );
void Read_to_slave( struct uartStruct *ptr_uartStruct );
void Twim_Stop (void);
uint8_t Twim_Start (uint8_t Address, uint8_t TWIM_Type);
uint8_t Twim_Write (uint8_t byte);
uint8_t Twim_ReadAck (void);
uint8_t Twim_ReadNack (void);

//#endif	// flo
