добавлена поддержка еще одного прерывания и еще двух выводов для ШИМ для

платы Elbear. добавлены флаги компиляции, необходимые для работы в
ArduinoIDE v1.8.19
This commit is contained in:
klassents committed 2025-02-04 14:31:10 +07:00
1 parent f06650400b
commit a32d749c60
19 files changed
+172 -116

No files matched your search

+9
View File
@@ -6,6 +6,9 @@
#include "WInterrupts.h"
#include "wiring_LL.h"
// interrupts are enabled by default after setup()
static bool intIsEnabled = true;
typedef void (*voidFuncPtr)(void);
// empty irq handler
@@ -18,14 +21,20 @@ static void nothing(void)
void interrupts(void)
{
GLOBAL_IRQ_ENABLE();
intIsEnabled = true;
}
// disable global interrupts
void noInterrupts(void)
{
GLOBAL_IRQ_DISABLE();
intIsEnabled = false;
}
bool isInterruptsEnabled(void)
{
return intIsEnabled;
}
// we can provide no more than 8 interrupts on gpio at the same time
static volatile voidFuncPtr intFunc[EXTERNAL_INTERRUPTS_QTY] =
{