![]() |
Synergy Software Package User's Manual
|
Driver for the Data Transfer Controller (DTC). More...
Data Structures | |
| struct | dtc_instance_ctrl_t |
| struct | dtc_reg_t |
Macros | |
| #define | DTC_REPEAT_BLOCK_MAX_LENGTH (0x100) |
| #define | DTC_NORMAL_MAX_LENGTH (0x10000) |
Functions | |
| ssp_err_t | R_DTC_Open (transfer_ctrl_t *const p_api_ctrl, transfer_cfg_t const *const p_cfg) |
| Set transfer data in the vector table and enable transfer in ICU. Implements transfer_api_t::open. More... | |
| ssp_err_t | R_DTC_Reset (transfer_ctrl_t *const p_api_ctrl, void const *volatile p_src, void *volatile p_dest, uint16_t const num_transfers) |
| Reset transfer source, destination, and number of transfers. Implements transfer_api_t::reset. More... | |
| ssp_err_t | R_DTC_Start (transfer_ctrl_t *const p_api_ctrl, transfer_start_mode_t mode) |
| Start transfer. Implements transfer_api_t::start. More... | |
| ssp_err_t | R_DTC_Stop (transfer_ctrl_t *const p_ctrl) |
| Placeholder for unsupported stop function. Implements transfer_api_t::stop. More... | |
| ssp_err_t | R_DTC_Enable (transfer_ctrl_t *const p_api_ctrl) |
| Enable transfer and ELC events if they are used for software start. Implements transfer_api_t::enable. More... | |
| ssp_err_t | R_DTC_Disable (transfer_ctrl_t *const p_api_ctrl) |
| Disable transfer. Implements transfer_api_t::disable. More... | |
| ssp_err_t | R_DTC_InfoGet (transfer_ctrl_t *const p_api_ctrl, transfer_properties_t *const p_info) |
| Set driver specific information. Implements transfer_api_t::infoGet. More... | |
| ssp_err_t | R_DTC_Close (transfer_ctrl_t *const p_api_ctrl) |
| Disables transfer in the ICU, then clears transfer data from the DTC vector table. Implements transfer_api_t::close. More... | |
| ssp_err_t | R_DTC_VersionGet (ssp_version_t *const p_version) |
| Set driver version based on compile time macros. Implements transfer_api_t::versionGet. More... | |
| ssp_err_t | R_DTC_BlockReset (transfer_ctrl_t *const p_api_ctrl, void const *volatile p_src, void *volatile p_dest, uint16_t const length, transfer_size_t size, uint16_t const num_transfers) |
| BlockReset transfer source, destination, length and number of transfers. Implements transfer_api_t::blockReset. More... | |
| ssp_err_t | R_DTC_Stop_ActivationRequest (transfer_ctrl_t *const p_api_ctrl) |
| Placeholder for unsupported DummyTransfer function. Implements transfer_api_t::Stop_ActivationRequest. More... | |
Driver for the Data Transfer Controller (DTC).
Extends Transfer Interface.
The Data Transfer Controller allows data transfers to occur in place of or in addition to any interrupt. It does not support data transfers using software start.
| #define DTC_NORMAL_MAX_LENGTH (0x10000) |
Length limited to 65536 transfers for normal mode
| #define DTC_REPEAT_BLOCK_MAX_LENGTH (0x100) |
Length limited to 256 transfers for repeat and block mode
| ssp_err_t R_DTC_BlockReset | ( | transfer_ctrl_t *const | p_api_ctrl, |
| void const *volatile | p_src, | ||
| void *volatile | p_dest, | ||
| uint16_t const | length, | ||
| transfer_size_t | size, | ||
| uint16_t const | num_transfers | ||
| ) |
BlockReset transfer source, destination, length and number of transfers. Implements transfer_api_t::blockReset.
| SSP_SUCCESS | Transfer reset successfully. |
| SSP_ERR_ASSERTION | An input parameter is invalid. |
| SSP_ERR_NOT_OPEN | Handle is not initialized. Call R_DTC_Open to initialize the control block. |
| SSP_ERR_UNSUPPORTED | If mode is other than Block Transfer Mode. |
| SSP_ERR_NOT_ENABLED | Enable failed due to an invalid input parameter:
|
Disable transfers on this activation source.
Disable read skip prior to modifying settings. It will be enabled later.
Reset transfer based on input parameters.
Enables transfers on this activation source.
Enable read skip after all settings are complete.
| ssp_err_t R_DTC_Close | ( | transfer_ctrl_t *const | p_api_ctrl | ) |
Disables transfer in the ICU, then clears transfer data from the DTC vector table. Implements transfer_api_t::close.
| SSP_SUCCESS | Successful close. |
| SSP_ERR_ASSERTION | An input parameter is invalid. |
| SSP_ERR_NOT_OPEN | Handle is not initialized. Call R_DTC_Open to initialize the control block. |
| SSP_ERR_IRQ_BSP_DISABLED | The IRQ associated with the p_ctrl is not enabled in the BSP. |
Clear DTC enable bit in ICU.
Clear pointer in vector table.
| ssp_err_t R_DTC_Disable | ( | transfer_ctrl_t *const | p_api_ctrl | ) |
Disable transfer. Implements transfer_api_t::disable.
| SSP_SUCCESS | Counter value written successfully. |
| SSP_ERR_ASSERTION | An input parameter is invalid. |
| SSP_ERR_NOT_OPEN | Handle is not initialized. Call R_DTC_Open to initialize the control block. |
Disable transfer.
| ssp_err_t R_DTC_Enable | ( | transfer_ctrl_t *const | p_api_ctrl | ) |
Enable transfer and ELC events if they are used for software start. Implements transfer_api_t::enable.
| SSP_SUCCESS | Counter value written successfully. |
| SSP_ERR_ASSERTION | An input parameter is invalid. |
| SSP_ERR_NOT_OPEN | Handle is not initialized. Call R_DTC_Open to initialize the control block. |
| SSP_ERR_IRQ_BSP_DISABLED | The IRQ associated with the p_ctrl is not enabled in the BSP. |
Enable transfer.
| ssp_err_t R_DTC_InfoGet | ( | transfer_ctrl_t *const | p_api_ctrl, |
| transfer_properties_t *const | p_info | ||
| ) |
Set driver specific information. Implements transfer_api_t::infoGet.
| SSP_SUCCESS | Counter value written successfully. |
| SSP_ERR_ASSERTION | An input parameter is invalid. |
| SSP_ERR_NOT_OPEN | Handle is not initialized. Call R_DTC_Open to initialize the control block. |
If a transfer is active, store it in p_in_progress.
Transfer information for the activation source is taken from DTC vector table.
Mask out the high byte in case of repeat transfer.
Store maximum transfer length.
| ssp_err_t R_DTC_Open | ( | transfer_ctrl_t *const | p_api_ctrl, |
| transfer_cfg_t const *const | p_cfg | ||
| ) |
Set transfer data in the vector table and enable transfer in ICU. Implements transfer_api_t::open.
| SSP_SUCCESS | Successful open. Transfer is configured and will start when trigger occurs. |
| SSP_ERR_ASSERTION | An input parameter is invalid. |
| SSP_ERR_IN_USE | The BSP hardware lock for the DTC is not available, or the index for this IRQ in the DTC vector table is already configured. |
| SSP_ERR_HW_LOCKED | DTC hardware resource is locked. |
| SSP_ERR_IRQ_BSP_DISABLED | The IRQ associated with the activation source is not enabled in the BSP. |
| SSP_ERR_NOT_ENABLED | Auto-enable was requested, but enable failed due to an invalid input parameter. |
Make sure the activation source is mapped in the ICU.
Make sure the activation source is not already being used by the DTC.
Configure the DTC transfer. See the hardware manual for details.
Update internal variables.
Mark driver as open by initializing it to "DTC" in its ASCII equivalent.
If auto_enable is true, enable transfer and ELC events if software start is used.
Enable read skip after all settings are complete.
| ssp_err_t R_DTC_Reset | ( | transfer_ctrl_t *const | p_api_ctrl, |
| void const *volatile | p_src, | ||
| void *volatile | p_dest, | ||
| uint16_t const | num_transfers | ||
| ) |
Reset transfer source, destination, and number of transfers. Implements transfer_api_t::reset.
| SSP_SUCCESS | Transfer reset successfully. |
| SSP_ERR_ASSERTION | An input parameter is invalid. |
| SSP_ERR_NOT_OPEN | Handle is not initialized. Call R_DTC_Open to initialize the control block. |
| SSP_ERR_NOT_ENABLED | Transfer length must not be 0 for repeat and block mode, or enable failed due to an invalid input parameter:
|
Disable transfers on this activation source.
Disable read skip prior to modifying settings. It will be enabled later.
Reset transfer based on input parameters.
Enables transfers on this activation source.
Enable read skip after all settings are complete.
| ssp_err_t R_DTC_Start | ( | transfer_ctrl_t *const | p_api_ctrl, |
| transfer_start_mode_t | mode | ||
| ) |
Start transfer. Implements transfer_api_t::start.
| SSP_SUCCESS | Transfer started successfully. |
| SSP_ERR_ASSERTION | An input parameter is invalid. |
| SSP_ERR_NOT_OPEN | Handle is not initialized. Call R_DMAC_Open to initialize the control block. |
| SSP_ERR_UNSUPPORTED | One of the following is invalid:
|
| ssp_err_t R_DTC_Stop | ( | transfer_ctrl_t *const | p_ctrl | ) |
Placeholder for unsupported stop function. Implements transfer_api_t::stop.
| SSP_ERR_UNSUPPORTED | DTC software start is not supported. |
Mark the input parameter as unused since this function isn't supported.
| ssp_err_t R_DTC_Stop_ActivationRequest | ( | transfer_ctrl_t *const | p_api_ctrl | ) |
Placeholder for unsupported DummyTransfer function. Implements transfer_api_t::Stop_ActivationRequest.
| SSP_ERR_UNSUPPORTED | R_DTC_Stop_ActivationRequest function is not implemented, Its just a placeholder . |
Mark the input parameter as unused since this function isn't supported.
| ssp_err_t R_DTC_VersionGet | ( | ssp_version_t *const | p_version | ) |
Set driver version based on compile time macros. Implements transfer_api_t::versionGet.
| SSP_SUCCESS | Successful close. |
| SSP_ERR_ASSERTION | An input parameter is invalid. |
Set driver version based on compile time macros