a0SetUnlockWrite()

Sets a DMA region to be written at unlock.


Syntax

a0tError a0SetUnlockWrite(
a0tLock *lock,
int index,
a0tFormat *format,
void *address,
int count );

Arguments

Namerd/wrDescription
lock write Lock descriptor table to be set.
index read Index in the table.
format read Format of the data to send.
address write Address of the data to send.
count read Number of elements of the data to send.

Description

This function sets the lock lock[index] to write the locked DMA region at the moment of the unlock. The data sent locally will be treated as count elements of the format and will be stored starting at address. This function allows the system to use the same message to release the lock and to write its related data.

This function must be called after a0SetLockDMARegionPart() or a0SetLockDMARegion() and before a0Unlock() or a0IUnlock().

On return of this function, the variable pointed by lock contains a lock descriptor to write the given data.


Return Values

If an error condition occurs, it returns the error code, otherwise it returns A0ErrOk. Possible values are as follows:
Error CodeDescription
A0ErrOkSuccessful completion.

See Also

a0SetLockDMARegion() a0SetLockDMARegionPart() a0SetLockRead() a0Lock() a0Unlock()