1 /*""FILE COMMENT""*******************************************************
2 * System Name	: DMAC API for RX62Nxx
3 * File Name		: r_pdl_dmac_RX62Nxx.h
4 * Version		: 1.02
5 * Contents		: DMAC API header
6 * Customer		:
7 * Model			:
8 * Order			:
9 * CPU			: RX
10 * Compiler		: RXC
11 * OS			: Nothing
12 * Programmer	:
13 * Note			:
14 ************************************************************************
15 * Copyright, 2011. Renesas Electronics Corporation
16 * and Renesas Solutions Corporation
17 ************************************************************************
18 * History		: 2011.04.08
19 *				: Ver 1.02
20 *				: CS-5 release.
21 *""FILE COMMENT END""**************************************************/
22 
23 #ifndef R_PDL_DMAC_RX62Nxx_H
24 #define R_PDL_DMAC_RX62Nxx_H
25 
26 #define DMAC_CHANNELS	4
27 
28 /* Callback function storage */
29 extern VoidCallBackFunc rpdl_DMAC_callback_func[];
30 
31 /* Library prototypes */
32 bool R_DMAC_CreateAll(
33 	const uint8_t,
34 	const uint32_t,
35 	const uint8_t,
36 	volatile const void * const,
37 	volatile const void * const,
38 	const uint16_t,
39 	const uint16_t,
40 	const int32_t,
41 	const uint32_t,
42 	const uint32_t,
43 	VoidCallBackFunc const,
44 	const uint8_t
45 );
46 bool R_DMAC_DestroyAll(
47 	const uint8_t
48 );
49 bool R_DMAC_ControlAll(
50 	const uint8_t,
51 	const uint16_t,
52 	volatile const void * const,
53 	volatile const void * const,
54 	const uint16_t,
55 	const uint16_t,
56 	const int32_t,
57 	const uint32_t,
58 	const uint32_t
59 );
60 bool R_DMAC_GetStatusAll(
61 	const uint8_t,
62 	volatile uint8_t * const,
63 	volatile uint32_t * const,
64 	volatile uint32_t * const,
65 	volatile uint16_t * const,
66 	volatile uint16_t * const
67 );
68 bool ReturnFalse(void);
69 
70 /* Macro definitions */
71 
72 #define R_DMAC_Create(a, b, c, d, e, f, g, h, i, j, k, l) \
73 ( \
74 ( ( ((a) < DMAC_CHANNELS ) && ((l) <= IPL_MAX) ) ) ? \
75 R_DMAC_CreateAll( (a), (b), (c), (d), (e), (f), (g), (h), (i), (j), (k), (l) ) : \
76 ReturnFalse() \
77 )
78 
79 #define R_DMAC_Control(a, b, c, d, e, f, g, h, i) \
80 ( \
81 ( ((a) < DMAC_CHANNELS) ) ? \
82 R_DMAC_ControlAll( (a), (b), (c), (d), (e), (f), (g), (h), (i) ) : \
83 ReturnFalse() \
84 )
85 
86 #define R_DMAC_GetStatus(a, b, c, d, e, f) \
87 ( \
88 ( ((a) < DMAC_CHANNELS) ) ? \
89 R_DMAC_GetStatusAll( (a), (b), (c), (d), (e), (f) ) : \
90 ReturnFalse() \
91 )
92 
93 #define R_DMAC_Destroy(a) \
94 ( \
95 ( ((a) < DMAC_CHANNELS) ) ? \
96 R_DMAC_DestroyAll( (a) ) : \
97 ReturnFalse() \
98 )
99 
100 #endif
101 /* End of file */
102