Skip to content

CH32X035 how to work #511

Description

@vuhazu

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
wiringPiISR(this->nReceiverInterrupt, INT_EDGE_BOTH, &handleInterrupt);
#elif defined(CH32X035) // CH32x035
attachInterrupt(this->nReceiverInterrupt,GPIO_Mode_IPU, handleInterrupt, EXTI_Mode_Interrupt, EXTI_Trigger_Rising_Falling );
#else // ARDUINO
attachInterrupt(this->nReceiverInterrupt, handleInterrupt, CHANGE);
#endif
}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions