Make read-only globals const, additional fixes
- Global variables that are never written to are marked const - Remove some EXTERN declaration - Remove unused `log_mem_multi` from logging module
This commit is contained in:
committed by
Robert Schmidt
parent
5b943f598d
commit
206aa36a47
+118
-118
@@ -74,136 +74,136 @@ at_error_format_t at_error_format = AT_ERROR_OFF;
|
||||
* General errors
|
||||
* --------------
|
||||
*/
|
||||
static const char * _at_error_str[] = {
|
||||
"phone failure",
|
||||
"no connection to phone",
|
||||
"phone-adaptor link reserved",
|
||||
"operation not allowed",
|
||||
"operation not supported",
|
||||
"PH-SIM PIN required",
|
||||
"PH-FSIM PIN required",
|
||||
"PH-FSIM PUK required",
|
||||
NULL,
|
||||
NULL,
|
||||
"SIM not inserted",
|
||||
"SIM PIN required",
|
||||
"SIM PUK required",
|
||||
"SIM failure",
|
||||
"SIM busy",
|
||||
"SIM wrong",
|
||||
"incorrect password",
|
||||
"SIM PIN2 required",
|
||||
"SIM PUK2 required",
|
||||
NULL,
|
||||
"memory full",
|
||||
"invalid index",
|
||||
"not found",
|
||||
"memory failure",
|
||||
"text string too long",
|
||||
"invalid characters in text string",
|
||||
"dial string too long",
|
||||
"invalid characters in dial string",
|
||||
NULL,
|
||||
NULL,
|
||||
"no network service",
|
||||
"network timeout",
|
||||
"network not allowed - emergency calls only",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"network personalization PIN required",
|
||||
"network personalization PUK required",
|
||||
"network subset personalization PIN required",
|
||||
"network subset personalization PUK required",
|
||||
"service provider personalization PIN required",
|
||||
"service provider personalization PUK required",
|
||||
"corporate personalization PIN required",
|
||||
"corporate personalization PUK required",
|
||||
"hidden key required",
|
||||
"EAP method not supported",
|
||||
"Incorrect parameters",
|
||||
static const char* const _at_error_str[] = {
|
||||
"phone failure",
|
||||
"no connection to phone",
|
||||
"phone-adaptor link reserved",
|
||||
"operation not allowed",
|
||||
"operation not supported",
|
||||
"PH-SIM PIN required",
|
||||
"PH-FSIM PIN required",
|
||||
"PH-FSIM PUK required",
|
||||
NULL,
|
||||
NULL,
|
||||
"SIM not inserted",
|
||||
"SIM PIN required",
|
||||
"SIM PUK required",
|
||||
"SIM failure",
|
||||
"SIM busy",
|
||||
"SIM wrong",
|
||||
"incorrect password",
|
||||
"SIM PIN2 required",
|
||||
"SIM PUK2 required",
|
||||
NULL,
|
||||
"memory full",
|
||||
"invalid index",
|
||||
"not found",
|
||||
"memory failure",
|
||||
"text string too long",
|
||||
"invalid characters in text string",
|
||||
"dial string too long",
|
||||
"invalid characters in dial string",
|
||||
NULL,
|
||||
NULL,
|
||||
"no network service",
|
||||
"network timeout",
|
||||
"network not allowed - emergency calls only",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"network personalization PIN required",
|
||||
"network personalization PUK required",
|
||||
"network subset personalization PIN required",
|
||||
"network subset personalization PUK required",
|
||||
"service provider personalization PIN required",
|
||||
"service provider personalization PUK required",
|
||||
"corporate personalization PIN required",
|
||||
"corporate personalization PUK required",
|
||||
"hidden key required",
|
||||
"EAP method not supported",
|
||||
"Incorrect parameters",
|
||||
};
|
||||
|
||||
/*
|
||||
* GPRS-related errors
|
||||
* -------------------
|
||||
*/
|
||||
static const char* _at_error_gprs[] = {
|
||||
"Illegal MS",
|
||||
NULL,
|
||||
NULL,
|
||||
"Illegal ME",
|
||||
"GPRS services not allowed",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"PLMN not allowed",
|
||||
"Location area not allowed",
|
||||
"Roaming not allowed in this location area",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"service option not supported",
|
||||
"requested service option not subscribed",
|
||||
"service option temporarily out of order",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"unspecified GPRS error",
|
||||
"PDP authentication failure",
|
||||
"invalid mobile class",
|
||||
"Last PDN disconnection not allowed",
|
||||
static const char* const _at_error_gprs[] = {
|
||||
"Illegal MS",
|
||||
NULL,
|
||||
NULL,
|
||||
"Illegal ME",
|
||||
"GPRS services not allowed",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"PLMN not allowed",
|
||||
"Location area not allowed",
|
||||
"Roaming not allowed in this location area",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"service option not supported",
|
||||
"requested service option not subscribed",
|
||||
"service option temporarily out of order",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"unspecified GPRS error",
|
||||
"PDP authentication failure",
|
||||
"invalid mobile class",
|
||||
"Last PDN disconnection not allowed",
|
||||
};
|
||||
|
||||
/*
|
||||
* VBS / VGCS and eMLPP -related errors
|
||||
* ------------------------------------
|
||||
*/
|
||||
static const char* _at_error_vbs[] = {
|
||||
/* 151 "VBS/VGCS not supported by the network" */
|
||||
"No service subscription on SIM",
|
||||
"No subscription for group ID",
|
||||
"Group Id not activated on SIM",
|
||||
"No matching notification",
|
||||
"VBS/VGCS call already present",
|
||||
"Congestion",
|
||||
"Network failure",
|
||||
"Uplink busy",
|
||||
"No access rights for SIM file",
|
||||
"No subscription for priority",
|
||||
"operation not applicable or not possible",
|
||||
"Group Id prefixes not supported",
|
||||
"Group Id prefixes not usable for VBS",
|
||||
"Group Id prefix value invalid",
|
||||
static const char* const _at_error_vbs[] = {
|
||||
/* 151 "VBS/VGCS not supported by the network" */
|
||||
"No service subscription on SIM",
|
||||
"No subscription for group ID",
|
||||
"Group Id not activated on SIM",
|
||||
"No matching notification",
|
||||
"VBS/VGCS call already present",
|
||||
"Congestion",
|
||||
"Network failure",
|
||||
"Uplink busy",
|
||||
"No access rights for SIM file",
|
||||
"No subscription for priority",
|
||||
"operation not applicable or not possible",
|
||||
"Group Id prefixes not supported",
|
||||
"Group Id prefixes not usable for VBS",
|
||||
"Group Id prefix value invalid",
|
||||
};
|
||||
|
||||
/* Returns the verbose value of AT command error */
|
||||
|
||||
@@ -89,28 +89,28 @@ typedef int (*_at_response_encode_function_t) (char* buffer, const at_response_t
|
||||
|
||||
static _at_response_encode_function_t _at_response_encode_function[AT_RESPONSE_ID_MAX] = {
|
||||
NULL,
|
||||
_at_response_encode_cgsn, /* CGSN */
|
||||
_at_response_encode_cgmi, /* CGMI */
|
||||
_at_response_encode_cgmm, /* CGMM */
|
||||
_at_response_encode_cgmr, /* CGMR */
|
||||
_at_response_encode_cimi, /* CIMI */
|
||||
_at_response_encode_cfun, /* CFUN */
|
||||
_at_response_encode_cpin, /* CPIN */
|
||||
_at_response_encode_csq, /* CSQ */
|
||||
_at_response_encode_cesq, /* CESQ */
|
||||
_at_response_encode_clac, /* CLAC */
|
||||
_at_response_encode_cmee, /* CMEE */
|
||||
_at_response_encode_cnum, /* CNUM */
|
||||
_at_response_encode_clck, /* CLCK */
|
||||
_at_response_encode_cops, /* COPS */
|
||||
_at_response_encode_creg, /* CREG */
|
||||
_at_response_encode_cgatt, /* CGATT */
|
||||
_at_response_encode_cgreg, /* CGREG */
|
||||
_at_response_encode_cereg, /* CEREG */
|
||||
_at_response_encode_cgdcont, /* CGDCONT */
|
||||
_at_response_encode_cgact, /* CGACT */
|
||||
_at_response_encode_cgpaddr, /* CGPADDR */
|
||||
_at_response_encode_cgev, /* CGEV: unsolicited result */
|
||||
_at_response_encode_cgsn, /* CGSN */
|
||||
_at_response_encode_cgmi, /* CGMI */
|
||||
_at_response_encode_cgmm, /* CGMM */
|
||||
_at_response_encode_cgmr, /* CGMR */
|
||||
_at_response_encode_cimi, /* CIMI */
|
||||
_at_response_encode_cfun, /* CFUN */
|
||||
_at_response_encode_cpin, /* CPIN */
|
||||
_at_response_encode_csq, /* CSQ */
|
||||
_at_response_encode_cesq, /* CESQ */
|
||||
_at_response_encode_clac, /* CLAC */
|
||||
_at_response_encode_cmee, /* CMEE */
|
||||
_at_response_encode_cnum, /* CNUM */
|
||||
_at_response_encode_clck, /* CLCK */
|
||||
_at_response_encode_cops, /* COPS */
|
||||
_at_response_encode_creg, /* CREG */
|
||||
_at_response_encode_cgatt, /* CGATT */
|
||||
_at_response_encode_cgreg, /* CGREG */
|
||||
_at_response_encode_cereg, /* CEREG */
|
||||
_at_response_encode_cgdcont, /* CGDCONT */
|
||||
_at_response_encode_cgact, /* CGACT */
|
||||
_at_response_encode_cgpaddr, /* CGPADDR */
|
||||
_at_response_encode_cgev, /* CGEV: unsolicited result */
|
||||
};
|
||||
|
||||
/* String representation of Packet Domain events (cf. network_pdn_state_t) */
|
||||
|
||||
Reference in New Issue
Block a user