esp-idf/components/wear_levelling/private_include/Partition.h
Angus Gratton 66fb5a29bb Whitespace: Automated whitespace fixes (large commit)
Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00

36 lines
760 B
C++

#ifndef _Partition_H_
#define _Partition_H_
#include "esp_err.h"
#include "Flash_Access.h"
#include "esp_partition.h"
/**
* @brief This class is used to access partition. Class implements Flash_Access interface
*
*/
class Partition : public Flash_Access
{
public:
Partition(const esp_partition_t *partition);
virtual size_t chip_size();
virtual esp_err_t erase_sector(size_t sector);
virtual esp_err_t erase_range(size_t start_address, size_t size);
virtual esp_err_t write(size_t dest_addr, const void *src, size_t size);
virtual esp_err_t read(size_t src_addr, void *dest, size_t size);
virtual size_t sector_size();
virtual ~Partition();
protected:
const esp_partition_t *partition;
};
#endif // _Partition_H_