Hello,
I want to implement Interrupt in P1_6. I revise the code in hal_key.c,
/* SW_6 is at P1.6 */
#define HAL_KEY_SW_6_PORT P1
#define HAL_KEY_SW_6_BIT BV(1)
#define HAL_KEY_SW_6_SEL P1SEL
#define HAL_KEY_SW_6_DIR P1DIR
/* edge interrupt */
#define HAL_KEY_SW_6_EDGEBIT BV(2)
#define HAL_KEY_SW_6_EDGE HAL_KEY_RISING_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 P1IEN /* Port Interrupt Control register */
#define HAL_KEY_SW_6_ICTLBIT BV(6) /* P0IEN - P0.1 enable/disable bit */
#define HAL_KEY_SW_6_PXIFG P1IFG /* Interrupt flag at source */
I am expecting interrupt in key function,
if ( keys & HAL_KEY_SW_2 )
{
}
But I am unable get. Is my config is correct for P1.6. or any thing I need to change in the below code of hal_key.c. I am want rising interrupt