diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2017-03-25 00:47:50 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-04-18 18:08:57 +0200 |
commit | 973c7d0970d5151f1b5d40b01ce0f2334c226b7c (patch) | |
tree | bb449bd4fb1b30852ca602b04fe540fdf5703061 /src/mm-modem-helpers.h | |
parent | 75d9c0bc9542e04887e8b73fd0238d97d7ad263a (diff) |
helpers: new parser for AT+IFC=?
Instead of having the parser return separate list of supported flow
controls for TE and TA, we simplify it by only returning those
settings that apply to both TE and TA.
This logic isn't perfect either, though, as some settings (e.g. '3' in
TE in some modems, specifying a different XON/XOFF behavior) may not
have a corresponding setting in the other end.
The most common cases we care about (i.e. standard XON/XOFF, RTS/CTS)
should be properly reported with this logic.
Diffstat (limited to 'src/mm-modem-helpers.h')
-rw-r--r-- | src/mm-modem-helpers.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mm-modem-helpers.h b/src/mm-modem-helpers.h index a74924e3..bd10b940 100644 --- a/src/mm-modem-helpers.h +++ b/src/mm-modem-helpers.h @@ -95,6 +95,23 @@ GRegex *mm_voice_cring_regex_get(void); GRegex *mm_voice_clip_regex_get (void); /*****************************************************************************/ +/* SERIAL specific helpers and utilities */ + +/* AT+IFC=? response parser. + * For simplicity, we'll only consider flow control methods available in both + * TE and TA. */ + +typedef enum { + MM_FLOW_CONTROL_UNKNOWN = 0, + MM_FLOW_CONTROL_NONE = 1 << 0, /* IFC=0,0 */ + MM_FLOW_CONTROL_XON_XOFF = 1 << 1, /* IFC=1,1 */ + MM_FLOW_CONTROL_RTS_CTS = 1 << 2, /* IFC=2,2 */ +} MMFlowControl; + +MMFlowControl mm_parse_ifc_test_response (const gchar *response, + GError **error); + +/*****************************************************************************/ /* 3GPP specific helpers and utilities */ /*****************************************************************************/ |