7 static const char *
const TAG =
"uln2003.stepper";
37 ESP_LOGCONFIG(TAG,
"ULN2003:");
38 LOG_PIN(
" Pin A: ", this->
pin_a_);
39 LOG_PIN(
" Pin B: ", this->
pin_b_);
40 LOG_PIN(
" Pin C: ", this->
pin_c_);
41 LOG_PIN(
" Pin D: ", this->
pin_d_);
43 const char *step_mode_s =
"";
46 step_mode_s =
"FULL STEP";
49 step_mode_s =
"HALF STEP";
52 step_mode_s =
"WAVE DRIVE";
55 ESP_LOGCONFIG(TAG,
" Step Mode: %s", step_mode_s);
59 auto i =
static_cast<uint32_t
>((step % n + n) % n);
66 res |= 1 << ((i + 1) % 4);
72 res |= 1 << (((i + 1) >> 1) & 0x3);
virtual void digital_write(bool value)=0
ULN2003StepMode step_mode_
void start()
Start running the loop continuously.
void dump_config() override
void write_step_(int32_t step)
void stop()
Stop running the loop continuously.
bool has_reached_target()
Implementation of SPI Controller mode.
HighFrequencyLoopRequester high_freq_