26 lines
615 B
C++
26 lines
615 B
C++
#ifndef DRV8428_DRIVER_H
|
|
#define DRV8428_DRIVER_H
|
|
|
|
#include "stepper_driver.h"
|
|
#include "io_expansion_board.h"
|
|
#include "esp_log.h"
|
|
|
|
class Drv8428Driver : public StepperDriver
|
|
{
|
|
public:
|
|
explicit Drv8428Driver(IOExpansionBoard &ioExp);
|
|
virtual ~Drv8428Driver() = default;
|
|
|
|
esp_err_t Init() override;
|
|
esp_err_t Enable(bool enable) override;
|
|
esp_err_t SetDirection(bool dir) override;
|
|
esp_err_t Sleep(bool sleep) override;
|
|
esp_err_t SetMicrosteps(int microsteps) override;
|
|
|
|
private:
|
|
IOExpansionBoard &io_expansion_;
|
|
const char* TAG = "Drv8428Driver";
|
|
};
|
|
|
|
#endif // DRV8428_DRIVER_H
|