Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attachInterrupt error #22

Closed
AnatolSher opened this issue Aug 3, 2023 · 4 comments
Closed

attachInterrupt error #22

AnatolSher opened this issue Aug 3, 2023 · 4 comments

Comments

@AnatolSher
Copy link

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

@board707
Copy link
Owner

board707 commented Aug 3, 2023

А подробнее?

@AnatolSher
Copy link
Author

AnatolSher commented Aug 3, 2023

Это в документации
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
Copy link
Owner

board707 commented Aug 3, 2023

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

@board707
Copy link
Owner

board707 commented Aug 7, 2023

Fixed in 0ac89f4

@board707 board707 closed this as completed Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants