//----------------------------------------------------
/**
	\file	pccomm.h

	\brief	Knihovna seriove komunikaci
			<<< ALL >>>
			
	\author	ConTeK s.r.o., Jakub Kastner
	\version	01.01
	\date	26.07.2007
*/
//----------------------------------------------------

#ifndef _PC_COMM_H_
#define _PC_COMM_H_

#include "appsets.h"

#ifdef VIRTUART
  #include <vuart.h>
#endif// VIRTUART

#include <uart.h>

#ifndef MSVC
#include <usart.h>
#endif

#include <uclp1a.h>
#include <uclp2a.h>
#include <uctp.h>

#include <modbusL2sl.h>

//-----------------------------------------------------
/**
	\brief	Komunikacni knihovny a buffery
*/
//-----------------------------------------------------

#ifdef VIRTUART
	extern VIRTDESC		urt;		// virtualni uart
	extern VIRTDESC		urtterm;		// fyzicky uart
#else
	extern UARTDESC		urt;		//!< fyzicky uart
	extern UARTDESC		urtterm;		// fyzicky uart
#endif// VIRTUART

extern	MODBUS_CTX	modbusL2;


extern CLP1ADESC	clp1,clp1term;		// linkova vrstva a
extern CLP2ADESC	clp2,clp2term;		// linkova vrstva b
extern CTPDESC		ctp,ctpterm;		// aplikacni vrstva


//-----------------------------------------------------
/**
	\brief	Fast tick komunikace
*/
//-----------------------------------------------------

void PcCommTick(void);


//-----------------------------------------------------
/**
	\brief	Inicializace komunikace
*/
//-----------------------------------------------------

bool_t PcCommInitialize(void);


//-----------------------------------------------------
/**
	\brief	Ukonceni knihovny
*/
//-----------------------------------------------------

void PcCommFinalize(void);


#endif // _PC_COMM_H_
