mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/driver-w25qxxx.git
synced 2025-12-16 18:48:02 +00:00
Working logger implementation and some fixes for driver code
This commit is contained in:
@@ -21,6 +21,10 @@ namespace sta
|
||||
*/
|
||||
Logger(W25Qxx * flash, uint32_t startSector, uint32_t endSector);
|
||||
|
||||
void findLast();
|
||||
|
||||
bool write(T* data);
|
||||
|
||||
/**
|
||||
* @brief Write a new data point to the flash chip.
|
||||
* @note If the total capacity of this logger was exceeded, it restarts at the first sector, overwriting its data.
|
||||
@@ -73,7 +77,7 @@ namespace sta
|
||||
*/
|
||||
T operator[](std::size_t i);
|
||||
private:
|
||||
void findLast();
|
||||
bool searchCriterion(uint8_t * buffer);
|
||||
|
||||
W25Qxx * flash_;
|
||||
uint32_t start_;
|
||||
@@ -81,6 +85,7 @@ namespace sta
|
||||
uint32_t address_;
|
||||
|
||||
uint8_t buffer_[W25QXX_PAGE_SIZE];
|
||||
bool flushed_;
|
||||
uint32_t ptr_;
|
||||
};
|
||||
} // namespace sta
|
||||
|
||||
Reference in New Issue
Block a user