hal_int.h

来自「CC2500 2.4G无线收发模块的演示程序」· C头文件 代码 · 共 51 行

H
51
字号
/***********************************************************************************
    Filename: hal_int.h

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

#ifndef HAL_INT_H
#define HAL_INT_H

#ifdef __cplusplus
extern "C" {
#endif

#include <hal_types.h>


//----------------------------------------------------------------------------------
// MACROS
//----------------------------------------------------------------------------------

#ifdef __ICC430__

// Use the macros below to reduce function call overhead for common
// global interrupt control functions

#define HAL_INT_ON(x)      st( __enable_interrupt();)
#define HAL_INT_OFF(x)     st( __disable_interrupt();)
#define HAL_INT_LOCK(x)    st( (x) = __get_interrupt_state(); __disable_interrupt();)
#define HAL_INT_UNLOCK(x)  st( __set_interrupt_state(x);)

#else
#error "Unsupported compiler"
#endif

//----------------------------------------------------------------------------------
// Function declarations
//----------------------------------------------------------------------------------

void   halIntOn(void);
void   halIntOff(void);
uint16 halIntLock(void);
void   halIntUnlock(uint16 key);


#ifdef  __cplusplus
}
#endif

/**********************************************************************************/
#endif

⌨️ 快捷键说明

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