Ibrahim Abd Elkader / Mbed 2 deprecated nrflash

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers nrflash.h Source File

nrflash.h

00001 #ifndef __NRFLASH_H__
00002 #define __NRFLASH_H__
00003 #include <mbed.h>
00004 class NRFlash {
00005     private:
00006         SPI spi;
00007         DigitalOut ssel;
00008         DigitalOut prog;
00009         DigitalOut rst;
00010         void write_enable();
00011     public:
00012         NRFlash(PinName mosi, PinName miso, PinName sclk, PinName ssel, PinName prog, PinName rst);
00013         void reset();
00014         void enable_programming();
00015         void disable_programming();
00016         int  read_fsr();
00017         void write_fsr(int fsr);
00018         void erase_flash();
00019         int read_flash(const char *path);
00020         int write_flash(const char *path);
00021 };
00022 #endif //__NRFLASH_H__