1 /*******************************************************************************
2 * File Name: NOR_CTL_PM.c
6 * This file contains the setup, control, and status commands to support
7 * the component operation in the low power mode.
11 ********************************************************************************
12 * Copyright 2015, Cypress Semiconductor Corporation. All rights reserved.
13 * You may use this file only in accordance with the license, terms, conditions,
14 * disclaimers, and limitations in the end user license agreement accompanying
15 * the software package with which this file was provided.
16 *******************************************************************************/
20 /* Check for removal by optimization */
21 #if !defined(NOR_CTL_Sync_ctrl_reg__REMOVED)
23 static NOR_CTL_BACKUP_STRUCT NOR_CTL_backup = {0u};
26 /*******************************************************************************
27 * Function Name: NOR_CTL_SaveConfig
28 ********************************************************************************
31 * Saves the control register value.
39 *******************************************************************************/
40 void NOR_CTL_SaveConfig(void)
42 NOR_CTL_backup.controlState = NOR_CTL_Control;
46 /*******************************************************************************
47 * Function Name: NOR_CTL_RestoreConfig
48 ********************************************************************************
51 * Restores the control register value.
60 *******************************************************************************/
61 void NOR_CTL_RestoreConfig(void)
63 NOR_CTL_Control = NOR_CTL_backup.controlState;
67 /*******************************************************************************
68 * Function Name: NOR_CTL_Sleep
69 ********************************************************************************
72 * Prepares the component for entering the low power mode.
80 *******************************************************************************/
81 void NOR_CTL_Sleep(void)
87 /*******************************************************************************
88 * Function Name: NOR_CTL_Wakeup
89 ********************************************************************************
92 * Restores the component after waking up from the low power mode.
100 *******************************************************************************/
101 void NOR_CTL_Wakeup(void)
103 NOR_CTL_RestoreConfig();
106 #endif /* End check for removal by optimization */