Fix code style violations in the avr_isp

This commit is contained in:
daid 2015-10-28 15:05:07 +01:00
parent 8c629c511c
commit a4a0dfdf89
4 changed files with 77 additions and 77 deletions

View file

@ -14,18 +14,18 @@ class IspBase():
Base class for ISP based AVR programmers.
Functions in this class raise an IspError when something goes wrong.
"""
def programChip(self, flashData):
def programChip(self, flash_data):
""" Program a chip with the given flash data. """
self.curExtAddr = -1
self.cur_ext_addr = -1
self.chip = chipDB.getChipFromDB(self.getSignature())
if not self.chip:
raise IspError("Chip with signature: " + str(self.getSignature()) + "not found")
self.chipErase()
print("Flashing %i bytes" % len(flashData))
self.writeFlash(flashData)
print("Verifying %i bytes" % len(flashData))
self.verifyFlash(flashData)
print("Flashing %i bytes" % len(flash_data))
self.writeFlash(flash_data)
print("Verifying %i bytes" % len(flash_data))
self.verifyFlash(flash_data)
print("Completed")
def getSignature(self):