loop1 test

This commit is contained in:
DashyFox 2024-05-27 12:39:20 +03:00
parent 5efa3d3ba5
commit 01e2da6334

View File

@ -22,6 +22,7 @@
#define dec15_PIN 15 #define dec15_PIN 15
#define LoopOut 16 #define LoopOut 16
#define LoopOut1 17
#define dec_ISR(n) \ #define dec_ISR(n) \
void dec_##n##_ISR() { dec##n.isr(); } void dec_##n##_ISR() { dec##n.isr(); }
@ -204,6 +205,7 @@ bool TimerISRHandler(struct repeating_timer *t){
void setup() void setup()
{ {
pinMode(LoopOut1, OUTPUT);
add_repeating_timer_us(6, TimerISRHandler, NULL, &timer); add_repeating_timer_us(6, TimerISRHandler, NULL, &timer);
// IR_Timer.setOverflow(carrierFrec * 2, HERTZ_FORMAT); // IR_Timer.setOverflow(carrierFrec * 2, HERTZ_FORMAT);
@ -262,8 +264,14 @@ void setup()
void loop() void loop()
{ {
digitalToggle(LoopOut); digitalToggle(LoopOut);
Timer::tick();
}
void loop1()
{
Timer::tick();
IR_Decoder::tick(); IR_Decoder::tick();
bool rx_flag; bool rx_flag;
@ -310,7 +318,18 @@ void loop()
} }
Serial.println(in); Serial.println(in);
} }
digitalToggle(LoopOut1);
} }
Timer statusSimpleDelay; Timer statusSimpleDelay;
bool statusSimple(IR_Decoder &dec) bool statusSimple(IR_Decoder &dec)
{ {