h6. [[DMAManager]] h6(. » DMA Scatter List h2. DMA Scatter List DMAManager and some other modules make use of "scatter lists" to describe a discontiguous memory buffer which is being used by an operation. The basic form of a scatter list is a word-aligned list of (address, length) pairs (each attribute being a word). However there are some values which have special meanings: * If the length is zero: ** If the address is greater than or equal to &FFFF0000 then this represents a discontinuity in the scatter list itself. The _address_ value should be added onto the current scatter list pointer in order to arrive at the next valid scatter list entry. This allows for infinite-length, circular scatter lists to be constructed, by moving the scatter list pointer up to 64K back in memory. ** Otherwise, this represents a null entry and it should be skipped * If the length is non-zero, the entry describes a buffer fragment of _length_ bytes starting at logical address _address_ Note that scatter lists have no terminator. APIs which use scatter lists also require you to specify the length of the transfer (typically in bytes). This means you must also be careful not to read off the end of a scatter list, or get stuck in a loop dereferencing back-pointers, while looking for the next buffer. It's also valid for the last byte of a transfer to not correspond to the last byte of a scatter list entry; i.e. the transfer can stop in the middle of an entry. For scatter lists used by DMAManager, scatter list entries which describe memory buffers must have a length which is a multiple of the transfer unit size. Unless it's a circular transfer, DMAManager will update your scatter list as it processes the transfer. I.e. for each byte which is confirmed as being transferred, it will increase the address and decrease the length of the corresponding scatter list entry. h4. See Also * [[DMA_QueueTransfer]] * [[FileCore Sector List]]