本帖最后由 ihafd 于 2012-9-26 23:08 编辑
我在430的头文件里找到一些函数.
我也在某些示例程序里面见过这些,但还是不很了解,
__intrinsic void __no_operation(void);
__intrinsic void __enable_interrupt(void);
__intrinsic void __disable_interrupt(void);
__intrinsic istate_t __get_interrupt_state(void);
__intrinsic void __set_interrupt_state(istate_t);
__intrinsic void __op_code(unsigned short);
__intrinsic unsigned short __swap_bytes(unsigned short);
__intrinsic void __bic_SR_register(unsigned short);
__intrinsic void __bis_SR_register(unsigned short);
__intrinsic unsigned short __get_SR_register(void);
__intrinsic void __bic_SR_register_on_exit(unsigned short);
__intrinsic void __bis_SR_register_on_exit(unsigned short);
__intrinsic unsigned short __get_SR_register_on_exit(void);
还有
__intrinsic unsigned short _BIS_SR(unsigned short);
__intrinsic unsigned short _BIC_SR(unsigned short);
__intrinsic unsigned short _BIS_SR_IRQ(unsigned short);
__intrinsic unsigned short _BIC_SR_IRQ(unsigned short);
__intrinsic unsigned short _BIS_NMI_IE1(unsigned short);
还有
#define _DINT() __disable_interrupt()
#define _EINT() __enable_interrupt()
#define _NOP() __no_operation()
#define _OPC(x) __op_code(x)
#define _SWAP_BYTES(x) __swap_bytes(x)
它们是什么意思?怎样用的? |