| Purpose: | Initialize a range of EEPROM to a specific value. | |||
| Assumes: | bPtrDest is valid | |||
| Passed: | R25:R24 | BYTE * | bPtrStart | the starting EEPROM address |
| R22 | BYTE | bValue | data value to write to all BYTEs in the range | |
| R21:R20 | WORD | wCount | number of BYTEs to initialize to bValue | |
| Returns: | R25:R24 | BYTE * | bPtrStart | the caller's bPtrStart value (unmodified) |
| Alters: | No Registers, only the EEPROM block referenced and the FLAGs | |||
| Example: | This example resets all the Operating System EEPROM configuration BYTEs, so each will be loaded with its default value upon bootup: |
| |
| Notes: | The bPtrStart value is not checked for validity. If wCount is zero, it exits immediately with no EEPROM change. |
| Dropin: (setup code) |
; Setup for the meminitEEPROM() call: ; Passed: R25:R24 BYTE * bPtrStart to the EEPROM starting address ; R22 BYTE bValue to write to all BYTEs in the range ; R21:R20 WORD wCount is the number of BYTEs to initialize ; Returns: R25:R24 BYTE * bPtrStart, the caller's bPtrStart value (unmodified) ; Alters: No Registers, only the EEPROM block referenced and the FLAGs |
| Also see: | The memcpyEEPROM and SRAM meminit system routines. |