Closed Blevruz closed 1 year ago
I would prefer to move the code to flash_helper and reuse the write_data function for the writing. Also, it would be better to write an array than writing one byte at a time, you can make the same range checks then too. Also, new functions should be added to the end of vesc_c_if - if you add them in the middle you break binary compatibility with all existing packages.
I think this should address those concerns; code compiles, so I'll be trying to test it now.
Cursory testing was satisfactory enough (could do the read, write and wipe operations). Going to check style then squash commits, probably.
Looks better now! Only thing now is that the functions in flash_helper should be prefixed with flashhelper and not if_.
Adds a way for packages to edit sector 8 of flash memory. The reasoning for choosing sector 8 is that this sector seems to only be used when downloading a new app, in which case it is probably fine to wipe a package's memory.
TODO: