SpiFlash25

Fork of SpiFlash25 by MultiTech

Revision:
1:17246d2dfff3
Parent:
0:137807d94795
Child:
3:b173ba8ad165
--- a/SpiFlash25.cpp	Thu Dec 04 14:09:10 2014 +0000
+++ b/SpiFlash25.cpp	Thu Dec 11 14:37:34 2014 -0600
@@ -22,15 +22,22 @@
 
 #include "SpiFlash25.h"
 
-SpiFlash25::SpiFlash25(PinName mosi, PinName miso, PinName sclk, PinName cs, int page_size)
+SpiFlash25::SpiFlash25(PinName mosi, PinName miso, PinName sclk, PinName cs, PinName W, PinName HOLD, int page_size)
 :   _spi(mosi, miso, sclk),
     _cs(cs),
+    _w(W),
+    _hold(HOLD),
     _page_size(page_size)
 {
     _cs.write(1);
     _spi.format(8, 3);
     _spi.frequency(75000000);
 
+    if (_w != NC)
+        _w = 1;
+    if (_hold != NC)
+        _hold = 1;
+
     _cs.write(0);
     _spi.write(READ_IDENTIFICATION);
     _id[ID_MANUFACTURER] = _spi.write(0x00);
@@ -162,4 +169,4 @@
     while (read_status() & STATUS_WIP) {
         wait_us(10);
     }
-}
\ No newline at end of file
+}