zoukankan      html  css  js  c++  java
  • CC2541设置中断输入模式

    //P0.0

    /* SW_6 is at P0.1 */
    #define HAL_KEY_SW_6_PORT P0
    #define HAL_KEY_SW_6_BIT BV(0)
    #define HAL_KEY_SW_6_SEL P0SEL
    #define HAL_KEY_SW_6_DIR P0DIR

    /* edge interrupt */
    #define HAL_KEY_SW_6_EDGEBIT BV(0)
    #define HAL_KEY_SW_6_EDGE HAL_KEY_RISING_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(0) /* P0IEN - P0.1 enable/disable bit */
    #define HAL_KEY_SW_6_PXIFG P0IFG /* Interrupt flag at source */

    //P0.1

    /* SW_6 is at P0.1 */
    #define HAL_KEY_SW_6_PORT P0
    #define HAL_KEY_SW_6_BIT BV(0)
    #define HAL_KEY_SW_6_SEL P0SEL
    #define HAL_KEY_SW_6_DIR P0DIR

    /* edge interrupt */
    #define HAL_KEY_SW_6_EDGEBIT BV(1)
    #define HAL_KEY_SW_6_EDGE HAL_KEY_RISING_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 */

  • 相关阅读:
    angular js 自定义指令
    web api 解决跨域的问题
    angular 监听ngrepeat结束时间
    redis关闭和启动
    intellij idea快捷键
    mysql连接字符串
    crontab命令格式
    maven中scope属性的
    maven pom文件元素说明
    引入maven以外的jar包
  • 原文地址:https://www.cnblogs.com/zhaogaojian/p/7294313.html
Copyright © 2011-2022 走看看