/* Enable or disable flash cache sleep mode. 
This function enables or disables flash cache sleep mode.  */
uint32_t am_hal_cachectrl_sleep_mode_enable(uint32_t ui32EnableMask, uint32_t ui32DisableMask)
/* Enable or disable flash cache sleep mode. 
This function enables or disables flash cache sleep mode.  */
uint32_t am_hal_cachectrl_sleep_mode_enable(uint32_t ui32EnableMask, uint32_t ui32DisableMask)
{
    uint32_t ui32Ret = am_hal_cachectrl_sleep_mode_status();
    if ( ui32DisableMask & 0x1 )
    {
        AM_REG(CACHECTRL, CACHECTRL) |= AM_REG_CACHECTRL_CACHECTRL_FLASH0_SLM_DISABLE_M;
    }
    if ( ui32DisableMask & 0x2 )
    {
        AM_REG(CACHECTRL, CACHECTRL) |= AM_REG_CACHECTRL_CACHECTRL_FLASH1_SLM_DISABLE_M;
    }
    if ( ui32EnableMask & 0x1 )
    {
        AM_REG(CACHECTRL, CACHECTRL) |= AM_REG_CACHECTRL_CACHECTRL_FLASH0_SLM_ENABLE_M;
    }
    if ( ui32EnableMask & 0x2 )
    {
        AM_REG(CACHECTRL, CACHECTRL) |= AM_REG_CACHECTRL_CACHECTRL_FLASH1_SLM_ENABLE_M;
    }
    return ui32Ret;
}