summaryrefslogtreecommitdiff
path: root/xpp/xbus-core.h
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-05-03 23:06:02 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-05-03 23:06:02 +0000
commit2dd60aaf18e98b0e9d3c06bd9dce5f1128fa55ad (patch)
tree1a1cd28888f191e6ce83bcbbe539124e2529c90b /xpp/xbus-core.h
parent8c4db4e3acd9a7626e709af0494055487b589719 (diff)
xpp driver release 1.1.0 (first part of commit)
* FPGA firmware now loaded from PC (for newer models) * Driver for the FXO module * Moved most userspace files to the subdirectory utils (see also next commit) * Explicit license for firmware files * Optionally avoid auto-registration * Initializations parameters to chips given from userspace * And did I mention bugfixes? git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1021 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/xbus-core.h')
-rw-r--r--xpp/xbus-core.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/xpp/xbus-core.h b/xpp/xbus-core.h
new file mode 100644
index 0000000..dd01971
--- /dev/null
+++ b/xpp/xbus-core.h
@@ -0,0 +1,53 @@
+/*
+ * Written by Oron Peled <oron@actcom.co.il>
+ * Copyright (C) 2004-2006, Xorcom
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+#ifndef XBUS_CORE_H
+#define XBUS_CORE_H
+
+#include "xpd.h"
+
+#define MAX_BUSES 16
+
+int xbus_core_init(void); /* Initializer */
+void xbus_core_shutdown(void); /* Terminator */
+
+/* Packet handling */
+xpacket_t *xbus_packet_new(xbus_t *xbus, int flags);
+void xbus_packet_free(xbus_t *xbus, xpacket_t *p);
+
+/* packet queues */
+void init_xbus_packet_queue(packet_queue_t *q, const char name[]);
+void drain_xbus_packet_queue(xbus_t *xbus, packet_queue_t *q);
+void xbus_enqueue_packet(xbus_t *xbus, packet_queue_t *q, xpacket_t *pack);
+xpacket_t *xbus_dequeue_packet(packet_queue_t *q);
+
+/* XBUS handling */
+xbus_t *xbus_of(int xbus_num);
+xpd_t *xpd_of(xbus_t *xbus, int xpd_num);
+xbus_t *xbus_new(xbus_ops_t *ops);
+void xbus_remove(xbus_t *xbus);
+void xbus_activate(xbus_t *xbus);
+void xbus_disconnect(xbus_t *xbus);
+
+void xbus_reset_counters(xbus_t *xbus);
+
+#endif /* XBUS_CORE_H */
+