/*
 * conf_uart.h
 *
 * Created: 27.2.2016 12:42:42
 *  Author: Chenda
 */ 


#ifndef CONF_UART_H_
#define CONF_UART_H_

#include "../DebugSettings.h"
#include "../DeviceAddresses.h"

/* UART0 configuration  */
#define DEF_UART0_ADD			DEV_ADD_PS1			// Address
#define DEF_UART0_BAUD_RATE		9600				// baud rate
#define DEF_UART0_RX_TOUT		100					// Communications timeouts [ms] range (2;520)ms
#ifdef TERMINAL_DEBUG
	#define DEF_UART0_RX_MSG_TOUT	100					// time = DEF_UART0_RX_MSG_TOUT * DEF_UART0_RX_TOUT ({1:255} * {2:520})[ms] 	
#else
	#define DEF_UART0_RX_MSG_TOUT	5					// time = DEF_UART0_RX_MSG_TOUT * DEF_UART0_RX_TOUT ({1:255} * {2:520})[ms] 	
#endif
	

#define DEF_UART0_MAX_DEV		16					// max count of devices connected to bus
#define DEF_UART0_MASTER_BUS	false				// true = Is master periphery
#define DEF_UART0_RS485_BUS		true				// true = physical layer via rs485
#define DEF_UART0_DIS_TX_IDLE	false				// true = disable TX while not transmitting
#define DEF_UART0_DIS_RX		true				// true = disable RX while transmitting

#endif /* CONF_UART_H_ */