Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-dev-f303 FastPWM3
Inverter/Inverter.h
- Committer:
- benkatz
- Date:
- 2016-02-05
- Revision:
- 0:4e1c4df6aabd
File content as of revision 0:4e1c4df6aabd:
#ifndef INVERTER_H
#define INVERTER_H
#include "FastPWM.h"
#include "mbed.h"
class Inverter{
public:
Inverter(PinName PinA, PinName PinB, PinName PinC, PinName PinEnable, float I_Scale, float Period);
void SetDTC(float DTC_A, float DTC_B, float DTC_C);
void EnableInverter();
void DisableInverter();
void InitCurrentSense();
void SampleCurrent();
void GetCurrent(float *A, float *B, float *C);
float I_A, I_B, I_C, _I_Scale;
private:
float I_B_Offset, I_C_Offset;
void ZeroCurrent(void);
FastPWM *PWM_A, *PWM_B, *PWM_C;
DigitalOut *Enable, *Dbg;
AnalogIn *Current_B, *Current_C;
};
#endif