spandsp
0.0.6
Main Page
Related Pages
Classes
Files
File List
File Members
private/async.h
1
/*
2
* SpanDSP - a series of DSP components for telephony
3
*
4
* private/async.h - Asynchronous serial bit stream encoding and decoding
5
*
6
* Written by Steve Underwood <steveu@coppice.org>
7
*
8
* Copyright (C) 2003 Steve Underwood
9
*
10
* All rights reserved.
11
*
12
* This program is free software; you can redistribute it and/or modify
13
* it under the terms of the GNU Lesser General Public License version 2.1,
14
* as published by the Free Software Foundation.
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Lesser General Public License for more details.
20
*
21
* You should have received a copy of the GNU Lesser General Public
22
* License along with this program; if not, write to the Free Software
23
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
*/
25
26
#if !defined(_SPANDSP_PRIVATE_ASYNC_H_)
27
#define _SPANDSP_PRIVATE_ASYNC_H_
28
29
/*!
30
Asynchronous data transmit descriptor. This defines the state of a single
31
working instance of a byte to asynchronous serial converter, for use
32
in FSK modems.
33
*/
34
struct
async_tx_state_s
35
{
36
/*! \brief The number of data bits per character. */
37
int
data_bits
;
38
/*! \brief The type of parity. */
39
int
parity
;
40
/*! \brief The number of stop bits per character. */
41
int
stop_bits
;
42
/*! \brief A pointer to the callback routine used to get characters to be transmitted. */
43
get_byte_func_t
get_byte
;
44
/*! \brief An opaque pointer passed when calling get_byte. */
45
void
*
user_data
;
46
47
/*! \brief A current, partially transmitted, character. */
48
int
byte_in_progress
;
49
/*! \brief The current bit position within a partially transmitted character. */
50
int
bitpos
;
51
/*! \brief Parity bit. */
52
int
parity_bit
;
53
};
54
55
/*!
56
Asynchronous data receive descriptor. This defines the state of a single
57
working instance of an asynchronous serial to byte converter, for use
58
in FSK modems.
59
*/
60
struct
async_rx_state_s
61
{
62
/*! \brief The number of data bits per character. */
63
int
data_bits
;
64
/*! \brief The type of parity. */
65
int
parity
;
66
/*! \brief The number of stop bits per character. */
67
int
stop_bits
;
68
/*! \brief TRUE if V.14 rate adaption processing should be performed. */
69
int
use_v14
;
70
/*! \brief A pointer to the callback routine used to handle received characters. */
71
put_byte_func_t
put_byte
;
72
/*! \brief An opaque pointer passed when calling put_byte. */
73
void
*
user_data
;
74
75
/*! \brief A current, partially complete, character. */
76
int
byte_in_progress
;
77
/*! \brief The current bit position within a partially complete character. */
78
int
bitpos
;
79
/*! \brief Parity bit. */
80
int
parity_bit
;
81
82
/*! A count of the number of parity errors seen. */
83
int
parity_errors
;
84
/*! A count of the number of character framing errors seen. */
85
int
framing_errors
;
86
};
87
88
#endif
89
/*- End of file ------------------------------------------------------------*/
src
spandsp
private
async.h
Generated by
1.8.4