revision 58:ce3657a81a26
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 58:ce3657a81a26 |
parent | 57:5648c0e0638b |
child | 59:dceb8ef1da55 |
author | nkeynes |
date | Mon Jan 02 14:48:29 2006 +0000 (17 years ago) |
Commit in dmac.h (oops)
![]() | src/sh4/dmac.h | view | annotate | diff | log |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/src/sh4/dmac.h Mon Jan 02 14:48:29 2006 +00001.3 @@ -0,0 +1,62 @@1.4 +/**1.5 + * $Id: dmac.h,v 1.1 2006-01-02 14:48:29 nkeynes Exp $1.6 + *1.7 + * SH4 onboard DMA controller (DMAC) definitions.1.8 + *1.9 + * Copyright (c) 2005 Nathan Keynes.1.10 + *1.11 + * This program is free software; you can redistribute it and/or modify1.12 + * it under the terms of the GNU General Public License as published by1.13 + * the Free Software Foundation; either version 2 of the License, or1.14 + * (at your option) any later version.1.15 + *1.16 + * This program is distributed in the hope that it will be useful,1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1.19 + * GNU General Public License for more details.1.20 + */1.21 +1.22 +#ifndef dream_sh4dmac_H1.23 +#define dream_sh4dmac_H 11.24 +1.25 +#include <stdint.h>1.26 +1.27 +#ifdef __cplusplus1.28 +extern "C" {1.29 +#endif1.30 +1.31 +/* External DREQ. Note only used for DMA memory-to-memory - for single1.32 + * address transfers the device uses DMAC_get_buffer/DMAC_put_buffer.1.33 + */1.34 +#define DMAC_EXTERNAL 01.35 +#define DMAC_SCI_TDE 1 /* SCI Transmit data empty */1.36 +#define DMAC_SCI_RDF 2 /* SCI Receive data full */1.37 +#define DMAC_SCIF_TDE 3 /* SCIF Transmit data empty */1.38 +#define DMAC_SCIF_RDF 4 /* SCIF Receive data full */1.39 +#define DMAC_TMU_ICI 5 /* TMU Input capture interrupt (not used?) */1.40 +1.41 +/**1.42 + * Trigger a DMAC transfer by asserting one of the above DMA request lines1.43 + * (from the onboard peripherals). Actual transfer is dependent on the1.44 + * relevant channel configuration.1.45 + */1.46 +void DMAC_trigger( int dmac_trigger );1.47 +1.48 +/**1.49 + * Execute a memory-to-external-device transfer. Copies data into the supplied1.50 + * buffer up to a maximum of bytecount bytes.1.51 + * @return Actual number of bytes copied.1.52 + */1.53 +uint32_t DMAC_get_buffer( int channel, char *buf, uint32_t bytecount );1.54 +1.55 +/**1.56 + * execute an external-device-to-memory transfer. Copies data from the1.57 + * supplied buffer into memory up to a maximum of bytecount bytes.1.58 + * @return Actual number of bytes copied.1.59 + */1.60 +uint32_t DMAC_put_buffer( int channel, char *buf, uint32_t bytecount );1.61 +1.62 +#ifdef __cplusplus1.63 +}1.64 +#endif1.65 +#endif
.