Successful reading and writing

This commit is contained in:
dario
2024-06-03 22:23:00 +02:00
parent fde868c9db
commit 9dd2a8da9c
2 changed files with 25 additions and 11 deletions

View File

@@ -13,11 +13,11 @@ namespace sta
{
public:
/**
* @brief Construct a new Logger object
* @brief Constructs a logger object which manages reading and writing data to a segment of a flash chip.
*
* @param flash The flash chip to use for logging.
* @param startSector The index of the start sector (4096 bytes).
* @param endAddr The index of the end sector (4096 bytes).
* @param startSector The index of the start sector (1 LSB = 4096 bytes).
* @param endSector The index of the end sector (1 LSB = 4096 bytes).
*/
Logger(W25Qxx * flash, uint32_t startSector, uint32_t endSector);
@@ -62,7 +62,7 @@ namespace sta
* @param idx The index of the segement.
* @return const T& The read data value.
*/
const T& operator[](std::size_t idx);
T operator[](std::size_t idx);
private:
W25Qxx * flash_;
uint32_t start_;