summaryrefslogtreecommitdiff
path: root/include/asterisk/fskmodem.h
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2001-03-24 02:45:02 +0000
committerMark Spencer <markster@digium.com>2001-03-24 02:45:02 +0000
commit89e58f12a85009a8e8a6f05e23f43eca408c207a (patch)
treeda6106849712ef17a814bff9172c4b533eaad678 /include/asterisk/fskmodem.h
parentcc1ca5d154525c2370af2257f3c6b7fdff7ac485 (diff)
Version 0.1.7 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/fskmodem.h')
-rwxr-xr-xinclude/asterisk/fskmodem.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/include/asterisk/fskmodem.h b/include/asterisk/fskmodem.h
new file mode 100755
index 000000000..61a77449f
--- /dev/null
+++ b/include/asterisk/fskmodem.h
@@ -0,0 +1,63 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+ *
+ * FSK Modem Support
+ *
+ * Copyright (C) 1999, Mark Spencer
+ *
+ * Mark Spencer <markster@linux-support.net>
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License.
+ *
+ * Includes code and algorithms from the Zapata library.
+ *
+ */
+
+#ifndef _FSKMODEM_H
+#define _FSKMODEM_H
+
+#define PARITY_NONE 0
+#define PARITY_EVEN 1
+#define PARITY_ODD 2
+
+
+#define NCOLA 0x4000
+
+typedef struct {
+ float spb; /* Samples / Bit */
+ int nbit; /* Number of Data Bits (5,7,8) */
+ float nstop; /* Number of Stop Bits 1,1.5,2 */
+ int paridad; /* Parity 0=none 1=even 2=odd */
+ int hdlc; /* Modo Packet */
+ float x0;
+ float x1;
+ float x2;
+ float cont;
+ int bw; /* Ancho de Banda */
+ double fmxv[8],fmyv[8]; /* filter stuff for M filter */
+ int fmp; /* pointer for M filter */
+ double fsxv[8],fsyv[8]; /* filter stuff for S filter */
+ int fsp; /* pointer for S filter */
+ double flxv[8],flyv[8]; /* filter stuff for L filter */
+ int flp; /* pointer for L filter */
+ int f_mark_idx; /* Indice de frecuencia de marca (f_M-500)/5 */
+ int f_space_idx;/* Indice de frecuencia de espacio (f_S-500)/5 */
+ int state;
+ int pcola; /* Puntero de las colas de datos */
+ float cola_in[NCOLA]; /* Cola de muestras de entrada */
+ float cola_filtro[NCOLA]; /* Cola de muestras tras filtros */
+ float cola_demod[NCOLA]; /* Cola de muestras demoduladas */
+} fsk_data;
+
+/* Retrieve a serial byte into outbyte. Buffer is a pointer into a series of
+ shorts and len records the number of bytes in the buffer. len will be
+ overwritten with the number of bytes left that were not consumed, and the
+ return value is as follows:
+ 0: Still looking for something...
+ 1: An output byte was received and stored in outbyte
+ -1: An error occured in the transmission
+ He must be called with at least 80 bytes of buffer. */
+extern int fsk_serie(fsk_data *fskd, short *buffer, int *len, int *outbyte);
+
+#endif