spirilis avatar spirilis committed e590b96

Mistyped the 9th-address-bit support as 24LC040 instead of 25LC040

Comments (0)

Files changed (2)

   if (_addrwidth = 1 && totalsize == 512)  // Is it a 24(AA|LC)040 512-byte chip?
     // these require special support where they use 8-bit addresses but the 9th bit is included
     // inside the instruction.
-    _is_24LC040 = 1;
+    _is_25LC040 = 1;
   else
-    _is_24LC040 = 0;
+    _is_25LC040 = 0;
 }
 
 void SPIEEP::begin(int cspin) {
   if (!verify_enabled()) return false;
 
   digitalWrite(_cspin, LOW);
-    if (_is_24LC040)
+    if (_is_25LC040)
       SPI.transfer(_compose_instruction_addrbit(p, SPIEEP_READ));
     else
       SPI.transfer(SPIEEP_READ);
     return false;
 
   digitalWrite(_cspin, LOW);
-    if (_is_24LC040)
+    if (_is_25LC040)
       SPI.transfer(_compose_instruction_addrbit(p, SPIEEP_READ));
     else
       SPI.transfer(SPIEEP_READ);
   if (!is_wren())
     return false;  // Couldn't enable WREN for some reason?
   digitalWrite(_cspin, LOW);
-    if (_is_24LC040)
+    if (_is_25LC040)
       SPI.transfer(_compose_instruction_addrbit(p, SPIEEP_WRITE));
     else
       SPI.transfer(SPIEEP_WRITE);
   if (!is_wren())
     return false;  // Couldn't enable WREN for some reason?
   digitalWrite(_cspin, LOW);
-    if (_is_24LC040)
+    if (_is_25LC040)
       SPI.transfer(_compose_instruction_addrbit(p, SPIEEP_WRITE));
     else
       SPI.transfer(SPIEEP_WRITE);
 
       // Perform read for this block
       digitalWrite(_cspin, LOW);
-      if (_is_24LC040)
+      if (_is_25LC040)
         SPI.transfer(_compose_instruction_addrbit(idx, SPIEEP_READ));
       else
         SPI.transfer(SPIEEP_READ);
       if (!is_wren())
         return false;  // Couldn't enable WREN for some reason?
       digitalWrite(_cspin, LOW);
-      if (_is_24LC040)
+      if (_is_25LC040)
         SPI.transfer(_compose_instruction_addrbit(idx, SPIEEP_WRITE));
       else
         SPI.transfer(SPIEEP_WRITE);
     uint16_t _numpages;
     uint32_t _highestaddr;
     uint8_t _addrwidth;
-    boolean _is_24LC040;
+    boolean _is_25LC040;
     boolean _write_validation();
     void _write_address(uint32_t);
     inline byte _compose_instruction_addrbit(uint32_t, byte);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.