Add SPI NOR Flash driver, WIP.

This commit is contained in:
JF
2020-05-07 19:53:51 +02:00
parent f96c048deb
commit 0b8e6c3fa2
14 changed files with 212 additions and 30 deletions

28
src/drivers/SpiNorFlash.h Normal file
View File

@@ -0,0 +1,28 @@
#pragma once
#include <cstddef>
namespace Pinetime {
namespace Drivers {
class Spi;
class SpiNorFlash {
public:
explicit SpiNorFlash(Spi& spi);
SpiNorFlash(const SpiNorFlash&) = delete;
SpiNorFlash& operator=(const SpiNorFlash&) = delete;
SpiNorFlash(SpiNorFlash&&) = delete;
SpiNorFlash& operator=(SpiNorFlash&&) = delete;
void Init();
void Uninit();
void Sleep();
void Wakeup();
private:
Spi& spi;
};
}
}