1 /***************************************************************************//** 2 * \file cy_lvd_ht.c 3 * \version 1.10 4 * 5 * The source code file for the LVD HT driver. 6 * 7 ******************************************************************************** 8 * \copyright 9 * Copyright 2017-2020 Cypress Semiconductor Corporation 10 * SPDX-License-Identifier: Apache-2.0 11 * 12 * Licensed under the Apache License, Version 2.0 (the "License"); 13 * you may not use this file except in compliance with the License. 14 * You may obtain a copy of the License at 15 * 16 * http://www.apache.org/licenses/LICENSE-2.0 17 * 18 * Unless required by applicable law or agreed to in writing, software 19 * distributed under the License is distributed on an "AS IS" BASIS, 20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 * See the License for the specific language governing permissions and 22 * limitations under the License. 23 *******************************************************************************/ 24 25 #include "cy_device.h" 26 27 #if (defined (CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION >= 2)) || defined(CY_DOXYGEN) 28 29 #include "cy_lvd_ht.h" 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif 34 35 36 /******************************************************************************* 37 * Function Name: Cy_LVD_HT_DeepSleepCallback 38 ****************************************************************************//** 39 * 40 * When this function is registered by \ref Cy_SysPm_RegisterCallback - it 41 * automatically enables the LVD after wake up from Deep-Sleep mode. 42 * 43 * \param callbackParams The pointer to the callback parameters structure, 44 * see \ref cy_stc_syspm_callback_params_t. 45 * 46 * \param mode 47 * Callback mode, see \ref cy_en_syspm_callback_mode_t 48 * 49 * \return the SysPm callback status \ref cy_en_syspm_status_t. 50 * 51 *******************************************************************************/ Cy_LVD_HT_DeepSleepCallback(cy_stc_syspm_callback_params_t * callbackParams,cy_en_syspm_callback_mode_t mode)52cy_en_syspm_status_t Cy_LVD_HT_DeepSleepCallback(cy_stc_syspm_callback_params_t * callbackParams, cy_en_syspm_callback_mode_t mode) 53 { 54 cy_en_syspm_status_t ret = CY_SYSPM_SUCCESS; 55 56 if (callbackParams != NULL) 57 { 58 switch(mode) 59 { 60 case CY_SYSPM_CHECK_READY: 61 case CY_SYSPM_CHECK_FAIL: 62 case CY_SYSPM_BEFORE_TRANSITION: 63 break; 64 65 case CY_SYSPM_AFTER_TRANSITION: 66 Cy_LVD_HT_Enable(CY_LVD_HT_SELECT_LVD_1); 67 Cy_LVD_HT_Enable(CY_LVD_HT_SELECT_LVD_2); 68 break; 69 70 default: 71 ret = CY_SYSPM_FAIL; 72 break; 73 } 74 } 75 return (ret); 76 } 77 78 79 #ifdef __cplusplus 80 } 81 #endif 82 83 #endif // (defined (CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION >= 2)) 84 /* [] END OF FILE */ 85