1 /*""FILE COMMENT""******************************************************* 2 * System Name : PPG API for RX62Nxx 3 * File Name : r_pdl_ppg_RX62Nxx.h 4 * Version : 1.02 5 * Contents : PPG 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_PPG_RX62Nxx_H 24 #define R_PDL_PPG_RX62Nxx_H 25 26 #define PPG_UNITS 2 27 #define PPG_GROUPS_PER_UNIT 4 28 #define PPG_GROUPS (uint8_t)(PPG_UNITS * PPG_GROUPS_PER_UNIT) 29 30 /* Library prototypes */ 31 bool R_PPG_CreateAll( 32 const uint8_t, 33 const uint8_t, 34 const uint8_t, 35 const uint8_t, 36 const uint8_t, 37 const uint16_t, 38 const uint8_t 39 ); 40 bool R_PPG_DestroyAll( 41 const uint8_t, 42 const uint8_t, 43 const uint8_t 44 ); 45 bool R_PPG_ControlAll( 46 const uint8_t, 47 const uint8_t, 48 const uint8_t 49 ); 50 bool ReturnFalse(void); 51 52 /* Macro definitions */ 53 54 #define R_PPG_Create(a, b, c) \ 55 ( \ 56 ( (a) != 0x00000000u ) ? \ 57 R_PPG_CreateAll( (uint8_t)(((a) & 0x0F000000ul) >> 24), (uint8_t)(((a) & 0x00F00000ul) >> 20), (uint8_t)(((a) & 0x000F0000ul) >> 16), (uint8_t)(((a) & 0x0000FF00ul) >> 8), (uint8_t)(a), (b), (c) ) : \ 58 ReturnFalse() \ 59 ) 60 61 #define R_PPG_Destroy(a) \ 62 ( \ 63 ( (a) != 0x00000000u ) ? \ 64 R_PPG_DestroyAll( (uint8_t)(((a) & 0x0F000000ul) >> 24), (uint8_t)(((a) & 0x0000FF00ul) >> 8), (uint8_t)(a) ) : \ 65 ReturnFalse() \ 66 ) 67 68 #define R_PPG_Control(a, b ) \ 69 ( \ 70 ( (a) != 0x00u ) ? \ 71 R_PPG_ControlAll( (uint8_t)(((a) & 0x0F000000ul) >> 24), (uint8_t)(((a) & 0x0000FF00ul) >> 8), (b) ) : \ 72 ReturnFalse() \ 73 ) 74 75 #endif 76 /* End of file */ 77