r_pdl_adc_12_RX62Nxx.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. #ifndef R_PDL_ADC_12_RX62Nxx_H
  23. #define R_PDL_ADC_12_RX62Nxx_H
  24. extern VoidCallBackFunc rpdl_ADC_12_callback_func[];
  25. #define ADC_12_UNITS 1
  26. /* Library prototypes */
  27. bool R_ADC_12_CreateAll(
  28. const uint8_t,
  29. const uint32_t,
  30. const uint16_t,
  31. const uint16_t,
  32. VoidCallBackFunc const,
  33. const uint8_t
  34. );
  35. bool R_ADC_12_DestroyAll(
  36. const uint8_t
  37. );
  38. bool R_ADC_12_ControlAll(
  39. const uint8_t
  40. );
  41. bool R_ADC_12_ReadAll(
  42. const uint8_t,
  43. volatile uint16_t * const
  44. );
  45. bool ReturnFalse(void);
  46. /* Macro definitions */
  47. #define R_ADC_12_Create(a, b, c, d, e, f) \
  48. ( \
  49. ( ( ((a) < ADC_12_UNITS) && ((f) <= IPL_MAX) ) ) ? \
  50. R_ADC_12_CreateAll( (a), (b), (c), (d), (e), (f)): \
  51. ReturnFalse() \
  52. )
  53. #define R_ADC_12_Destroy(a) \
  54. ( \
  55. ( (a) < ADC_12_UNITS ) ? \
  56. R_ADC_12_DestroyAll( (a) ): \
  57. ReturnFalse() \
  58. )
  59. #define R_ADC_12_Control(a) \
  60. ( \
  61. R_ADC_12_ControlAll( (a) ) \
  62. )
  63. #define R_ADC_12_Read(a, b) \
  64. ( \
  65. ( (a) < ADC_12_UNITS ) ? \
  66. R_ADC_12_ReadAll( (a), (b) ): \
  67. ReturnFalse() \
  68. )
  69. #endif
  70. /* End of file */