Method: HardsploitAPI_PARALLEL#eraseBlockMemory
- Defined in:
- lib/HardsploitAPI/Modules/NO_MUX_PARALLEL_MEMORY/HardsploitAPI_NO_MUX_PARALLEL_MEMORY.rb
#eraseBlockMemory(blockAddress) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/HardsploitAPI/Modules/NO_MUX_PARALLEL_MEMORY/HardsploitAPI_NO_MUX_PARALLEL_MEMORY.rb', line 38 def eraseBlockMemory(blockAddress) #Read Five Word write_command_Memory_WithoutMultiplexing(blockAddress,0x0020) #Block erase command statut = write_command_Memory_WithoutMultiplexing(blockAddress,0x00D0) #Confirm Block erase command timeout = 10 # while (statut != 128 ) && (timeout >= 0) # # puts "#{statut} #{timeout}" # statut = readByteFromMemory(0) #read statut register # sleep(100) # if timeout == 0 then # return statut # else # timeout = timeout-1 # end # end for ty in 0..4 puts readByteFromMemory(0) end puts "Return timeout" return statut end |