Merge pull request #7920 from li-ho/aducm3029_sys_return_code

Resolve duplicate ADuCM3029 system return code
pull/8187/head
Martin Kojtal 2018-09-19 14:19:25 +02:00 committed by GitHub
commit c4e0fc6d11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View File

@ -259,8 +259,8 @@ void adi_system_EnableISRAM(bool bEnable)
* \n
* \n false :To disable retention during the hibernation.
* \n
* @return : SUCCESS : Configured successfully.
* FAILURE : For invalid bank.
* @return : ADI_SYS_SUCCESS : Configured successfully.
* ADI_SYS_FAILURE : For invalid bank.
* @note: Please note that respective linker file need to support the configuration. Only BANK-1 and
BANK-2 of SRAM is valid.
*/
@ -269,7 +269,7 @@ uint32_t adi_system_EnableRetention(ADI_SRAM_BANK eBank,bool bEnable)
#ifdef ADI_DEBUG
if((eBank != ADI_SRAM_BANK_1) && (eBank != ADI_SRAM_BANK_2))
{
return FAILURE;
return ADI_SYS_FAILURE;
}
#endif
pADI_PMG0->PWRKEY = PWRKEY_VALUE_KEY;
@ -282,5 +282,5 @@ uint32_t adi_system_EnableRetention(ADI_SRAM_BANK eBank,bool bEnable)
pADI_PMG0->SRAMRET &= ~((uint32_t)eBank >> 1);
}
return SUCCESS;
return ADI_SYS_SUCCESS;
}

View File

@ -40,9 +40,12 @@ extern "C" {
#endif /* __cplusplus */
/*! \cond PRIVATE */
#define SUCCESS 0u
#define FAILURE 1u
/*! System API function return codes */
typedef enum
{
ADI_SYS_SUCCESS = 0, /*!< No error detected. */
ADI_SYS_FAILURE, /*!< The API call failed. */
} ADI_SYS_RESULT;
/* System clock constant */
#define __HFOSC 26000000u