Go to the source code of this file.
Classes | |
struct | t31_profile_t |
struct | t31_state_s |
Defines | |
#define | _T31_H_ |
#define | T31_TX_BUF_LEN (4096*32) |
Typedefs | |
typedef t31_state_s | t31_state_t |
typedef int( | t31_modem_control_handler_t )(t31_state_t *s, void *user_data, int op, const char *num) |
typedef int( | t31_at_tx_handler_t )(t31_state_t *s, void *user_data, const uint8_t *buf, int len) |
Enumerations | |
enum | t31_rx_mode_e { AT_MODE_ONHOOK_COMMAND, AT_MODE_OFFHOOK_COMMAND, AT_MODE_CONNECTED, AT_MODE_DELIVERY, AT_MODE_HDLC, AT_MODE_STUFFED } |
enum | t31_call_event_e { T31_CALL_EVENT_ALERTING = 1, T31_CALL_EVENT_CONNECTED, T31_CALL_EVENT_ANSWERED, T31_CALL_EVENT_BUSY, T31_CALL_EVENT_NO_DIALTONE, T31_CALL_EVENT_NO_ANSWER, T31_CALL_EVENT_HANGUP } |
enum | t31_modem_control_operation_e { T31_MODEM_CONTROL_CALL, T31_MODEM_CONTROL_ANSWER, T31_MODEM_CONTROL_HANGUP, T31_MODEM_CONTROL_DTR, T31_MODEM_CONTROL_RTS, T31_MODEM_CONTROL_CTS, T31_MODEM_CONTROL_CAR, T31_MODEM_CONTROL_RNG, T31_MODEM_CONTROL_DSR } |
Functions | |
void | t31_call_event (t31_state_t *s, int event) |
int | t31_at_rx (t31_state_t *s, const char *t, int len) |
int | t31_rx (t31_state_t *s, int16_t *buf, int len) |
Process a block of received T.31 modem audio samples. | |
int | t31_tx (t31_state_t *s, int16_t *buf, int max_len) |
Generate a block of T.31 modem audio samples. | |
int | t31_init (t31_state_t *s, t31_at_tx_handler_t *at_tx_handler, void *at_tx_user_data, t31_modem_control_handler_t *modem_control_handler, void *modem_control_user_data) |
Initialise a T.31 context. |
int t31_init | ( | t31_state_t * | s, | |
t31_at_tx_handler_t * | at_tx_handler, | |||
void * | at_tx_user_data, | |||
t31_modem_control_handler_t * | modem_control_handler, | |||
void * | modem_control_user_data | |||
) |
Initialise a T.31 context.
Initialise a T.31 context. This must be called before the first use of the context, to initialise its contents.
s | The T.31 context. | |
at_tx_handler | ???. | |
at_tx_user_data | ???. | |
modem_control_handler | ???. | |
modem_control_user_data | ???. |
int t31_rx | ( | t31_state_t * | s, | |
int16_t * | buf, | |||
int | len | |||
) |
Process a block of received T.31 modem audio samples.
Process a block of received T.31 modem audio samples.
s | The T.31 modem context. | |
amp | The audio sample buffer. | |
len | The number of samples in the buffer. |
int t31_tx | ( | t31_state_t * | s, | |
int16_t * | buf, | |||
int | max_len | |||
) |
Generate a block of T.31 modem audio samples.
Generate a block of T.31 modem audio samples.
s | The T.31 modem context. | |
amp | The audio sample buffer. | |
max_len | The number of samples to be generated. |