CC2640如何设置上升沿触发和下降沿触发??
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.
/** @brief Control interrupt enable and edge for pin * * @param handle Handle provided by previous call to PIN_open() * @param pinCfg #PIN_Config entry identifying pin ID and relevant pin * configuration as combinations of: * - #PIN_IRQ_DIS (default) * - #PIN_IRQ_POSEDGE * - #PIN_IRQ_NEGEDGE * - #PIN_IRQ_BOTHEDGES * @return #PIN_SUCCESS if successful, else error code * @note Any pending interrupts on pins that have not had interrupt enabled * will be cleared when enabling interrupts * @par Usage * @code * PIN_setInterrupt(hPins, PIN_ID(8)|PIN_IRQ_POSEDGE); * @endcode */ extern PIN_Status PIN_setInterrupt(PIN_Handle handle, PIN_Config pinCfg); 例程是直接在PIN_Config 里设置了