/***************************************************************************
* voicesync_pci152.h	
*
*
* Copyright:	(c) 2010 Amfeltec Corp.
*
* ==========================================================================
* June 10, 2008		Initial version.
***************************************************************************/

#if !defined(__VOICESYNC_PCI152_H__)
# define __VOICESYNC_PCI152_H__

#include "xr17d152.h"

#define VSPCI_RXBYTES_SEC	(VS_RX_LEN * VSPCI_RXINT_IN_SEC)	// number of bytes per sec
#define VSPCI_RXBYTES_USEC  	(VS_RXBYTES_SEC/1000000)		// number of bytes per usec		

#define VSPCI_CTRL_BIT_REV	0
#define VSPCI_CTRL_BIT_LED	3

#define VSPCI_CTRL_MASK_REV	0x00000003

#define VSPCI_CTRL_LED		(1 << VSPCI_CTRL_BIT_LED)

#define VSPCI_LED(ctrl)		((ctrl) & VSPCI_CTRL_LED)
#define VSPCI_REV(ctrl)		((ctrl) & VSPCI_CTRL_MASK_REV)

#define VSPCI_REV_FREQ_8MHZ	0x00
#define VSPCI_REV_FREQ_DECODE(rev)					\
		((rev) == VSPCI_REV_FREQ_8MHZ) ? "8MHZ" : "??Mhz"

#define VSPCI_DIV_8MHZ_8	0x1F40
#define VSPCI_DIV_8MHZ_16	0x3E80
#define VSPCI_DIV_8MHZ_40	0x9C40


#endif /* __VOICESYNC_PCI152_H__ */
