freebsd-ports/comms/vpb-driver/files/patch-src-genericfreebsd.cpp
Sam Lawrance e6e189732d Add vpb-driver 2.4.9, device-driver for the Voicetronix OpenLine4 PCI
telephony cards.

This is a port of the 4.x driver from the vendor, for 5.x.

PR:		ports/77471
Submitted by:	Chris Forkin <chris@forkin.com>
2005-11-11 10:06:14 +00:00

43 lines
976 B
C++

--- src/genericfreebsd.cpp Wed Feb 19 14:19:30 2003
+++ src/genericfreebsd.cpp Mon Oct 10 22:07:11 2005
@@ -44,6 +44,11 @@
#include "generic.h"
#include "vpb_ioctl.h"
+#define MAX_BOARDS 12
+#define BANKA 8
+#define BANKB 12
+int vpb_pconf[MAX_BOARDS][BANKB];
+
void GenericInitializeCriticalSection(GENERIC_CRITICAL_SECTION *cs) {
int ret;
pthread_mutex_t *pmut;
@@ -219,6 +224,28 @@
params.data = buf;
return ioctl(fd, VPB_IOC_PCI_BLOCK_WRITE, &params);
+}
+
+int Generic_pci_block_iicread(
+ int fd,
+ unsigned short board,
+ unsigned short addr,
+ unsigned short length,
+ unsigned short *buf)
+{
+ // not supported in FreeBSD yet
+ return -1;
+}
+
+int Generic_pci_block_iicwrite(
+ int fd,
+ unsigned short board,
+ unsigned short addr,
+ unsigned short length,
+ unsigned short *buf)
+{
+ // not supported in FreeBSD yet
+ return -1;
}
int Generic_pci_block_eeread(