Go to the source code of this file.
Typedefs | |
| typedef void(* | put_msg_func_t )(void *user_data, const uint8_t *msg, int len) |
| typedef int(* | get_msg_func_t )(void *user_data, uint8_t *msg, int max_len) |
| typedef void(* | put_byte_func_t )(void *user_data, int byte) |
| typedef int(* | get_byte_func_t )(void *user_data) |
| typedef void(* | put_bit_func_t )(void *user_data, int bit) |
| typedef int(* | get_bit_func_t )(void *user_data) |
| typedef void(* | modem_tx_status_func_t )(void *user_data, int status) |
| typedef void(* | modem_rx_status_func_t )(void *user_data, int status) |
| typedef struct async_tx_state_s | async_tx_state_t |
| typedef struct async_rx_state_s | async_rx_state_t |
Enumerations | |
| enum | { SIG_STATUS_CARRIER_DOWN = -1, SIG_STATUS_CARRIER_UP = -2, SIG_STATUS_TRAINING_IN_PROGRESS = -3, SIG_STATUS_TRAINING_SUCCEEDED = -4, SIG_STATUS_TRAINING_FAILED = -5, SIG_STATUS_FRAMING_OK = -6, SIG_STATUS_END_OF_DATA = -7, SIG_STATUS_ABORT = -8, SIG_STATUS_BREAK = -9, SIG_STATUS_SHUTDOWN_COMPLETE = -10, SIG_STATUS_OCTET_REPORT = -11, SIG_STATUS_POOR_SIGNAL_QUALITY = -12, SIG_STATUS_MODEM_RETRAIN_OCCURRED = -13 } |
| enum | { ASYNC_PARITY_NONE = 0, ASYNC_PARITY_EVEN, ASYNC_PARITY_ODD } |
Functions | |
| const char * | signal_status_to_str (int status) |
| Convert a signal status to a short text description. | |
| async_tx_state_t * | async_tx_init (async_tx_state_t *s, int data_bits, int parity_bits, int stop_bits, int use_v14, get_byte_func_t get_byte, void *user_data) |
| Initialise an asynchronous data transmit context. | |
| int | async_tx_release (async_tx_state_t *s) |
| int | async_tx_free (async_tx_state_t *s) |
| SPAN_DECLARE_NONSTD (int) async_tx_get_bit(void *user_data) | |
| Get the next bit of a transmitted serial bit stream. | |
| async_rx_state_t * | async_rx_init (async_rx_state_t *s, int data_bits, int parity_bits, int stop_bits, int use_v14, put_byte_func_t put_byte, void *user_data) |
| Initialise an asynchronous data receiver context. | |
| int | async_rx_release (async_rx_state_t *s) |
| int | async_rx_free (async_rx_state_t *s) |
| SPAN_DECLARE_NONSTD (void) async_rx_put_bit(void *user_data | |
| Accept a bit from a received serial bit stream. | |
Variables | |
| int | bit |
| typedef struct async_rx_state_s async_rx_state_t |
Asynchronous data receive descriptor. This defines the state of a single working instance of an asynchronous serial to byte converter, for use in FSK modems.
| typedef struct async_tx_state_s async_tx_state_t |
Asynchronous data transmit descriptor. This defines the state of a single working instance of a byte to asynchronous serial converter, for use in FSK modems.
| typedef int(* get_bit_func_t)(void *user_data) |
Bit get function for data pumps
| typedef int(* get_byte_func_t)(void *user_data) |
Byte get function for data pumps
| typedef int(* get_msg_func_t)(void *user_data, uint8_t *msg, int max_len) |
Message get function for data pumps
| typedef void(* modem_rx_status_func_t)(void *user_data, int status) |
Completion callback function for rx data pumps
| typedef void(* modem_tx_status_func_t)(void *user_data, int status) |
Completion callback function for tx data pumps
| typedef void(* put_bit_func_t)(void *user_data, int bit) |
Bit put function for data pumps
| typedef void(* put_byte_func_t)(void *user_data, int byte) |
Byte put function for data pumps
| typedef void(* put_msg_func_t)(void *user_data, const uint8_t *msg, int len) |
Message put function for data pumps
| anonymous enum |
Special "bit" values for the bitstream put and get functions, and the signal status functions.
| anonymous enum |
| async_rx_state_t* async_rx_init | ( | async_rx_state_t * | s, | |
| int | data_bits, | |||
| int | parity_bits, | |||
| int | stop_bits, | |||
| int | use_v14, | |||
| put_byte_func_t | put_byte, | |||
| void * | user_data | |||
| ) |
Initialise an asynchronous data receiver context.
Initialise an asynchronous data receiver context.
| s | The receiver context. | |
| data_bits | The number of data bits. | |
| parity_bits | The type of parity. | |
| stop_bits | The number of stop bits. | |
| use_v14 | TRUE if V.14 rate adaption processing should be used. | |
| put_byte | The callback routine used to put the received data. | |
| user_data | An opaque pointer. |
| async_tx_state_t* async_tx_init | ( | async_tx_state_t * | s, | |
| int | data_bits, | |||
| int | parity_bits, | |||
| int | stop_bits, | |||
| int | use_v14, | |||
| get_byte_func_t | get_byte, | |||
| void * | user_data | |||
| ) |
Initialise an asynchronous data transmit context.
Initialise an asynchronous data transmit context.
| s | The transmitter context. | |
| data_bits | The number of data bit. | |
| parity_bits | The type of parity. | |
| stop_bits | The number of stop bits. | |
| use_v14 | TRUE if V.14 rate adaption processing should be used. | |
| get_byte | The callback routine used to get the data to be transmitted. | |
| user_data | An opaque pointer. |
References ASYNC_PARITY_NONE.
Referenced by v18_init().
| const char* signal_status_to_str | ( | int | status | ) |
Convert a signal status to a short text description.
Convert a signal status to a short text description.
| status | The modem signal status. |
References SIG_STATUS_ABORT, SIG_STATUS_BREAK, SIG_STATUS_CARRIER_DOWN, SIG_STATUS_CARRIER_UP, SIG_STATUS_END_OF_DATA, SIG_STATUS_FRAMING_OK, SIG_STATUS_MODEM_RETRAIN_OCCURRED, SIG_STATUS_OCTET_REPORT, SIG_STATUS_POOR_SIGNAL_QUALITY, SIG_STATUS_SHUTDOWN_COMPLETE, SIG_STATUS_TRAINING_FAILED, SIG_STATUS_TRAINING_IN_PROGRESS, and SIG_STATUS_TRAINING_SUCCEEDED.
| SPAN_DECLARE_NONSTD | ( | void | ) |
Accept a bit from a received serial bit stream.
Process a received HDLC frame.
Accept a bit from a received serial bit stream
| user_data | An opaque point which must point to a receiver context. | |
| bit | The new bit. Some special values are supported for this field.
|
| user_data | The T.30 context. | |
| msg | The HDLC message. | |
| len | The length of the message, in octets. | |
| ok | TRUE if the frame was received without error. |
| SPAN_DECLARE_NONSTD | ( | int | ) |
Get the next bit of a transmitted serial bit stream.
Get the next bit of a transmitted serial bit stream.
| user_data | An opaque point which must point to a transmitter context. |
A dummy routine to use as a receive callback, when we aren't really trying to process what is received. It just absorbs and ignores the data.
| user_data | The context. | |
| amp | The signal.buffer | |
| len | The length of the signal buffer |
1.5.9