Modified Motor Driver Firmware to include Flash + Thermal

Dependencies:   FastPWM3 mbed-dev-STM-lean

PreferenceWriter/PreferenceWriter.h

Committer:
adimmit
Date:
24 months ago
Revision:
78:4f481ff040ee
Parent:
23:2adf23ee0305

File content as of revision 78:4f481ff040ee:

#ifndef __PREFERENCE_WRITER_H
#define __PREFERENCE_WRITER_H

#include "mbed.h"
#include "FlashWriter.h"

class PreferenceWriter {
public:
    PreferenceWriter(uint32_t sector);
    void open();
    bool ready();
    void write(int x, int index);
    void write(float x, int index);
    void flush();
    void load();
    void close();
private:
    FlashWriter *writer;
    uint32_t __sector;
    bool __ready;
};

#endif