1 /***********************************************************************************************//**
2 * \file cyabs_freertos_dsram.c
3 *
4 * \brief
5 * Provides implementations for functions required to enable deepsleep ram.
6 *
7 ***************************************************************************************************
8 * \copyright
9 * Copyright 2018-2022 Cypress Semiconductor Corporation (an Infineon company) or
10 * an affiliate of Cypress Semiconductor Corporation
11 *
12 * SPDX-License-Identifier: Apache-2.0
13 *
14 * Licensed under the Apache License, Version 2.0 (the "License");
15 * you may not use this file except in compliance with the License.
16 * You may obtain a copy of the License at
17 *
18 * http://www.apache.org/licenses/LICENSE-2.0
19 *
20 * Unless required by applicable law or agreed to in writing, software
21 * distributed under the License is distributed on an "AS IS" BASIS,
22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 * See the License for the specific language governing permissions and
24 * limitations under the License.
25 **************************************************************************************************/
26 #include <stdlib.h>
27 #include "cy_utils.h"
28 #include "cyabs_rtos.h"
29 #include "cyabs_rtos_dsram.h"
30
31 //--------------------------------------------------------------------------------------------------
32 // vStoreDSRAMContextWithWFI
33 //--------------------------------------------------------------------------------------------------
vStoreDSRAMContextWithWFI(void)34 void vStoreDSRAMContextWithWFI(void) /* __attribute__ (( naked )) PRIVILEGED_FUNCTION */
35 {
36 CY_ASSERT(0);
37 }
38
39
40 //--------------------------------------------------------------------------------------------------
41 // vRestoreDSRAMContext
42 //--------------------------------------------------------------------------------------------------
vRestoreDSRAMContext(void)43 void vRestoreDSRAMContext(void)
44 {
45 CY_ASSERT(0);
46 }
47
48
49 //--------------------------------------------------------------------------------------------------
50 // cyabs_dsram_enter_dsram
51 //--------------------------------------------------------------------------------------------------
cyabs_rtos_enter_dsram(void)52 void cyabs_rtos_enter_dsram(void)
53 {
54 vStoreDSRAMContextWithWFI();
55 }
56
57
58 //--------------------------------------------------------------------------------------------------
59 // cyabs_dsram_exit_dsram
60 //--------------------------------------------------------------------------------------------------
cyabs_rtos_exit_dsram(void)61 void cyabs_rtos_exit_dsram(void)
62 {
63 vRestoreDSRAMContext();
64 }
65