r_pdl_lpc_rx62nxx.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*""FILE COMMENT""*******************************************************
  2. * System Name : LPC API for RX62Nxx
  3. * File Name : r_pdl_lpc_RX62Nxx.h
  4. * Version : 1.02
  5. * Contents : LPC 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. #ifndef R_PDL_LPC_RX62Nxx_H
  23. #define R_PDL_LPC_RX62Nxx_H
  24. #define R_PDL_LPC_BACKUP_AREA_SIZE 32
  25. /* Library prototypes */
  26. bool R_LPC_CreateAll(
  27. const uint32_t,
  28. const uint32_t
  29. );
  30. bool R_LPC_ControlAll(
  31. const uint16_t
  32. );
  33. bool R_LPC_WriteBackupAll(
  34. volatile const uint8_t * const,
  35. const uint8_t
  36. );
  37. bool R_LPC_ReadBackupAll(
  38. volatile uint8_t * const,
  39. const uint8_t
  40. );
  41. bool R_LPC_GetStatusAll(
  42. volatile uint16_t * const
  43. );
  44. bool ReturnFalse(void);
  45. /* Macro definitions */
  46. #define R_LPC_Create(a, b) \
  47. ( \
  48. R_LPC_CreateAll( (a), (b) ) \
  49. )
  50. #define R_LPC_Control(a) \
  51. ( \
  52. R_LPC_ControlAll( (a) ) \
  53. )
  54. #define R_LPC_WriteBackup(a, b) \
  55. ( \
  56. ( ( ((b) > 0) && ((b) <= R_PDL_LPC_BACKUP_AREA_SIZE) ) ) ? \
  57. R_LPC_WriteBackupAll( (a), (b) ) : \
  58. ReturnFalse() \
  59. )
  60. #define R_LPC_ReadBackup(a, b) \
  61. ( \
  62. ( ( ((b) > 0) && ((b) <= R_PDL_LPC_BACKUP_AREA_SIZE) ) ) ? \
  63. R_LPC_ReadBackupAll( (a), (b) ) : \
  64. ReturnFalse() \
  65. )
  66. #define R_LPC_GetStatus(a) \
  67. ( \
  68. R_LPC_GetStatusAll( (a) ) \
  69. )
  70. #endif
  71. /* End of file */