Added Wait for compleation funcionality

This commit is contained in:
AlexanderHD27
2024-09-25 19:23:24 +02:00
parent bba35c9622
commit e97472c2a3
3 changed files with 74 additions and 8 deletions

View File

@@ -29,18 +29,21 @@ private:
const float base_clock_freq_khz = 500.0;
const uint32_t sleep_time_us = 1000;
const uint32_t sleep_time_us = 500;
bool done_flag0;
bool done_flag1;
bool done_flag0_arm;
bool done_flag1_arm;
protected:
void init_pio();
void init_gpio();
public:
void irq_handler0();
void irq_handler1();
public:
TMC2209_step_dual(
uint step0_pin,
uint step1_pin,
@@ -60,3 +63,7 @@ public:
bool wait0(int timeout_ms);
bool wait1(int timeout_ms);
};
extern TMC2209_step_dual * g_step_driver_instance;
void step_irq0_handler();
void step_irq1_handler();