esp-idf/components/wear_levelling/private_include/SPI_Flash.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

27 lines
661 B
C++

#ifndef _SPI_Flash_H_
#define _SPI_Flash_H_
#include "esp_err.h"
#include "Flash_Access.h"
/**
* @brief This class is used to access SPI flash devices. Class implements Flash_Access interface
*
*/
class SPI_Flash : public Flash_Access
{
public:
SPI_Flash();
size_t chip_size() override;
esp_err_t erase_sector(size_t sector) override;
esp_err_t erase_range(size_t start_address, size_t size) override;
esp_err_t write(size_t dest_addr, const void *src, size_t size) override;
esp_err_t read(size_t src_addr, void *dest, size_t size) override;
size_t sector_size() override;
~SPI_Flash() override;
};
#endif // _SPI_Flash_H_