# CARD_WriteFlash

## Syntax

  `#include <nitro/card.h>`
  `BOOL CARD_WriteFlash(u32 dst, const void *src, u32 len);`

## Arguments

dst | The FLASH address of the transfer destination.
src | Transfer source memory address.
len | Byte length of data to be written.

## Return Values

TRUE if the process succeeds. FALSE otherwise.

## Description

This function writes data to the FLASH device. The function does not return control until it has finished processing. It returns TRUE if the process was successful or FALSE if it failed. To get the detailed result value when processing fails, call the `CARD_GetResultCode` function.

## Note

- To use this function, you must first lock the access bus with the `CARD_LockBackup` function.
- This function communicates with the ARM7 processor internally via PXI. The process will not end if PXI interrupts are not enabled.
- Because some high-capacity flash devices do not support "Write" operations, CARD_RESULT_UNSUPPORTED is returned and execution fails even if this function is called. See the Backup Access Overview for more details, and then use substitute functions, such as `CARD_WriteFlashSector`, when necessary.

## See Also

`CARD_GetResultCode, CARD_IsBackupFlash, CARD_WriteFlashAsync, CARD_ReadFlash, CARD_VerifyFlash, CARD_WriteAndVerifyFlash`

## Revision History

2007/11/13 Added a description of the fact that some high-capacity flash devices cannot use this function.
2004/12/09 Changed "IO processor" to "ARM7 processor".
2004/08/31 Added a description for the `CARD_GetResultCode` function.
2004/08/23 Initial version.

CONFIDENTIAL