a0SetLockRead()

Sets a DMA region to be read at lock.


Syntax

a0tError a0SetLockRead(
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.
address write Address of the data to receive.
count read Number of elements of the data to receive.

Description

This function sets the lock lock[index] to read the locked DMA region at the moment of the lock. The data received 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 set the lock and to read its related data.

This function must be called after a0SetLockDMARegionPart() or a0SetLockDMARegion() and before a0Lock() or a0ILock().

On return of this function, the variable pointed by lock contains a lock descriptor to read 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() a0SetUnlockWrite() a0Lock() a0Unlock()