47 #if !defined(_SPANDSP_ASYNC_H_) 48 #define _SPANDSP_ASYNC_H_ 95 typedef void (*
put_msg_func_t)(
void *user_data,
const uint8_t *msg,
int len);
139 #if defined(__cplusplus) 217 #if defined(__cplusplus)
void(* put_msg_func_t)(void *user_data, const uint8_t *msg, int len)
Definition: async.h:95
void * user_data
An opaque pointer passed when calling put_byte.
Definition: private/async.h:77
The link protocol (e.g. V.42) has disconnected.
Definition: async.h:87
Notification that a modem has detected signal quality degradation.
Definition: async.h:81
An abort signal (e.g. an HDLC abort) has been received.
Definition: async.h:73
const char * signal_status_to_str(int status)
Convert a signal status to a short text description.
Definition: async.c:49
int async_tx_get_bit(void *user_data)
Get the next bit of a transmitted serial bit stream.
Definition: async.c:218
Regular octet report for things like HDLC to the MTP standards.
Definition: async.h:79
Notification that a modem retrain has occurred.
Definition: async.h:83
The modem is training. This is an early indication that the signal seems to be of the right type...
Definition: async.h:63
int stop_bits
The number of stop bits per character.
Definition: private/async.h:71
The carrier signal is up. This merely indicates that carrier energy has been seen. It is not an indication that the carrier is either valid, or of the expected type.
Definition: async.h:58
An error has occurred in the link protocol (e.g. V.42).
Definition: async.h:89
void(* put_byte_func_t)(void *user_data, int byte)
Definition: async.h:101
void(* put_bit_func_t)(void *user_data, int bit)
Definition: async.h:107
void async_rx_put_bit(void *user_data, int bit)
Accept a bit from a received serial bit stream.
Definition: async.c:93
A modem has completed its task, and shut down.
Definition: async.h:77
void(* modem_status_func_t)(void *user_data, int status)
Definition: async.h:113
int data_bits
The number of data bits per character.
Definition: private/async.h:67
int(* get_bit_func_t)(void *user_data)
Definition: async.h:110
The data stream has ended.
Definition: async.h:71
int(* get_msg_func_t)(void *user_data, uint8_t *msg, int max_len)
Definition: async.h:98
The link protocol (e.g. V.42) has connected.
Definition: async.h:85
Definition: private/async.h:64
async_tx_state_t * async_tx_init(async_tx_state_t *s, int data_bits, int parity_bits, int stop_bits, bool use_v14, get_byte_func_t get_byte, void *user_data)
Initialise an asynchronous data transmit context.
Definition: async.c:274
The modem has trained, and is ready for data exchange.
Definition: async.h:65
put_byte_func_t put_byte
A pointer to the callback routine used to handle received characters.
Definition: private/async.h:75
bool use_v14
True if V.14 rate adaption processing should be performed.
Definition: private/async.h:73
Definition: private/async.h:34
A break signal (e.g. an async break) has been received.
Definition: async.h:75
async_rx_state_t * async_rx_init(async_rx_state_t *s, int data_bits, int parity_bits, int stop_bits, bool use_v14, put_byte_func_t put_byte, void *user_data)
Initialise an asynchronous data receiver context.
Definition: async.c:174
The carrier signal has dropped.
Definition: async.h:54
Packet framing (e.g. HDLC framing) is OK.
Definition: async.h:69
Keep the link in an idle state, as there is nothing to send.
Definition: async.h:91
void async_tx_presend_bits(async_tx_state_t *s, int bits)
Set a minimum number of bit times of stop bit state before character transmission commences...
Definition: async.c:268
int(* get_byte_func_t)(void *user_data)
Definition: async.h:104
The modem has failed to train.
Definition: async.h:67