5
5
*/
6
6
7
7
/*******************************************************************************************************************/ /**
8
- * @ingroup RENESAS_INTERFACES
8
+ * @ingroup RENESAS_TRANSFER_INTERFACES
9
9
* @defgroup TRANSFER_API Transfer Interface
10
10
*
11
11
* @brief Interface for data transfer functions.
12
12
*
13
13
* @section TRANSFER_API_SUMMARY Summary
14
14
* The transfer interface supports background data transfer (no CPU intervention).
15
15
*
16
- * Implemented by:
17
- * - @ref DMAC_B
18
16
*
19
17
* @{
20
18
**********************************************************************************************************************/
@@ -49,8 +47,6 @@ FSP_HEADER
49
47
**********************************************************************************************************************/
50
48
51
49
/** Transfer control block. Allocate an instance specific control block to pass into the transfer API calls.
52
- * @par Implemented as
53
- * - dmac_b_instance_ctrl_t
54
50
*/
55
51
typedef void transfer_ctrl_t ;
56
52
@@ -95,7 +91,8 @@ typedef enum e_transfer_size
95
91
{
96
92
TRANSFER_SIZE_1_BYTE = 0 , ///< Each transfer transfers a 8-bit value
97
93
TRANSFER_SIZE_2_BYTE = 1 , ///< Each transfer transfers a 16-bit value
98
- TRANSFER_SIZE_4_BYTE = 2 ///< Each transfer transfers a 32-bit value
94
+ TRANSFER_SIZE_4_BYTE = 2 , ///< Each transfer transfers a 32-bit value
95
+ TRANSFER_SIZE_8_BYTE = 3 ///< Each transfer transfers a 64-bit value
99
96
} transfer_size_t ;
100
97
101
98
#endif
@@ -172,6 +169,16 @@ typedef enum e_transfer_irq
172
169
173
170
#endif
174
171
172
+ #ifndef BSP_OVERRIDE_TRANSFER_CALLBACK_ARGS_T
173
+
174
+ /** Callback function parameter data. */
175
+ typedef struct st_transfer_callback_args_t
176
+ {
177
+ void const * p_context ; ///< Placeholder for user data. Set in @ref transfer_api_t::open function in ::transfer_cfg_t.
178
+ } transfer_callback_args_t ;
179
+
180
+ #endif
181
+
175
182
/** Driver specific information. */
176
183
typedef struct st_transfer_properties
177
184
{
@@ -266,8 +273,6 @@ typedef enum e_transfer_start_mode
266
273
typedef struct st_transfer_api
267
274
{
268
275
/** Initial configuration.
269
- * @par Implemented as
270
- * - @ref R_DMAC_B_Open()
271
276
*
272
277
* @param[in,out] p_ctrl Pointer to control block. Must be declared by user. Elements set here.
273
278
* @param[in] p_cfg Pointer to configuration structure. All elements of this structure
@@ -277,8 +282,6 @@ typedef struct st_transfer_api
277
282
278
283
/** Reconfigure the transfer.
279
284
* Enable the transfer if p_info is valid.
280
- * @par Implemented as
281
- * - @ref R_DMAC_B_Reconfigure()
282
285
*
283
286
* @param[in,out] p_ctrl Pointer to control block. Must be declared by user. Elements set here.
284
287
* @param[in] p_info Pointer to a new transfer info structure.
@@ -287,8 +290,6 @@ typedef struct st_transfer_api
287
290
288
291
/** Reset source address pointer, destination address pointer, and/or length, keeping all other settings the same.
289
292
* Enable the transfer if p_src, p_dest, and length are valid.
290
- * @par Implemented as
291
- * - @ref R_DMAC_B_Reset()
292
293
*
293
294
* @param[in] p_ctrl Control block set in @ref transfer_api_t::open call for this transfer.
294
295
* @param[in] p_src Pointer to source. Set to NULL if source pointer should not change.
@@ -302,8 +303,6 @@ typedef struct st_transfer_api
302
303
303
304
/** Enable transfer. Transfers occur after the activation source event (or when
304
305
* @ref transfer_api_t::softwareStart is called if no peripheral event is chosen as activation source).
305
- * @par Implemented as
306
- * - @ref R_DMAC_B_Enable()
307
306
*
308
307
* @param[in] p_ctrl Control block set in @ref transfer_api_t::open call for this transfer.
309
308
*/
@@ -313,8 +312,6 @@ typedef struct st_transfer_api
313
312
* @ref transfer_api_t::softwareStart is called if no peripheral event is chosen as the DMAC activation source).
314
313
* @note If a transfer is in progress, it will be completed. Subsequent transfer requests do not cause a
315
314
* transfer.
316
- * @par Implemented as
317
- * - @ref R_DMAC_B_Disable()
318
315
*
319
316
* @param[in] p_ctrl Control block set in @ref transfer_api_t::open call for this transfer.
320
317
*/
@@ -323,8 +320,6 @@ typedef struct st_transfer_api
323
320
/** Start transfer in software.
324
321
* @warning Only works if no peripheral event is chosen as the DMAC activation source.
325
322
* @note Not supported for DTC.
326
- * @par Implemented as
327
- * - @ref R_DMAC_B_SoftwareStart()
328
323
*
329
324
* @param[in] p_ctrl Control block set in @ref transfer_api_t::open call for this transfer.
330
325
* @param[in] mode Select mode from @ref transfer_start_mode_t.
@@ -335,34 +330,26 @@ typedef struct st_transfer_api
335
330
* @note Not supported for DTC.
336
331
* @note Only applies for transfers started with TRANSFER_START_MODE_REPEAT.
337
332
* @warning Only works if no peripheral event is chosen as the DMAC activation source.
338
- * @par Implemented as
339
- * - @ref R_DMAC_B_SoftwareStop()
340
333
*
341
334
* @param[in] p_ctrl Control block set in @ref transfer_api_t::open call for this transfer.
342
335
*/
343
336
fsp_err_t (* softwareStop )(transfer_ctrl_t * const p_ctrl );
344
337
345
338
/** Provides information about this transfer.
346
- * @par Implemented as
347
- * - @ref R_DMAC_B_InfoGet()
348
339
*
349
340
* @param[in] p_ctrl Control block set in @ref transfer_api_t::open call for this transfer.
350
341
* @param[out] p_properties Driver specific information.
351
342
*/
352
343
fsp_err_t (* infoGet )(transfer_ctrl_t * const p_ctrl , transfer_properties_t * const p_properties );
353
344
354
345
/** Releases hardware lock. This allows a transfer to be reconfigured using @ref transfer_api_t::open.
355
- * @par Implemented as
356
- * - @ref R_DMAC_B_Close()
357
346
*
358
347
* @param[in] p_ctrl Control block set in @ref transfer_api_t::open call for this transfer.
359
348
*/
360
349
fsp_err_t (* close )(transfer_ctrl_t * const p_ctrl );
361
350
362
351
/** To update next transfer information without interruption during transfer.
363
352
* Allow further transfer continuation.
364
- * @par Implemented as
365
- * - @ref R_DMAC_B_Reload()
366
353
*
367
354
* @param[in] p_ctrl Control block set in @ref transfer_api_t::open call for this transfer.
368
355
* @param[in] p_src Pointer to source. Set to NULL if source pointer should not change.
@@ -372,6 +359,16 @@ typedef struct st_transfer_api
372
359
fsp_err_t (* reload )(transfer_ctrl_t * const p_ctrl , void const * p_src , void * p_dest ,
373
360
uint32_t const num_transfers );
374
361
362
+ /** Specify callback function and optional context pointer and working memory pointer.
363
+ *
364
+ * @param[in] p_ctrl Control block set in @ref transfer_api_t::open call for this transfer.
365
+ * @param[in] p_callback Callback function to register
366
+ * @param[in] p_context Pointer to send to callback function
367
+ * @param[in] p_callback_memory Pointer to volatile memory where callback structure can be allocated.
368
+ * Callback arguments allocated here are only valid during the callback.
369
+ */
370
+ fsp_err_t (* callbackSet )(transfer_ctrl_t * const p_ctrl , void (* p_callback )(transfer_callback_args_t * ),
371
+ void const * const p_context , transfer_callback_args_t * const p_callback_memory );
375
372
} transfer_api_t ;
376
373
377
374
/** This structure encompasses everything that is needed to use an instance of this interface. */
0 commit comments