its_int.c

来自「program show the communication of CC100-」· C语言 代码 · 共 60 行

C
60
字号
/***********************************************************************************
    Filename: ITS_int.c

    Copyright 2007 Texas Instruments, Inc.
***********************************************************************************/

#include "ITS_types.h"
#include "ITS_defs.h"
#include "ITS_int.h"
#include "ITS_board.h"


//----------------------------------------------------------------------------------
//  void ITSIntOn(void)
//
//  DESCRIPTION:
//    Enable global interrupts.
//----------------------------------------------------------------------------------
void ITSIntOn(void)
{
    HAL_INT_ON();
}

//----------------------------------------------------------------------------------
//  void ITSIntOff(void)
//
//  DESCRIPTION:
//    Turns global interrupts off.
//----------------------------------------------------------------------------------
void ITSIntOff(void)
{
    HAL_INT_OFF();
}

//----------------------------------------------------------------------------------
//  uint16 ITSIntLock(void)
//
//  DESCRIPTION:
//    Turns global interrupts off and returns current interrupt state.
//    Should always be used together with ITSIntUnlock().
//----------------------------------------------------------------------------------
uint16 ITSIntLock(void)
{
    char key;
    HAL_INT_LOCK(key);
    return(key);
}

//----------------------------------------------------------------------------------
//  void ITSIntUnlock(uint16 key)
//
//  DESCRIPTION:
//    Set interrupt state back to the state it had before calling ITSIntLock().
//    Should always be used together with ITSIntLock().
//----------------------------------------------------------------------------------
void ITSIntUnlock(uint16 key)
{
    HAL_INT_UNLOCK(key);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?