HI,管理员&各社员:
keyKeyFobDemo KEY的值想更改为pin 1.5,请问更改地方在哪,我找不到
Susan Yang:
hal_board_cfg.h文件内
hu hu1:
回复 Susan Yang:
这个文件是什么来的。
我通过参考帖子
http://www.deyisupport.com/question_answer/wireless_connectivity/bluetooth/f/103/t/48143.aspx?pi2132219853=2
把按键广播可以成功换到P0.0,
但我换P1.5时候出现下面警告
Warning[w52]: More than one definition for the byte at address 0x7b in common segment INTVEC. It is defined in module "hal_key" as well as in module "Port_INT"
操作失败
hu hu1:
回复 Susan Yang:
警告原因找到了,原来在别的地方定义了中断函数,
更高代码部分
#define HAL_KEY_SW_2_PORT P1#define HAL_KEY_SW_2_BIT BV(5)
#define HAL_KEY_SW_2_SEL P1SEL#define HAL_KEY_SW_2_DIR P1DIR
#define HAL_KEY_SW_2_IEN IEN2 // CPU interrupt mask register#define HAL_KEY_SW_2_ICTL P1IEN // Port Interrupt Control register#define HAL_KEY_SW_2_ICTLBIT BV(5) // P0IEN – P0.1 enable/disable bit#define HAL_KEY_SW_2_IENBIT BV(4) // Mask bit for all of Port_0 #define HAL_KEY_SW_2_PXIFG P1IFG // Interrupt flag at source
#define HAL_KEY_SW_2_EDGEBIT BV(2)#define HAL_KEY_SW_2_EDGE HAL_KEY_FALLING_EDGE
我改成P0口可以进入中断,但改成P1部可以