StdPJ/Core/Src/Common/Shared/iot_flash_config.c
/**
  * @brief  Check whether the C2C parameters are present in Flash memory.
  *         Returns the parameters if present.
  * @param  Out:  oper_ap_code       SIM operator Access Point code
  * @param  Out:  username           username
  * @param  Out:  password           password
  * @param  Out:  use_internal_sim  Use the embedded SIM rather than the external slot
  * @retval   0 if the parameters are present in Flash.
  *          -1 if the parameters are not present in Flash.
  */
@brief  Check whether the C2C parameters are present in Flash memory.
Returns the parameters if present.
@brief Check whether the C2C parameters are present in Flash memory . Returns the parameters if present .
int checkC2cCredentials(const char ** const oper_ap_code, const char ** const username, const char ** const password, bool * use_internal_sim)
{
  bool is_soapc_present = 0;
  if (lUserConfigPtr->c2c_config.magic == USER_CONF_MAGIC)
  {
    is_soapc_present = true;
    if (oper_ap_code == NULL)
    {
      return -2;
    }
    *use_internal_sim = lUserConfigPtr->c2c_config.use_internal_sim;
    *oper_ap_code = lUserConfigPtr->c2c_config.oper_ap_code;
    *username = lUserConfigPtr->c2c_config.username;
    *password = lUserConfigPtr->c2c_config.password;
  }
  return (is_soapc_present) ? 0 : -1;
}
int checkC2cCredentials ( const char * * const oper_ap_code , const char * * const username , const char * * const password , bool * use_internal_sim ) { bool is_soapc_present = 0 ; if ( lUserConfigPtr -> c2c_config . magic == USER_CONF_MAGIC ) { is_soapc_present = true ; if ( oper_ap_code == NULL ) { return -2 ; } * use_internal_sim = lUserConfigPtr -> c2c_config . use_internal_sim ; * oper_ap_code = lUserConfigPtr -> c2c_config . oper_ap_code ; * username = lUserConfigPtr -> c2c_config . username ; * password = lUserConfigPtr -> c2c_config . password ; } return ( is_soapc_present ) ? 0 : -1 ; }
@brief  Check whether the C2C parameters are present in Flash memory.
@brief Check whether the C2C parameters are present in Flash memory .