summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/mpc55xx/include/edma.h
blob: 924ddd9da4025c7f026769cbf7fcb3301c70ed77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
 * @file
 *
 * @ingroup mpc55xx
 *
 * @brief Enhanced Direct Memory Access (eDMA).
 */

/*
 * Copyright (c) 2008
 * Embedded Brains GmbH
 * Obere Lagerstr. 30
 * D-82178 Puchheim
 * Germany
 * rtems@embedded-brains.de
 *
 * The license and distribution terms for this file may be found in the file
 * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE.
 */

#ifndef LIBCPU_POWERPC_MPC55XX_EDMA_H
#define LIBCPU_POWERPC_MPC55XX_EDMA_H

#include <stdbool.h>
#include <stdint.h>

#include <rtems.h>
#include <rtems/chain.h>

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

typedef struct mpc55xx_edma_channel_entry {
  rtems_chain_node node;
  unsigned channel;
  void (*done)( struct mpc55xx_edma_channel_entry *, uint32_t);
  rtems_id id;
} mpc55xx_edma_channel_entry;

void mpc55xx_edma_init(void);

rtems_status_code mpc55xx_edma_obtain_channel( mpc55xx_edma_channel_entry *e, unsigned irq_priority);

void mpc55xx_edma_release_channel( mpc55xx_edma_channel_entry *e);

void mpc55xx_edma_enable_hardware_requests( unsigned channel, bool enable);

void mpc55xx_edma_enable_error_interrupts( unsigned channel, bool enable);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* LIBCPU_POWERPC_MPC55XX_EDMA_H */