Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 994c58e8 authored by Andre Eisenbach's avatar Andre Eisenbach Committed by android-build-merger
Browse files

Remove position dependent lookup tables in AT command parser

am: 6a7ca9cb

Change-Id: I0a690f1538c49fbed743ccf324d240dbb8c927c8
parents 5307fad7 6a7ca9cb
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -149,12 +149,16 @@ void bta_ag_process_at(tBTA_AG_AT_CB *p_cb)
                else
                {

                    (*p_cb->p_cmd_cback)(p_cb->p_user, idx, arg_type, p_arg, int_arg);
                    (*p_cb->p_cmd_cback)(p_cb->p_user,
                                         p_cb->p_at_tbl[idx].command_id,
                                         arg_type, p_arg, int_arg);
                }
            }
            else
            {
                (*p_cb->p_cmd_cback)(p_cb->p_user, idx, arg_type, p_arg, int_arg);
                (*p_cb->p_cmd_cback)(p_cb->p_user,
                                     p_cb->p_at_tbl[idx].command_id,
                                     arg_type, p_arg, int_arg);
            }
        }
        /* else error */
+2 −1
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
typedef struct
{
    const char  *p_cmd;         /* AT command string */
    size_t      command_id;     /* passed to the callback on p_cmd match */
    UINT8       arg_type;       /* allowable argument type syntax */
    UINT8       fmt;            /* whether arg is int or string */
    UINT8       min;            /* minimum value for int arg */
@@ -54,7 +55,7 @@ typedef struct
} tBTA_AG_AT_CMD;

/* callback function executed when command is parsed */
typedef void (tBTA_AG_AT_CMD_CBACK)(void *p_user, UINT16 cmd, UINT8 arg_type,
typedef void (tBTA_AG_AT_CMD_CBACK)(void *p_user, UINT16 command_id, UINT8 arg_type,
                                    char *p_arg, INT16 int_arg);

/* callback function executed to send "ERROR" result code */
+205 −408

File changed.

Preview size limit exceeded, changes collapsed.

+0 −10
Original line number Diff line number Diff line
@@ -29,16 +29,6 @@
#include "bta_ag_api.h"
#include "bta_ag_at.h"

/* Send RING & CLIP in one AT cmd */
#ifndef BTA_AG_MULTI_RESULT_INCLUDED
#define BTA_AG_MULTI_RESULT_INCLUDED      FALSE
#endif

/* Replace : in VGS and VGM for HSP */
#ifndef BTA_HSP_RESULT_REPLACE_COLON
#define BTA_HSP_RESULT_REPLACE_COLON      TRUE
#endif

/*****************************************************************************
**  Constants
*****************************************************************************/