WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
los_deepsleep_pri.h
浏览该文件的文档.
1/* ----------------------------------------------------------------------------
2 * Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved.
3 * Description: Low-power Framework.
4 * Author: Huawei LiteOS Team
5 * Create: 2020-10-27
6 * Redistribution and use in source and binary forms, with or without modification,
7 * are permitted provided that the following conditions are met:
8 * 1. Redistributions of source code must retain the above copyright notice, this list of
9 * conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, this list
11 * of conditions and the following disclaimer in the documentation and/or other materials
12 * provided with the distribution.
13 * 3. Neither the name of the copyright holder nor the names of its contributors may be used
14 * to endorse or promote products derived from this software without specific prior written
15 * permission.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
20 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
25 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 * --------------------------------------------------------------------------- */
28
29#ifndef _LOS_DEEPSLEEP_H
30#define _LOS_DEEPSLEEP_H
31
32#include "los_task_pri.h"
33
40
41#if defined(LOSCFG_KERNEL_RUNSTOP) || defined(LOSCFG_KERNEL_DEEPSLEEP)
42/* Is system is up from the memory image, then this flag should be 1; else 0 */
43extern INT32 g_resumeFromImg;
44extern INTPTR g_otherCoreResume;
45
46extern VOID OsSRSaveRegister(VOID);
47extern VOID OsSRRestoreRegister(VOID);
48
49#ifdef LOSCFG_KERNEL_SMP
50extern VOID release_secondary_cores(VOID);
51#endif
52
53#ifdef LOSCFG_AARCH64
54/*
55 * 34: The number of task context registers(X0~X30, SP, DAIF, NZCV)
56 * 3: The number of available universal registers(X0, X1, X2) temporarily saved
57 */
58#define OS_TASK_REG_NUM 34
59#define OS_UNI_REG_NUM 3
60extern UINT64 g_saveSRContext[OS_TASK_REG_NUM];
61extern UINT64 g_saveAR[OS_UNI_REG_NUM];
62#elif defined LOSCFG_ARCH_RISCV32
63#define OS_TASK_REG_NUM 128
64extern UINT32 g_saveSRContext[OS_TASK_REG_NUM];
65#else
66/*
67 * 18: The number of task context registers(R0~R15, SPSR, CPSR)
68 * 2: The number of available universal registers(R0, R1) temporarily saved
69 */
70#define OS_TASK_REG_NUM 18
71#define OS_UNI_REG_NUM 2
72extern UINT32 g_saveSRContext[LOSCFG_KERNEL_CORE_NUM][OS_TASK_REG_NUM];
73extern UINT32 g_saveAR[OS_UNI_REG_NUM];
74extern LosTaskCB *g_saveTsk[LOSCFG_KERNEL_CORE_NUM];
75#define INTERMIT_REGISTER_NUM 30
76extern UINT32 g_regBackupBuf[INTERMIT_REGISTER_NUM];
77#endif
78#endif
79#endif // _LOS_DEEPSLEEP_H
#define LOSCFG_KERNEL_CORE_NUM
Definition los_config.h:258
LosResetMode
Definition los_deepsleep_pri.h:34
@ LOS_RUN_STOP_RESET
Definition los_deepsleep_pri.h:36
@ LOS_DEEP_SLEEP_RESET
Definition los_deepsleep_pri.h:37
@ LOS_COLD_RESET
Definition los_deepsleep_pri.h:35
@ LOS_INTERMIT_STANDBY_RESET
Definition los_deepsleep_pri.h:38
signed int INT32
Definition los_typedef.h:55
unsigned long long UINT64
Definition los_typedef.h:72
#define VOID
Definition los_typedef.h:88
unsigned int UINT32
Definition los_typedef.h:52
signed int INTPTR
Definition los_typedef.h:75
Definition los_task_base.h:131