BLDC motor driver

Dependencies:   mbed-dev-f303 FastPWM3

Committer:
benkatz
Date:
Wed Jul 17 03:40:12 2019 +0000
Revision:
51:6cd89bd6fcaa
Parent:
23:2adf23ee0305
adding field-weakening to the user menu, switch "torque limit" to "current limit"

Who changed what in which revision?

UserRevisionLine numberNew contents of line
benkatz 23:2adf23ee0305 1 #ifndef __PREFERENCE_WRITER_H
benkatz 23:2adf23ee0305 2 #define __PREFERENCE_WRITER_H
benkatz 23:2adf23ee0305 3
benkatz 23:2adf23ee0305 4 #include "mbed.h"
benkatz 23:2adf23ee0305 5 #include "FlashWriter.h"
benkatz 23:2adf23ee0305 6
benkatz 23:2adf23ee0305 7 class PreferenceWriter {
benkatz 23:2adf23ee0305 8 public:
benkatz 23:2adf23ee0305 9 PreferenceWriter(uint32_t sector);
benkatz 23:2adf23ee0305 10 void open();
benkatz 23:2adf23ee0305 11 bool ready();
benkatz 23:2adf23ee0305 12 void write(int x, int index);
benkatz 23:2adf23ee0305 13 void write(float x, int index);
benkatz 23:2adf23ee0305 14 void flush();
benkatz 23:2adf23ee0305 15 void load();
benkatz 23:2adf23ee0305 16 void close();
benkatz 23:2adf23ee0305 17 private:
benkatz 23:2adf23ee0305 18 FlashWriter *writer;
benkatz 23:2adf23ee0305 19 uint32_t __sector;
benkatz 23:2adf23ee0305 20 bool __ready;
benkatz 23:2adf23ee0305 21 };
benkatz 23:2adf23ee0305 22
benkatz 23:2adf23ee0305 23 #endif