WI_TIMEOUT is 65536
WI_TIMEOUT is 65536

65536 * 10msec == 10 minutes 55 seconds == hung machine

Instead wait for the busy bits for a max of ~2 seconds (200 * 10msec)

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase