customizing code for Aliexpress 14 bit version with MA702

Dependencies:   mbed FastPWM3

FOC/foc.h

Committer:
benkatz
Date:
2018-12-05
Revision:
47:e1196a851f76
Parent:
45:26801179208e
Child:
48:74a40481740c

File content as of revision 47:e1196a851f76:

#ifndef FOC_H
#define FOC_H

#include "../structs.h"
#include "PositionSensor.h"
#include "mbed.h"
#include "hw_config.h"
#include "math.h"
#include "../math_ops.h"
#include "motor_config.h"
#include "current_controller_config.h"
#include "FastMath.h"
#include "user_config.h"

void abc(float theta, float d, float q, float *a, float *b, float *c);
void dq0(float theta, float a, float b, float c, float *d, float *q);
void svm(float v_bus, float u, float v, float w, float *dtc_u, float *dtc_v, float *dtc_w);
void zero_current(int *offset_1, int *offset_2);
void reset_foc(ControllerStruct *controller);
void init_controller_params(ControllerStruct *controller);
void commutate(ControllerStruct *controller, GPIOStruct *gpio, float theta);
void torque_control(ControllerStruct *controller);
void limit_current_ref (ControllerStruct *controller);
#endif