Open vuhazu opened 5 months ago
i change interrupt function, build ok, but not working
void RCSwitch::enableReceive() { if (this->nReceiverInterrupt != -1) { RCSwitch::nReceivedValue = 0; RCSwitch::nReceivedBitlength = 0;
wiringPiISR(this->nReceiverInterrupt, INT_EDGE_BOTH, &handleInterrupt);
attachInterrupt(this->nReceiverInterrupt,GPIO_Mode_IPU, handleInterrupt, EXTI_Mode_Interrupt, EXTI_Trigger_Rising_Falling );
attachInterrupt(this->nReceiverInterrupt, handleInterrupt, CHANGE);
} }
CH32X035 interrupt function
void attachInterrupt(uint32_t pin,GPIOMode_TypeDef io_mode, void (*callback)(void), EXTIMode_TypeDef it_mode, EXTITrigger_TypeDef trigger_mode); void detachInterrupt(uint32_t pin);
i change interrupt function, build ok, but not working
void RCSwitch::enableReceive() { if (this->nReceiverInterrupt != -1) { RCSwitch::nReceivedValue = 0; RCSwitch::nReceivedBitlength = 0;
if defined(RaspberryPi) // Raspberry Pi
elif defined(CH32X035) // CH32x035
else // ARDUINO
endif
} }