/*
 * xuart_driver.h
 *
 */

#ifndef XUART_DRIVER_H_
#define XUART_DRIVER_H_


extern int xuart_initialize(unsigned int ch, unsigned int speed, int parity);

extern int xuart_send(unsigned int ch, const void* data, unsigned int len/*==0 -> "\0" terminated*/);

extern int xuart_data_ready(unsigned int ch);


extern int xuart_receive(unsigned int ch, char* received_char);

enum xuart_rx_sts_t
{
	xuart_rx_nodata=0,
	xuart_rx_data_ready=1,
	xuart_rx_overrun=-1,
	xuart_rx_error=-2
};


#endif /* XUART_DRIVER_H_ */
