1 /*""FILE COMMENT""*******************************************************
2 * System Name	: 12-bit A/D converter API for RX62Nxx
3 * File Name		: r_pdl_adc_12_RX62Nxx.h
4 * Version		: 1.02
5 * Contents		: ADC_12 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_ADC_12_RX62Nxx_H
24 #define R_PDL_ADC_12_RX62Nxx_H
25 
26 extern VoidCallBackFunc rpdl_ADC_12_callback_func[];
27 
28 #define ADC_12_UNITS 1
29 
30 /* Library prototypes */
31 bool R_ADC_12_CreateAll(
32 	const uint8_t,
33 	const uint32_t,
34 	const uint16_t,
35 	const uint16_t,
36 	VoidCallBackFunc const,
37 	const uint8_t
38 );
39 bool R_ADC_12_DestroyAll(
40 	const uint8_t
41 );
42 bool R_ADC_12_ControlAll(
43 	const uint8_t
44 );
45 bool R_ADC_12_ReadAll(
46 	const uint8_t,
47 	volatile uint16_t * const
48 );
49 bool ReturnFalse(void);
50 
51 /* Macro definitions */
52 
53 #define R_ADC_12_Create(a, b, c, d, e, f) \
54 ( \
55 ( ( ((a) < ADC_12_UNITS) && ((f) <= IPL_MAX) ) ) ? \
56 R_ADC_12_CreateAll( (a), (b), (c), (d), (e), (f)): \
57 ReturnFalse() \
58 )
59 
60 #define R_ADC_12_Destroy(a) \
61 ( \
62 ( (a) < ADC_12_UNITS ) ? \
63 R_ADC_12_DestroyAll( (a) ): \
64 ReturnFalse() \
65 )
66 
67 #define R_ADC_12_Control(a) \
68 ( \
69 R_ADC_12_ControlAll( (a) ) \
70 )
71 
72 #define R_ADC_12_Read(a, b) \
73 ( \
74 ( (a) < ADC_12_UNITS ) ? \
75 R_ADC_12_ReadAll( (a), (b) ): \
76 ReturnFalse() \
77 )
78 
79 #endif
80 /* End of file */
81