2015-03-31 17:54:22 +00:00
|
|
|
#pragma once
|
|
|
|
|
2016-09-07 17:41:24 +00:00
|
|
|
#define RPM(a) ((a) / 60.0 * M_PI * 2.0)
|
|
|
|
#define KGCM2(a) ((a) / 10000.0)
|
|
|
|
|
2016-02-21 23:10:32 +00:00
|
|
|
//Do not change order, append new types at the end
|
2017-09-06 02:20:06 +00:00
|
|
|
typedef enum {
|
2015-11-26 21:41:06 +00:00
|
|
|
ENC = 1,
|
|
|
|
RES,
|
|
|
|
SINCOS,
|
|
|
|
STEPDIR,
|
|
|
|
UPDOWN,
|
|
|
|
PWM,
|
|
|
|
FREQ,
|
|
|
|
MITSU,
|
|
|
|
YASKAWA,
|
|
|
|
HYPER,
|
|
|
|
SANYO,
|
|
|
|
SSERIAL,
|
|
|
|
ENDAT,
|
|
|
|
BISS,
|
|
|
|
SSI
|
|
|
|
} protocol_t;
|
2015-04-03 22:23:34 +00:00
|
|
|
|
2017-09-06 02:20:06 +00:00
|
|
|
typedef enum {
|
2016-06-08 19:30:06 +00:00
|
|
|
ACSYNC = 0,
|
|
|
|
ACASYNC,
|
|
|
|
AC2PHASE,
|
|
|
|
DC
|
|
|
|
} mot_type_t;
|
|
|
|
|
2015-03-31 17:54:22 +00:00
|
|
|
void link_pid();
|
2016-07-07 12:38:18 +00:00
|
|
|
void link_simplepid();
|
|
|
|
void link_ac();
|
2015-11-26 21:41:06 +00:00
|
|
|
int update_cmd();
|
|
|
|
int update_fb();
|
2016-06-08 19:30:06 +00:00
|
|
|
int update_mot();
|