DMA.H 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. Copyright (C) 1994-1995 Apogee Software, Ltd.
  3. This program is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU General Public License
  5. as published by the Free Software Foundation; either version 2
  6. of the License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. See the GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  14. */
  15. /**********************************************************************
  16. file: DMA.H
  17. author: James R. Dose
  18. date: February 4, 1994
  19. Public header file for DMA.C
  20. (c) Copyright 1994 James R. Dose. All Rights Reserved.
  21. **********************************************************************/
  22. #ifndef __DMA_H
  23. #define __DMA_H
  24. enum DMA_ERRORS
  25. {
  26. DMA_Error = -1,
  27. DMA_Ok = 0,
  28. DMA_ChannelOutOfRange,
  29. DMA_InvalidChannel
  30. };
  31. enum DMA_Modes
  32. {
  33. DMA_SingleShotRead,
  34. DMA_SingleShotWrite,
  35. DMA_AutoInitRead,
  36. DMA_AutoInitWrite
  37. };
  38. char *DMA_ErrorString
  39. (
  40. int ErrorNumber
  41. );
  42. int DMA_VerifyChannel
  43. (
  44. int channel
  45. );
  46. int DMA_SetupTransfer
  47. (
  48. int channel,
  49. char *address,
  50. int length,
  51. int mode
  52. );
  53. int DMA_EndTransfer
  54. (
  55. int channel
  56. );
  57. char *DMA_GetCurrentPos
  58. (
  59. int channel
  60. );
  61. int DMA_GetTransferCount
  62. (
  63. int channel
  64. );
  65. #endif