| Line 548... |
Line 548... |
| 548 |
@command(timeout = 30000, target = 0x47324e49)
|
548 |
@command(timeout = 30000, target = 0x47324e49)
|
| 549 |
def ipodnano2g_nandread(self, addr, start, count, doecc, checkempty):
|
549 |
def ipodnano2g_nandread(self, addr, start, count, doecc, checkempty):
|
| 550 |
""" Target-specific function: ipodnano2g
|
550 |
""" Target-specific function: ipodnano2g
|
| 551 |
Reads data from the NAND chip into memory
|
551 |
Reads data from the NAND chip into memory
|
| 552 |
"""
|
552 |
"""
|
| 553 |
return self.lib.monitorcommand(struct.pack("IIII", 0xffff0002, addr | (0x80000000 if doecc != 0 else 0) | (0x40000000 if checkempty != 0 else 0), start, count), "III", (None, None, None))
|
553 |
return self.lib.monitorcommand(struct.pack("IIII", 0xffff0002, addr | (0x80000000 if doecc else 0) | (0x40000000 if checkempty else 0), start, count), "III", (None, None, None))
|
| 554 |
|
554 |
|
| 555 |
@command(timeout = 30000, target = 0x47324e49)
|
555 |
@command(timeout = 30000, target = 0x47324e49)
|
| 556 |
def ipodnano2g_nandwrite(self, addr, start, count, doecc):
|
556 |
def ipodnano2g_nandwrite(self, addr, start, count, doecc):
|
| 557 |
""" Target-specific function: ipodnano2g
|
557 |
""" Target-specific function: ipodnano2g
|
| 558 |
Writes data to the NAND chip
|
558 |
Writes data to the NAND chip
|
| 559 |
"""
|
559 |
"""
|
| 560 |
return self.lib.monitorcommand(struct.pack("IIII", 0xffff0003, addr | (0x80000000 if doecc != 0 else 0), start, count), "III", (None, None, None))
|
560 |
return self.lib.monitorcommand(struct.pack("IIII", 0xffff0003, addr | (0x80000000 if doecc else 0), start, count), "III", (None, None, None))
|
| 561 |
|
561 |
|
| 562 |
@command(timeout = 30000, target = 0x47324e49)
|
562 |
@command(timeout = 30000, target = 0x47324e49)
|
| 563 |
def ipodnano2g_nanderase(self, addr, start, count):
|
563 |
def ipodnano2g_nanderase(self, addr, start, count):
|
| 564 |
""" Target-specific function: ipodnano2g
|
564 |
""" Target-specific function: ipodnano2g
|
| 565 |
Erases blocks on the NAND chip and stores the results to memory
|
565 |
Erases blocks on the NAND chip and stores the results to memory
|