1 /*""FILE COMMENT""*******************************************************
2 * System Name	: EXDMAC API for RX62Nxx
3 * File Name		: r_pdl_exdmac_RX62Nxx.h
4 * Version		: 1.02
5 * Contents		: EXDMAC 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_EXDMAC_RX62Nxx_H
24 #define R_PDL_EXDMAC_RX62Nxx_H
25 
26 #define EXDMAC_CHANNELS	2
27 
28 /* Callback function storage */
29 extern VoidCallBackFunc rpdl_EXDMAC_callback_func[];
30 
31 /* Library prototypes */
32 bool R_EXDMAC_CreateAll(
33 	const uint8_t,
34 	const uint32_t,
35 	const uint16_t,
36 	const uint8_t,
37 	volatile const void * const,
38 	volatile const void * const,
39 	const uint16_t,
40 	const uint16_t,
41 	const int32_t,
42 	const uint32_t,
43 	const uint32_t,
44 	VoidCallBackFunc const,
45 	const uint8_t
46 );
47 bool R_EXDMAC_DestroyAll(
48 	const uint8_t
49 );
50 bool R_EXDMAC_ControlAll(
51 	const uint8_t,
52 	const uint16_t,
53 	volatile const void * const,
54 	volatile const void * const,
55 	const uint16_t,
56 	const uint16_t,
57 	const int32_t,
58 	const uint32_t,
59 	const uint32_t
60 );
61 bool R_EXDMAC_GetStatusAll(
62 	const uint8_t,
63 	volatile uint8_t * const,
64 	volatile uint32_t * const,
65 	volatile uint32_t * const,
66 	volatile uint16_t * const,
67 	volatile uint16_t * const
68 );
69 bool ReturnFalse(void);
70 
71 /* Macro definitions */
72 
73 #define R_EXDMAC_Create(a, b, c, d, e, f, g, h, i, j, k, l, m) \
74 ( \
75 ( ( ((a) < EXDMAC_CHANNELS ) && ((m) <= IPL_MAX) ) ) ? \
76 R_EXDMAC_CreateAll( (a), (b), (c), (d), (e), (f), (g), (h), (i), (j), (k), (l), (m) ) : \
77 ReturnFalse() \
78 )
79 
80 #define R_EXDMAC_Control(a, b, c, d, e, f, g, h, i) \
81 ( \
82 ( ((a) < EXDMAC_CHANNELS) ) ? \
83 R_EXDMAC_ControlAll( (a), (b), (c), (d), (e), (f), (g), (h), (i) ) : \
84 ReturnFalse() \
85 )
86 
87 #define R_EXDMAC_GetStatus(a, b, c, d, e, f) \
88 ( \
89 ( ((a) < EXDMAC_CHANNELS) ) ? \
90 R_EXDMAC_GetStatusAll( (a), (b), (c), (d), (e), (f) ) : \
91 ReturnFalse() \
92 )
93 
94 #define R_EXDMAC_Destroy(a) \
95 ( \
96 ( ((a) < EXDMAC_CHANNELS) ) ? \
97 R_EXDMAC_DestroyAll( (a) ) : \
98 ReturnFalse() \
99 )
100 
101 #endif
102 /* End of file */
103