ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Четверг
28 марта
944068 Топик полностью
LightElf (03.09.2019 09:54 - 10:20, просмотров: 669) ответил =AK= на Под Ардуиной я даже прерывания не использую, задержки сделаны на основе millis()
Если б я еще знал, что такое millis(). Вообще, использовать setjmp/longjmp нужно аккуратно и вдумчиво, там граблей разложено много. Конкретно у вас есть конструкция res = setjmp(bla-bla), которая, ЕМНИП, с точки зрения стандарта есть Undefined https://wiki.sei.cmu.edu/confluence/display/c/MSC22-C.+Use+the+setjmp%28%29%2C+longjmp%28%29+facility+securely
behavior.
An invocation of the setjmp macro shall appear only in one of the following contexts: — the entire controlling expression of a selection or iteration statement; — one operand of a relational or equality operator with the other operand an integer constant expression, with the resulting expression being the entire controlling expression of a selection or iteration statement; — the operand of a unary ! operator with the resulting expression being the entire controlling expression of a selection or iteration statement; or — the entire expression of an expression statement (possibly cast to void). If the invocation appears in any other context, the behavior is undefined
Не надо делать мне как лучше, оставьте просто хорошо