📄 power_ctrl.h
字号:
/*************************************************************************
*
* Used with ICCARM and AARM.
*
* (c) Copyright IAR Systems 2007
*
* File name : power_ctrl.h
* Description : Power control low level functions include file
*
* History :
* 1. Date : January 18, 2006
* Author : Stanimir Bonev
* Description : Create
*
* $Revision: 1.0 $
**************************************************************************/
#ifndef __POWER_CTRL_H
#define __POWER_CTRL_H
#include "RTOS.H"
#include "ctrl_task.h"
#define _P0_BATT_CTRL_MASK (1UL << 2)
#define _P0_JATG_RST_MASK (1UL << 3)
typedef enum _SupplyType_t
{
BATT_SUPPLY = 0, EXT_SUPPLY
} SupplyType_t;
/*************************************************************************
* Function Name: EXTIT_Handler
* Parameters: none
* Return: none
*
* Description: External interrupt handler. Enable JTAG interface and
* release JLink controller reset and turn off battery supply
*
*************************************************************************/
__fiq __arm void FIQ_Handler(void);
/*************************************************************************
* Function Name: PowerCrltInit
* Parameters: none
* Return: none
*
* Description: Init power type detection and turn off/on J-Link controller
*
*************************************************************************/
void PowerCrltInit(void);
/*************************************************************************
* Function Name: GetSupplyType
* Parameters: none
* Return: SupplyType_t
*
* Description: Return current supply type (external / battery)
*
*************************************************************************/
SupplyType_t GetSupplyType(void);
/*************************************************************************
* Function Name: BattSuppOff
* Parameters: none
* Return: none
*
* Description: Turn off battery supply
*
*************************************************************************/
void BattSuppOff(void);
/*************************************************************************
* Function Name: BattSuppOn
* Parameters: none
* Return: none
*
* Description: Turn on battery supply
*
*************************************************************************/
void BattSuppOn(void);
/*************************************************************************
* Function Name: Discharge
* Parameters: none
* Return: none
*
* Description: Discharge 3.3 volts supply capacitors
*
*************************************************************************/
void Discharge(void);
/*************************************************************************
* Function Name: StandBy
* Parameters: none
* Return: none
*
* Description: Turn off board's supply
*
*************************************************************************/
void StandBy (void);
#endif // __POWER_CTRL_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -