Modified Motor Driver Firmware to include Flash + Thermal
Dependencies: FastPWM3 mbed-dev-STM-lean
PreferenceWriter/PreferenceWriter.h@78:4f481ff040ee, 24 months ago (annotated)
- Committer:
- adimmit
- Date:
- Fri Nov 11 16:58:43 2022 +0000
- Revision:
- 78:4f481ff040ee
- Parent:
- 23:2adf23ee0305
changes w/ filter @ high speed;
Who changed what in which revision?
User | Revision | Line number | New 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 |