#ifndef _RAMP_CTRL_H__
#define _RAMP_CTRL_H__
#include "libs/types.h"
#include "libs/task.h"
typedef struct {
	timer_t timer;
	float start_point;
	float final_point;
	float target;
	u32   duration_ms;
	float steps;
}ramp_t;

void ramp_ctrl_init(ramp_t *ramp);
void ramp_clear(ramp_t *ramp);
void ramp_exc(ramp_t *ramp);
float ramp_get_target(ramp_t *ramp);
bool ramp_complete(ramp_t *ramp);
void ramp_set_target(ramp_t *ramp, float start, float final, u32 duration_ms);

#endif /* _RAMP_CTRL_H__ */

