mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #7920 from li-ho/aducm3029_sys_return_code
Resolve duplicate ADuCM3029 system return codepull/8187/head
commit
c4e0fc6d11
|
@ -259,8 +259,8 @@ void adi_system_EnableISRAM(bool bEnable)
|
||||||
* \n
|
* \n
|
||||||
* \n false :To disable retention during the hibernation.
|
* \n false :To disable retention during the hibernation.
|
||||||
* \n
|
* \n
|
||||||
* @return : SUCCESS : Configured successfully.
|
* @return : ADI_SYS_SUCCESS : Configured successfully.
|
||||||
* FAILURE : For invalid bank.
|
* ADI_SYS_FAILURE : For invalid bank.
|
||||||
* @note: Please note that respective linker file need to support the configuration. Only BANK-1 and
|
* @note: Please note that respective linker file need to support the configuration. Only BANK-1 and
|
||||||
BANK-2 of SRAM is valid.
|
BANK-2 of SRAM is valid.
|
||||||
*/
|
*/
|
||||||
|
@ -269,7 +269,7 @@ uint32_t adi_system_EnableRetention(ADI_SRAM_BANK eBank,bool bEnable)
|
||||||
#ifdef ADI_DEBUG
|
#ifdef ADI_DEBUG
|
||||||
if((eBank != ADI_SRAM_BANK_1) && (eBank != ADI_SRAM_BANK_2))
|
if((eBank != ADI_SRAM_BANK_1) && (eBank != ADI_SRAM_BANK_2))
|
||||||
{
|
{
|
||||||
return FAILURE;
|
return ADI_SYS_FAILURE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
pADI_PMG0->PWRKEY = PWRKEY_VALUE_KEY;
|
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);
|
pADI_PMG0->SRAMRET &= ~((uint32_t)eBank >> 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return SUCCESS;
|
return ADI_SYS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,9 +40,12 @@ extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
/*! \cond PRIVATE */
|
/*! \cond PRIVATE */
|
||||||
#define SUCCESS 0u
|
/*! System API function return codes */
|
||||||
|
typedef enum
|
||||||
#define FAILURE 1u
|
{
|
||||||
|
ADI_SYS_SUCCESS = 0, /*!< No error detected. */
|
||||||
|
ADI_SYS_FAILURE, /*!< The API call failed. */
|
||||||
|
} ADI_SYS_RESULT;
|
||||||
|
|
||||||
/* System clock constant */
|
/* System clock constant */
|
||||||
#define __HFOSC 26000000u
|
#define __HFOSC 26000000u
|
||||||
|
|
Loading…
Reference in New Issue