board707 / w80x_arduino

w806 package for Arduino IDE
GNU Lesser General Public License v2.1
68 stars 12 forks source link

attachInterrupt error #22

Closed AnatolSher closed 1 year ago

AnatolSher commented 1 year ago

Привет! Тестировщики из поднебесной нарыли ошибку. Не верна последовательность параметров передаваемых в функцию attachInterrupt(), и нет заглушки для функции digitalPinToInterrupt(). Механизм присоединения пользовательской обработки прерывания на GPIO не соответствует текущей документации на Arduino

board707 commented 1 year ago

А подробнее?

AnatolSher commented 1 year ago

Это в документации Syntax attachInterrupt(digitalPinToInterrupt(pin), ISR, mode) (recommended) attachInterrupt(interrupt, ISR, mode) (not recommended) attachInterrupt(pin, ISR, mode) (Not recommended. Additionally, this syntax only works on Arduino SAMD Boards, Uno WiFi Rev2, Due, and 101.) А это в нашем примере gpio interrupt attachInterrupt(PB10, FALLING, &_irq_routine);

Физически работает. Только не соответствует :)

board707 commented 1 year ago

Понятно. Спасибо, будет исправлено в следующем релизе.

board707 commented 1 year ago

Fixed in 0ac89f4