CTRDG_Read

# CTRDG_WriteAndVerifyAgbSramAsync

## C Specification

      #include <nitro/ctrdg.h>

      void CTRDG_WriteAndVerifyAgbSramAsync(u32 dst, const void* src, u32 size, CTRDG_TASK_FUNC callback);

## Arguments

dst | Represents the target SRAM address (address on the AGB memory map)
src | Represents the source work area address
size | Represents the size of data written/verified in bytes
callback | Represents the callback function called after WriteAndVerify processing ends

## Return Values

None.

## Description

Internally, after data is asynchronously written by CTRDG_WriteAgbSram, verification is asynchronously performed by CTRDG_VerifyAgbSram. If there is an error, the function retries up to the number of times specified by CTRDG_AGB_SRAM_RETRY_MAX (defined in AgbSram.h). You can find out whether the WriteAndVerify process succeeded by accessing the result member of the CTRDGTaskInfo structure used as an argument to the callback function that returns after this routine is called.
This function returns 0 if the WriteAndVerify process succeeded, non-zero if the process failed, and the error address on the device side if there was a verification error.

The access cycle setting is created in the function and does not need to be set beforehand.

Note: The cartridge bus is locked for a set period by this function.
In addition, the AGB backup device cannot be accessed normally by the IS-NITRO-DEBUGGER.
However, be sure to check operations using an actual DS handheld unit since normal access is possible with actual DS units. (This will be fixed in a future version of IS-NITRO-DEBUGGER.)

## See Also

`CTRDG_WriteAgbSram, CTRDG_VerifyAgbSram, CTRDG_WriteAndVerifyAgbSram
`

## Revision History

04/07/2006 Initial version.

CONFIDENTIAL