请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
部件号:CC2530 你(们)好
我有这个电路
我将簧片继电器连接到引脚1.5 ,并用1K电阻器将其脉冲起来
现在,我想在触发时阅读它
我应该包括什么库才能做到这一点?
什么功能?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
你(们)好
我有这个电路
我将簧片继电器连接到引脚1.5 ,并用1K电阻器将其脉冲起来
现在,我想在触发时阅读它
我应该包括什么库才能做到这一点?
什么功能?
/*中断选项-启用或禁用*/ #define HAL_KEY_INTERRUST_DISABLE 0x00 #define HAL_KEY_INTERRUINT_ENABLE 0x01 /*密钥状态- SHIFT或nornal */ #define HAL_KEY_STATE _NORMAL 0x00 #define HAL_KEY_STATE 0x01 #define HAL_KEY_SW_1 0x01 // Joystick up #define HAL_KEY_SW_2 0x02 // Joystick right #define HAL_KEY_SW_5 0x04 // Joystick center #define HAL_KEY_SW_4 0x08 // Joystick Left #define HAL_key_SW_3 0x10// Joystick down #define HAL_SW_20 /SW_keys 可用 时#20 #define HAL_KEY_UP 0x01 // Joystick Up #define HAL_KEY_RIGHT 0x02 // Joystick Right #define HAL_KEY_CENTER 0x04 // Joystick center #define HAL_KEY_LEFT 0x08 // Joystick Left #define HAL_KEY_DOWN 0x10 // Joystick Down /* buttons */ #define HAL_PUSH_button_RIGHT 0x01 // button #define HAL_LEFT #define HAL_0x02 button /HAL_SELECT button #define button #define HAL_0x04 HAL_KEY_BUTTON向上 0x40 //向上按钮 #define HAL_KEY_BUTTON向下按钮0x80 //向下按钮
它适用于具有操纵杆和按钮等的某些板
他们不会对其进行注释以了解他们配置为HAL_PUSH_BUTTON _RIGHT的引脚
只需看看那些荒谬的代码。
端口的哪个位置是单个引脚? 我如何知道他们在该代码中谈论的PIN