// $URL: http://subversion:8080/svn/gsc/trunk/drivers/SDK/hpdi32/sbtest/main.h $
// $Rev: 1943 $
// $Date:$

#ifndef __MAIN_H__
#define __MAIN_H__

#include "hpdi32_api.h"



/* #defines	*****************************************************************/

#define	VERSION				"1.10"
// 1.10	Updated some test code to try to correct additional errors.
// 1.9	Updated some test code to correct errors.
//		Removed the write/read and read and write throughput tests.
// 1.08	Removed a compiler warning from io.c.
//		Added more logic to the write/read test in io.c
// 1.07	Ported to 32-bit and 64-bit Linux.
// 1.06	Added host os identification.
// 1.05	Ported to the SDK.
// 1.04	Moved various services to the utils directory.
// 1.03 Added I/O Single Cycle tests and fixed a few bugs.
// 1.02	Added I/O and IRQ notification tests for callback and wait options.
// 1.01	Added a Tx Single Cycle test. Added version data reporting.
// 1.00	Initial release.

#define	ARRAY_ELEMENTS(a)	(sizeof((a))/sizeof((a)[0]))

#define	RX_WRITE_SAMPLES	1024



/* typedefs	*****************************************************************/

typedef enum
{
	FIFO_NONE,
	FIFO_SIZE_UNKNOWN,
	FIFO_SIZE_KNOWN
} fifo_info_t;



/* variables	*************************************************************/

extern	long	rx_size;
extern	long	tx_size;



/* prototypes	*************************************************************/

int		cable_config_tests(void* dev);
int		fifo_config_tests(void* dev);
void	fifo_info_rx(fifo_info_t* info, U32* size);
void	fifo_info_tx(fifo_info_t* info, U32* size);
int		io_config_tests(void* dev);
int		io_data_size_io_tests(void* dev);
int		io_notify_tests(void* dev);
int		irq_config_tests(void* dev);
int		irq_notify_tests(void* dev);
int		misc_config_tests(void* dev);
U32		pio_buf_api_throughput_read_test(void* dev, U32 seconds, unsigned long* size, U32* rate);
U32		pio_buf_api_throughput_write_test(void* dev, U32 seconds, unsigned long* size, U32* rate);
U32		pio_buf_user_throughput_read_test(void* dev, U32 seconds, unsigned long* size, U32* rate);
U32		pio_buf_user_throughput_write_test(void* dev, U32 seconds, unsigned long* size, U32* rate);
int		reg_read_test(void* dev);
int		reg_write_test(void* dev);
int		rx_config_tests(void* dev);
U32		rx_write(void* dev, U32 samples);
int		tx_config_tests(void* dev);
U32		tx_write(void* dev, U32 samples);
int		special_tests(void* dev);



#endif
