Thu 22 Jun 2006 03:01:12 AM UTC, original submission:
This patch does not change verification or eeprom writing, and must be implemented for each programmer type.
It only replaces one function (per pgmr type), and leaves all prototypes and grammars alone, thus implementing it seems less involved than some other approaches posted here. (read: it was a quick shot before i checked the patches available here).
Details
The function avr910_paged_write_flash is split up into three functions:
avr910_chk_buffer_page() scans a page-sized region of the memory buffer and reports whether it contains any values other than 0xFF. (this function is not really avr910 specific).
avr910_write_flash_page() writes (at most) one single page of flash.
avr910_paged_write_flash() - the replacement for the original function - uses the other functions now, and merely loops pagewise over the memory buffer.
As a side effect, the structure of avr910_paged_write_flash() became simpler.
I finally did the diff file by hand, because i wanted to keep the patch human-readable (not chopped up into small chunks) - it's just one hunk.
|