allexoK / Esp32-C6-Bug-Arduino-Examples

Apache License 2.0
18 stars 3 forks source link

Where are the definitions of enableInterrupt and disableInterrupt? #1

Closed HonestQiao closed 8 months ago

HonestQiao commented 8 months ago

ENV: Arduino: 2.3.2 Arduino-ESP32: 3.0.0-alpha OS: macOS 11.7 Board: ESP32-C6-N4

These are a series of excellent examples. But, When I compiled the Zigbee_Light_Switch, an error occurred:

In file included from /Users/HonestQiao/Documents/Arduino/ESP32C6/Esp32-C6-Bug-Arduino-Examples/examples/esp32c6bugzigbeemqttbridge/Zigbee_Light_Switch/Zigbee_Light_Switch.ino:31:
/Users/HonestQiao/Documents/Arduino/ESP32C6/Esp32-C6-Bug-Arduino-Examples/examples/esp32c6bugzigbeemqttbridge/Zigbee_Light_Switch/Zigbee.h: In function 'void switch_gpios_intr_enabled(bool)':
/Users/HonestQiao/Documents/Arduino/ESP32C6/Esp32-C6-Bug-Arduino-Examples/examples/esp32c6bugzigbeemqttbridge/Zigbee_Light_Switch/Zigbee.h:214:13: error: 'enableInterrupt' was not declared in this scope; did you mean 'detachInterrupt'?
  214 |             enableInterrupt((button_func_pair[i]).pin);
      |             ^~~~~~~~~~~~~~~
      |             detachInterrupt
/Users/HonestQiao/Documents/Arduino/ESP32C6/Esp32-C6-Bug-Arduino-Examples/examples/esp32c6bugzigbeemqttbridge/Zigbee_Light_Switch/Zigbee.h:216:13: error: 'disableInterrupt' was not declared in this scope; did you mean 'detachInterrupt'?
  216 |             disableInterrupt((button_func_pair[i]).pin);
      |             ^~~~~~~~~~~~~~~~
      |             detachInterrupt

exit status 1

Compilation error: 'enableInterrupt' was not declared in this scope; did you mean 'detachInterrupt'?

I searched the Arduino-ESP32 library and found no trace of these two functions.

@allexoK

allexoK commented 8 months ago

Thanks @HonestQiao, the examples are based on official Arduino Zigbee examples so it would be unfair for me to take all the credit:) I checked out the problem, seems like I actually pushed the wrong example(switch coordinator instead of light-bulb end device), now it should be fine, here is Zigbee_Light_Bulb.

HonestQiao commented 8 months ago

Thanks @HonestQiao, the examples are based on official Arduino Zigbee examples so it would be unfair for me to take all the credit:) I checked out the problem, seems like I actually pushed the wrong example(switch coordinator instead of light-bulb end device), now it should be fine, here is Zigbee_Light_Bulb.

Thank you very much for those work. I have also made a few minor optimizations and submitted a pull request : #2

HonestQiao commented 8 months ago

My ESP32-C6 boards:

Light Blub: (Small Board) DFRobot Beetle ESP32 C6

Bridge: (Big Board) DFRobot FireBeetle 2 ESP32 C6

image

allexoK commented 8 months ago

@HonestQiao Thanks for adding WiFi support!