Commits

spirilis committed 0fa011e

Changed some counter variables from int to uint32_t to reflect maximum value of underlying addresses

  • Participants
  • Parent commits e590b96

Comments (0)

Files changed (1)

 }
 
 boolean SPIEEP::_write_validation() {
-  int m = millis();
+  long m = millis();
   byte ret;
 
   if (!verify_enabled()) return false;
 }
 
 void SPIEEP::_write_address(uint32_t p) {
-  char i;
+  int8_t i;
 
   for (i=_addrwidth-1; i>=0; i--)
     SPI.transfer( (byte)(p >> (8*i)) & 0xFF );
 
 boolean SPIEEP::read_page(uint32_t p, byte *buf) {
   byte ret;
-  int i;
+  uint16_t i;
 
   if (!verify_enabled()) return false;
 
 }
 
 boolean SPIEEP::write(uint32_t p, byte b) {
-
   if (!verify_enabled()) return false;
 
   wren();
 
 boolean SPIEEP::write_page(uint32_t p, byte *buf) {
   byte ret;
-  int i;
+  uint16_t i;
 
   if (!verify_enabled()) return false;
 
 }
 
 boolean SPIEEP::readn(uint32_t p, byte *buf, uint16_t len) {
-  int idx, e, pg_i_e, rdlen, i;  /* idx = start of current read block, e = last read address + 1,
-                                  * pg_i_e = address of last byte in idx's current page + 1,
-                                  * rdlen = # bytes to read in current block
-                                  */
+  uint32_t idx, e, pg_i_e, rdlen, i;  /* idx = start of current read block, e = last read address + 1,
+                                       * pg_i_e = address of last byte in idx's current page + 1,
+                                       * rdlen = # bytes to read in current block
+                                       */
 
   if (!verify_enabled()) return false;
 
 }
 
 boolean SPIEEP::writen(uint32_t p, byte *buf, uint16_t len) {
-  int idx, e, pg_i_e, wrlen, i;  /* idx = start of current read block, e = last read address + 1,
-                                  * pg_i_e = address of last byte in idx's current page + 1,
-                                  * wrlen = # bytes to write in current block
-                                  */
+  uint32_t idx, e, pg_i_e, wrlen, i;  /* idx = start of current read block, e = last read address + 1,
+                                       * pg_i_e = address of last byte in idx's current page + 1,
+                                       * wrlen = # bytes to write in current block
+                                       */
 
   if (!verify_enabled()) return false;