//----------------------------------------------------
/**
	\file		atsam4e16e/inc/dbguart.h
	\ingroup	serial
	\ingroup	cortex-m4

	\brief		Funkce pro seriovou komunikaci UART
				<<< CORTEX M4 >>>

	\author		ConTeK s.r.o., Ing. Pavel Bazika
	\version	01.01
	\date		13.03.2009
*/
//----------------------------------------------------

#ifndef _DBGUART_H_
#define _DBGUART_H_

#include <atsam4e16e/inc/uart.h>

//----------------------------------------------------
/**
	\brief	Funkce pro inicializaci komunikacniho automatu

	\param	urt			Struktura kontextu automatu
	\param	port		cislo usartu
	\param	baudrate	rychlost prenosu [Bd]
	\param  dataBits  Pocet datovych bitu CMM_BITS_XXX
	\param	parity		parita CMM_PARITY_xxx
	\param	stopbits	stopbity CMM_STOPBIT_xxx
	\param	mode		mode RS485
	\param	timeout		neni-li prijat znak do xx ticku,
						je predan neuplne zaplneny buffer

	\return	TRUE		inicializace probehla v poradku
			FALSE		chyba
*/
//----------------------------------------------------
bool_t DbgUartInitialize(UARTDESC * const _urt, const UART_SPD _baudRate,
		const DATA_BITS _dataBits, const PARITY_TYPE _parity, const STOP_BITS _stopBits, const UART_MODE _mode, const ticks_t _timeout);


//----------------------------------------------------
/**
	\brief	Funkce pro ukonceni komunikacniho automatu
*/
//----------------------------------------------------
void DbgUartFinalize(UARTDESC * const _urt);


#endif /* _DBGUART_H_ */
