i want to give the user the opportunity to format all data on eeprom.
I built this code-
The reason I call the function in 40 intervals is that it dosent work from start to end… to have to give some delay in the process.
The problem is that the format process stops around position 240 although the eeprom.Size is 1024. I couldn't make it run to 1024.
Do I miss something about the way it work?
I built this code-
format eeprom:
public Sub formatEepprom(startpoint As Int)
Private i As Int = 0
Private endPoint As Int
If startpoint + 40 < eeprom.Size Then
endPoint = startpoint+40
Else
endPoint= eeprom.Size
End If
Log("formating eeprom from", startpoint, " To ", endPoint)
Public Clear() As Byte = Array As Byte(0)
For i = startpoint To endPoint
eeprom.WriteBytes(Clear,i)
Next
Log("i=", i, " size ", eeprom.Size)
If i >= eeprom.Size Then
Main.restartUnit
Else
CallSubPlus("formatEepprom", 5000,endPoint)
End If
End Sub
The reason I call the function in 40 intervals is that it dosent work from start to end… to have to give some delay in the process.
The problem is that the format process stops around position 240 although the eeprom.Size is 1024. I couldn't make it run to 1024.
Do I miss something about the way it work?