1 /*""FILE COMMENT""******************************************************* 2 * System Name : EXDMAC API for RX62Nxx 3 * File Name : r_pdl_exdmac.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_H 24 #define R_PDL_EXDMAC_H 25 26 #include "r_pdl_common_defs_RX62Nxx.h" 27 28 /* Function prototypes */ 29 bool R_EXDMAC_Create( 30 uint8_t, 31 uint32_t, 32 uint16_t, 33 uint8_t, 34 void *, 35 void *, 36 uint16_t, 37 uint16_t, 38 int32_t, 39 uint32_t, 40 uint32_t, 41 void *, 42 uint8_t 43 ); 44 bool R_EXDMAC_Destroy( 45 uint8_t 46 ); 47 bool R_EXDMAC_Control( 48 uint8_t, 49 uint16_t, 50 void *, 51 void *, 52 uint16_t, 53 uint16_t, 54 int32_t, 55 uint32_t, 56 uint32_t 57 ); 58 bool R_EXDMAC_GetStatus( 59 uint8_t, 60 uint8_t *, 61 uint32_t *, 62 uint32_t *, 63 uint16_t *, 64 uint16_t * 65 ); 66 67 /* Transfer mode selection */ 68 #define PDL_EXDMAC_NORMAL 0x00000001ul 69 #define PDL_EXDMAC_REPEAT 0x00000002ul 70 #define PDL_EXDMAC_BLOCK 0x00000004ul 71 #define PDL_EXDMAC_CLUSTER 0x00000008ul 72 #define PDL_EXDMAC_SOURCE 0x00000010ul 73 #define PDL_EXDMAC_DESTINATION 0x00000020ul 74 75 /* Address addition direction selection */ 76 #define PDL_EXDMAC_SOURCE_ADDRESS_FIXED 0x00000040ul 77 #define PDL_EXDMAC_SOURCE_ADDRESS_PLUS 0x00000080ul 78 #define PDL_EXDMAC_SOURCE_ADDRESS_MINUS 0x00000100ul 79 #define PDL_EXDMAC_SOURCE_ADDRESS_OFFSET 0x00000200ul 80 #define PDL_EXDMAC_DESTINATION_ADDRESS_FIXED 0x00000400ul 81 #define PDL_EXDMAC_DESTINATION_ADDRESS_PLUS 0x00000800ul 82 #define PDL_EXDMAC_DESTINATION_ADDRESS_MINUS 0x00001000ul 83 #define PDL_EXDMAC_DESTINATION_ADDRESS_OFFSET 0x00002000ul 84 85 /* Address mode selection */ 86 #define PDL_EXDMAC_ADDRESS_MODE_READ 0x00004000ul 87 #define PDL_EXDMAC_ADDRESS_MODE_WRITE 0x00008000ul 88 #define PDL_EXDMAC_ADDRESS_MODE_DUAL 0x00010000ul 89 90 /* Transfer data size */ 91 #define PDL_EXDMAC_SIZE_8 0x00020000ul 92 #define PDL_EXDMAC_SIZE_16 0x00040000ul 93 #define PDL_EXDMAC_SIZE_32 0x00080000ul 94 95 /* Pin selection */ 96 #define PDL_EXDMAC_PIN_A 0x0001u 97 #define PDL_EXDMAC_PIN_B 0x0002u 98 #define PDL_EXDMAC_PIN_C 0x0004u 99 100 /* EDACKn pin output control */ 101 #define PDL_EXDMAC_EDACK_DISABLE 0x0008u 102 #define PDL_EXDMAC_EDACK_LOW 0x0010u 103 #define PDL_EXDMAC_EDACK_HIGH 0x0020u 104 #define PDL_EXDMAC_EDACK_SYNC 0x0040u 105 #define PDL_EXDMAC_EDACK_WAIT 0x0080u 106 107 /* Trigger selection */ 108 #define PDL_EXDMAC_TRIGGER_SW 0x0100u 109 #define PDL_EXDMAC_TRIGGER_RISING 0x0200u 110 #define PDL_EXDMAC_TRIGGER_FALLING 0x0400u 111 #define PDL_EXDMAC_TRIGGER_LOW 0x0800u 112 #define PDL_EXDMAC_TRIGGER_MTU1 0x1000u 113 114 /* Interrupt generation */ 115 #define PDL_EXDMAC_IRQ_END 0x01u 116 #define PDL_EXDMAC_IRQ_ESCAPE_END 0x02u 117 #define PDL_EXDMAC_IRQ_REPEAT_SIZE_END 0x04u 118 #define PDL_EXDMAC_IRQ_EXT_SOURCE 0x08u 119 #define PDL_EXDMAC_IRQ_EXT_DESTINATION 0x10u 120 121 /* DTC trigger control */ 122 #define PDL_EXDMAC_DTC_TRIGGER_DISABLE 0x20u 123 #define PDL_EXDMAC_DTC_TRIGGER_ENABLE 0x40u 124 125 /* Enable / suspend control */ 126 #define PDL_EXDMAC_ENABLE 0x0001u 127 #define PDL_EXDMAC_SUSPEND 0x0002u 128 129 /* Software trigger control */ 130 #define PDL_EXDMAC_START 0x0004u 131 #define PDL_EXDMAC_START_RUN 0x0008u 132 #define PDL_EXDMAC_STOP 0x0010u 133 134 /* Transfer end interrupt flag control */ 135 #define PDL_EXDMAC_CLEAR_DTIF 0x0020u 136 #define PDL_EXDMAC_CLEAR_ESIF 0x0040u 137 138 /* Modify registers selection */ 139 #define PDL_EXDMAC_UPDATE_SOURCE 0x0080u 140 #define PDL_EXDMAC_UPDATE_DESTINATION 0x0100u 141 #define PDL_EXDMAC_UPDATE_COUNT 0x0200u 142 #define PDL_EXDMAC_UPDATE_SIZE 0x0400u 143 #define PDL_EXDMAC_UPDATE_OFFSET 0x0800u 144 #define PDL_EXDMAC_UPDATE_REPEAT_SOURCE 0x1000u 145 #define PDL_EXDMAC_UPDATE_REPEAT_DESTINATION 0x2000u 146 147 #endif 148 /* End of file */ 149