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
Diff: Inverter/Inverter.h
- Revision:
- 0:4e1c4df6aabd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Inverter/Inverter.h Fri Feb 05 00:52:53 2016 +0000
@@ -0,0 +1,26 @@
+#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
\ No newline at end of file