1、在 - ioCC2530.h -中这两个函数是干什么的呢?
SFRBIT( IEN0 , 0xA8, EA, _IEN06, STIE, ENCIE, URX1IE, URX0IE, ADCIE, RFERRIE )
SFR( IP0 , 0xA9 ) /* Interrupt Priority 0
2、
HAL_TURN_OFF_LED1();
#define HAL_TURN_OFF_LED1() st( LED1_SBIT = LED1_POLARITY (0); )
#define LED1_POLARITY ACTIVE_HIGH
#define ACTIVE_LOW !
#define ACTIVE_HIGH !! /* double negation forces result to be '1' */
3、
// Vdd/3 / Internal Reference X ENOB --> (Vdd / 3) / 1.15 X 127
#define VDD_2_0 74 // 2.0 V required to safely read/write internal flash.
#define VDD_2_7 100 // 2.7 V required for the Numonyx device.
#define VDD_MIN_RUN VDD_2_0
Vdd / 3到底是多少啊?
4、
// Initialization levels
#define OB_COLD 0
#define OB_WARM 1
#define OB_READY 2
5、
// Reset bit definitions
#define LRESET 0x18 // Last reset bit mask
#define RESETPO 0x00 // Power-On reset
#define RESETEX 0x08 // External reset
#define RESETWD 0x10 // WatchDog reset
6、
// IAR does not zero-out this byte below the XSTACK.
*(uint8 *)0x0 = 0;
7、
#define HAL_ASSERT(expr) st( if (!( expr )) halAssertHandler(); )
8、
/* Initialize Key stuff */
HalKeyConfig(HAL_KEY_INTERRUPT_DISABLE, OnBoard_KeyCallback);
PICTL &= ~(HAL_KEY_SW_6_EDGEBIT); /* Clear the edge bit */
P0ICON=1 时输入的下降沿引起中断,P0ICON=0时输入的上升沿引起中断
9、
/* edge interrupt */
#define HAL_KEY_SW_6_EDGEBIT BV(0)
#define HAL_KEY_SW_6_EDGE HAL_KEY_FALLING_EDGE
/* SW_6 interrupts */
#define HAL_KEY_SW_6_IEN IEN1 /* CPU interrupt mask register */
#define HAL_KEY_SW_6_IENBIT BV(5) /* Mask bit for all of Port_0 */
#define HAL_KEY_SW_6_ICTL P0IEN /* Port Interrupt Control register */
#define HAL_KEY_SW_6_ICTLBIT BV(1) /* P0IEN - P0.1 enable/disable bit */
#define HAL_KEY_SW_6_PXIFG P0IFG /* Interrupt flag at source */