#ifdef __cplusplus extern "C" { #endif /* Struct to overlay on the VS4 registers. Note that the VS4 */ /* responds to both 8bit and 16bit transfers. We use the 16bit */ volatile struct VS4 { volatile unsigned short data; volatile unsigned short done; volatile unsigned short control; volatile unsigned short status; volatile unsigned short interrupt; } vs4_registers_t; /* VS4 status register bits */ #define IRQ_S 0x80 #define TBE_S 0x40 #define IBF_S 0x20 #define DON_S 0x10 #define OVRT 0x08 #define ENCODER 0x04 #define INIT 0x02 #define CMD_S 0x01 /* Initialize the VS4 */ int VS4Init(unsigned short addr); /* Print the VS4 registers to the screen */ int VS4Registers(void); /* Quietly get the VS4 registers */ int VS4reg(struct VS4 *my_vs4); /* Issue a command and print it along with any return */ /* messages to the screen in a verbose manner. */ int VS4Command(const char *mess); /* Issue a command quietly and optionally copy the return */ /* string (if any) to the user specified buffer. chomp_ret_mess */ /* can be used to have the leading and trailing and */ /* characters stripped. */ int VS4cmd(const char *mess, char *ret_mess, int ret_mess_size, int chomp_ret_mess); #ifdef __cplusplus } #endif