| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
FSK Modulator/Demodulator. More...

Go to the source code of this file.
| Macros | |
| #define | BWLIST {75,800} | 
| #define | FLIST {1400,1800,1200,2200,1300,2100} | 
| #define | IGET_SAMPLE iget_sample(&buffer, len) | 
| #define | NBW 2 | 
| #define | NF 6 | 
| #define | STATE_GET_BYTE 3 | 
| #define | STATE_SEARCH_STARTBIT 0 | 
| #define | STATE_SEARCH_STARTBIT2 1 | 
| #define | STATE_SEARCH_STARTBIT3 2 | 
| Functions | |
| int | fsk_serial (fsk_data *fskd, short *buffer, int *len, int *outbyte) | 
| 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. | |
| int | fskmodem_init (fsk_data *fskd) | 
| static int | get_bit_raw (fsk_data *fskd, short *buffer, int *len) | 
| static int | ibpdfilter (struct filter_struct *fs, int in) | 
| static int | ibpfilter (struct filter_struct *fs, int in) | 
| static int | idemodulator (fsk_data *fskd, int *retval, int x) | 
| static int | iget_sample (short **buffer, int *len) | 
| Variables | |
| static double | coef_in [NF][NBW][8] | 
| Coefficients for input filters Coefficients table, generated by program "mkfilter" mkfilter is part of the zapatatelephony.org distribution Format: coef[IDX_FREC][IDX_BW][IDX_COEF] IDX_COEF = 0 => 1/GAIN IDX_COEF = 1-6 => Coefficientes y[n]. | |
| static double | coef_out [NBW][8] | 
| Coefficients for output filter Coefficients table, generated by program "mkfilter" Format: coef[IDX_BW][IDX_COEF] IDX_COEF = 0 => 1/GAIN IDX_COEF = 1-6 => Coefficientes y[n]. | |
FSK Modulator/Demodulator.
Definition in file fskmodem_int.c.
| #define BWLIST {75,800} | 
Definition at line 40 of file fskmodem_int.c.
| #define FLIST {1400,1800,1200,2200,1300,2100} | 
Definition at line 42 of file fskmodem_int.c.
| #define IGET_SAMPLE iget_sample(&buffer, len) | 
Definition at line 58 of file fskmodem_int.c.
| #define NBW 2 | 
Definition at line 39 of file fskmodem_int.c.
| #define NF 6 | 
Definition at line 41 of file fskmodem_int.c.
| #define STATE_GET_BYTE 3 | 
Definition at line 47 of file fskmodem_int.c.
| #define STATE_SEARCH_STARTBIT 0 | 
Definition at line 44 of file fskmodem_int.c.
| #define STATE_SEARCH_STARTBIT2 1 | 
Definition at line 45 of file fskmodem_int.c.
| #define STATE_SEARCH_STARTBIT3 2 | 
Definition at line 46 of file fskmodem_int.c.
| int fsk_serial | ( | fsk_data * | fskd, | 
| short * | buffer, | ||
| int * | len, | ||
| int * | outbyte | ||
| ) | 
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.
| 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. | 
Definition at line 222 of file fskmodem_int.c.
References a, demodulator(), get_bit_raw(), get_bit_raw(), GET_SAMPLE, idemodulator(), IGET_SAMPLE, fsk_data::instop, fsk_data::ispb, len(), fsk_data::nbit, fsk_data::nstop, fsk_data::parity, fsk_data::spb, fsk_data::state, STATE_GET_BYTE, STATE_SEARCH_STARTBIT, STATE_SEARCH_STARTBIT2, STATE_SEARCH_STARTBIT3, fsk_data::x1, fsk_data::x2, fsk_data::xi1, and fsk_data::xi2.
Referenced by callerid_feed(), callerid_feed_jp(), and tdd_feed().
| int fskmodem_init | ( | fsk_data * | fskd | ) | 
Definition at line 195 of file fskmodem_int.c.
References fsk_data::bw, coef_in, coef_out, fsk_data::demod_filter, fsk_data::f_mark_idx, fsk_data::f_space_idx, filter_struct::icoefs, filter_struct::ip, filter_struct::ixv, filter_struct::iyv, fsk_data::mark_filter, and fsk_data::space_filter.
Referenced by callerid_new(), and tdd_new().
| 
 | static | 
Definition at line 165 of file fskmodem_int.c.
References fsk_data::icont, idemodulator(), IGET_SAMPLE, fsk_data::pllids, fsk_data::pllispb, fsk_data::pllispb2, and fsk_data::xi0.
Referenced by fsk_serial().
| 
 | inlinestatic | 
Integer Pass Band demodulator filter 
 
Definition at line 95 of file fskmodem_int.c.
References filter_struct::icoefs, in, filter_struct::ip, filter_struct::ixv, and filter_struct::iyv.
Referenced by idemodulator().
| 
 | inlinestatic | 
Integer Band Pass filter
Definition at line 124 of file fskmodem_int.c.
References filter_struct::icoefs, in, filter_struct::ip, filter_struct::ixv, and filter_struct::iyv.
Referenced by idemodulator().
| 
 | inlinestatic | 
Definition at line 149 of file fskmodem_int.c.
References fsk_data::demod_filter, ibpdfilter(), ibpfilter(), id, fsk_data::mark_filter, and fsk_data::space_filter.
Referenced by fsk_serial(), and get_bit_raw().
| 
 | inlinestatic | 
Definition at line 49 of file fskmodem_int.c.
Coefficients for input filters Coefficients table, generated by program "mkfilter" mkfilter is part of the zapatatelephony.org distribution Format: coef[IDX_FREC][IDX_BW][IDX_COEF] IDX_COEF = 0 => 1/GAIN IDX_COEF = 1-6 => Coefficientes y[n].
Definition at line 66 of file fskmodem_int.c.
Referenced by fskmodem_init().
| 
 | static | 
Coefficients for output filter Coefficients table, generated by program "mkfilter" Format: coef[IDX_BW][IDX_COEF] IDX_COEF = 0 => 1/GAIN IDX_COEF = 1-6 => Coefficientes y[n].
Definition at line 88 of file fskmodem_int.c.
Referenced by fskmodem_init().