Improve STM32F4 Flash Behavior (#17946)
This commit is contained in:
@@ -27,15 +27,27 @@
|
||||
#include "../../core/millis_t.h"
|
||||
|
||||
// Inherit and expand on the official library
|
||||
class libServo : public Servo {
|
||||
class libServo {
|
||||
public:
|
||||
libServo();
|
||||
int8_t attach(const int pin);
|
||||
int8_t attach(const int pin = 0); // pin == 0 uses value from previous call
|
||||
int8_t attach(const int pin, const int min, const int max);
|
||||
void detach() { stm32_servo.detach(); }
|
||||
int read() { return stm32_servo.read(); }
|
||||
void move(const int value);
|
||||
|
||||
void pause();
|
||||
void resume();
|
||||
|
||||
static void pause_all_servos();
|
||||
static void resume_all_servos();
|
||||
|
||||
private:
|
||||
typedef Servo super;
|
||||
Servo stm32_servo;
|
||||
|
||||
int servo_pin = 0;
|
||||
millis_t delay = 0;
|
||||
|
||||
bool was_attached_before_pause;
|
||||
int value_before_pause;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user