DMA Task and Library Details

















Task Overview - Task

Direct Memory Access (DMA) low level driver

Task Overview - Library

The DMA task and associated library calls, handles read/write of higher speed devices.

Task Attributes

Task priority : 128 (normal priority)
Task depends on : Tasks/OS/Library/OS.a

Task Description

This task controls the DMA hardware, allowing controlling tasks to instruct DMA operations.

Library Description

To be written.

Task History
   
 05 February 2009GJP Created
 06 May 2009GJP DMA for channel 2 (Floppy) works
 10 July 2009GJP Support all ISA DMA channels
   

Task Function Calls

Here follows a list of functions supplied by this library with a brief description of each. By clicking on a function name, further information will be shown.

FunctionBrief
Lib_DMASetupInitialise a DMA channel prior to data transfer
Lib_DMAStartCommence a DMA read or write transfer
Lib_DMAStopStops an existing or recently completed DMA transfer











Lib_DMASetup
Initialise a DMA channel prior to data transfer

Function prototype

 BOOL Lib_DMASetup(
                    BYTE channel,
                    BYTE *buffer,
                    DWORD size
 );



Input parameter(s)
  
 BYTE channel - DMA channel to stop
 void *buffer - address of DMA buffer in memory
 DWORD size - size of transfer in bytes
  


Return value
  
 BOOL - completion status
  


Purpose
Each DMA channel needs to be initialised prior to data transfer, with the source/destination address and data size in bytes. Both 8 and 16 bit transfers are permitted but note that a transfer size must be a multiple of the transfer size (eg. 16 bit transfers must be a multiple of 2 bytes).

History
   
 26 June 2009GJP Created
   

Click here to report an error


Back to top








Lib_DMAStart
Commence a DMA read or write transfer

Function prototype

 BOOL Lib_DMAStart(
                    BYTE channel,
                    DWORD mode,
                    BOOL rnw
 );



Input parameter(s)
  
 BYTE channel - DMA channel to stop
 DWORD mode - DMA transfer type
 BOOL - read or not-write
  


Return value
  
 BOOL - completion status
  


Purpose
Starts a DMA transfer, for read or write operations. Control is returned immediately to caller and the DMA transfer will continue in the background. The transfer type (read/write) and method (single, demand etc) is specified in this call.

History
   
 05 February 2009GJP Created
   

Click here to report an error


Back to top








Lib_DMAStop
Stops an existing or recently completed DMA transfer

Function prototype

 BOOL Lib_DMAStop(
                   BYTE channel
 );



Input parameter(s)
  
 BYTE channel - DMA channel to stop
  


Return value
  
 BOOL - completion status
  


Purpose
This is to be called when the DMA transfer is complete or when a transfer has failed (such as hardware error).

History
   
 05 May 2009GJP Created
   

Click here to report an error


Back to top


Back to top


Home   News   Shop   MDOS   Adelian   Luan   Acorn & RISC OS   Consultancy   Hosting   Support   Repository   Contact   Admin                  T and C   Privacy Statement


Click here to report an error or fault with this page