The new prepare_write method provides a Python interface to the P
command. If only one sector needs to be prepared, the end sector number
can be omitted.
Now the ISPError is raised from the _send_command method, not each
caller. There will be a few cases where I need that to not be an
exception, but I can just wrap it in a try block then, so there's no
problem.
Now instead of returning codes, the methods of LPC raise exceptions with
the information the chip returned.
The new read_memory method implements Python bindings for the R command.
The LPC class now has properties for getting and setting echo, baudrate,
and stopbits. Low-level access is now private to avoid letting users
break the public properties.
Also, a new write_ram method implements the W command. If no number of
bytes is specified, the length of the data is used.
Now we have code to connect to the serial port, put the LPC into ISP
mode, unlock the flash, and update echo and serial port settings. The
code's way nicer than lpc21isp so far, which is all I really wanted I
guess.