- Notifications
You must be signed in to change notification settings - Fork 31
New commands for myevic#23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
df5b6751cf91b187dc7d146d35c0136dfd1c523551fa55dda49378539e7c901379715612d0059ffc545845b2eb9ef62fa6File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -56,13 +56,15 @@ class HIDTransfer(object): | ||
| 'E083': DeviceInfo("eGrip II", None, (64, 40)), | ||
| 'E092': DeviceInfo("eVic AIO", None, (64, 40)), | ||
| 'E115': DeviceInfo("eVic VTwo mini", None, (64, 40)), | ||
| 'E079': DeviceInfo("eVic VTC Dual", None, (64, 40)), | ||
| 'E150': DeviceInfo("eVic Basic", None, (64, 40)), | ||
| 'E196': DeviceInfo("eVic Primo Mini", None, (64, 40)), | ||
| 'M011': DeviceInfo("iStick TC100W", None, None), | ||
| 'M037': DeviceInfo("ASTER", None, (96, 16)), | ||
| 'M041': DeviceInfo("iStick Pico", None, (96, 16)), | ||
| 'M045': DeviceInfo("iStick Pico Mega", None, (96, 16)), | ||
| 'M046': DeviceInfo("iPower", None, (96, 16)), | ||
| 'W007': DeviceInfo("Presa TC75W", ['E052'], None), | ||
| 'W007': DeviceInfo("Presa TC75W", ['E052'], (64,40)), | ||
| 'W010': DeviceInfo("Classic", None, None), | ||
| 'W011': DeviceInfo("Lite", None, None), | ||
| 'W013': DeviceInfo("Stout", None, None), | ||
| @@ -161,6 +163,48 @@ def read_dataflash(self): | ||
| return (dataflash, checksum) | ||
| def fmc_read(self, start, length): | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd add a small note to the docstring, mentioning | ||
| """Reads the device flash memory. | ||
| Returns: | ||
| An array containing the data flash memory content. | ||
| """ | ||
| # Send the command for reading the data flash | ||
| self.send_command(0xC0, start, length) | ||
| # Read the dataflash | ||
| buf = self.read(length) | ||
| return (buf) | ||
| def hid_command(self, cmd, start, length): | ||
| """Send a HID command to the device. | ||
| Returns: | ||
| An array containing command response. | ||
| """ | ||
| # Send the command for reading the data flash | ||
| self.send_command(cmd, start, length) | ||
| # Read the response | ||
| buf = self.read(length) | ||
| return (buf) | ||
| def read_screen(self): | ||
| """Reads the screen memory. | ||
| Returns: | ||
| An array containing the screen. | ||
| """ | ||
| # Send the command for reading the screen buffer | ||
| self.send_command(0xC1, 0, 0x400) | ||
| # Read the data | ||
| buf = self.read(0x400) | ||
| return (buf) | ||
| def write(self, data): | ||
| """Writes data to the device. | ||
| @@ -266,6 +310,17 @@ def write_flash(self, data, start): | ||
| self.write(data) | ||
| def write_ldflash(self, data): | ||
| """Writes data to the flash memory. | ||
| """ | ||
| end = len(data) | ||
| # Send the command for writing the data | ||
| self.send_command(0x3C, 0x100000, end) | ||
| self.write(data) | ||
| def write_aprom(self, aprom): | ||
| """Writes the APROM to the device. | ||
| @@ -275,6 +330,15 @@ def write_aprom(self, aprom): | ||
| self.write_flash(aprom.data, 0) | ||
| def write_ldrom(self, ldrom): | ||
| """Writes the LDROM to the device. | ||
| Args: | ||
| aprom: A BinFile object containing an unencrypted LDROM image. | ||
| """ | ||
| self.write_ldflash(ldrom.data) | ||
| def write_logo(self, logo): | ||
| """Writes the logo to the the device. | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add that
fmc-read,timeandscreenshotare specific to your FW.resetis good.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree.