Synergy Software Package User's Manual

#include <r_transfer_api.h>

Data Fields

ssp_err_t(* open )(transfer_ctrl_t *const p_ctrl, transfer_cfg_t const *const p_cfg)
 
ssp_err_t(* reset )(transfer_ctrl_t *const p_ctrl, void const *p_src, void *p_dest, uint16_t const num_transfers)
 
ssp_err_t(* enable )(transfer_ctrl_t *const p_ctrl)
 
ssp_err_t(* disable )(transfer_ctrl_t *const p_ctrl)
 
ssp_err_t(* start )(transfer_ctrl_t *const p_ctrl, transfer_start_mode_t mode)
 
ssp_err_t(* stop )(transfer_ctrl_t *const p_ctrl)
 
ssp_err_t(* infoGet )(transfer_ctrl_t *const p_ctrl, transfer_properties_t *const p_info)
 
ssp_err_t(* close )(transfer_ctrl_t *const p_ctrl)
 
ssp_err_t(* versionGet )(ssp_version_t *const p_version)
 
ssp_err_t(* blockReset )(transfer_ctrl_t *const p_ctrl, void const *p_src, void *p_dest, uint16_t const length, transfer_size_t size, uint16_t const num_transfers)
 
ssp_err_t(* Stop_ActivationRequest )(transfer_ctrl_t *const p_ctrl)
 

Detailed Description

Transfer functions implemented at the HAL layer will follow this API.

Field Documentation

◆ blockReset

ssp_err_t(* transfer_api_t::blockReset) (transfer_ctrl_t *const p_ctrl, void const *p_src, void *p_dest, uint16_t const length, transfer_size_t size, uint16_t const num_transfers)

Reset source address pointer, destination address pointer, and/or length, for block transfer keeping all other settings the same. Enable the transfer if p_src, p_dest, and length are valid.

Implemented as
Parameters
[in]p_ctrlControl block set in transfer_api_t::open call for this transfer.
[in]p_srcPointer to source. Set to NULL if source pointer should not change.
[in]p_destPointer to destination. Set to NULL if destination pointer should not change.
[in]lengthTransfer length in block mode.In DMAC only.
[in]sizeTransfer size in block mode. In DMAC only.
[in]num_transfersnumber of blocks in block mode. In DMAC only.

◆ close

ssp_err_t(* transfer_api_t::close) (transfer_ctrl_t *const p_ctrl)

Releases hardware lock. This allows a transfer to be reconfigured using transfer_api_t::open.

Implemented as
Parameters
[in]p_ctrlControl block set in transfer_api_t::open call for this transfer.

◆ disable

ssp_err_t(* transfer_api_t::disable) (transfer_ctrl_t *const p_ctrl)

Disable transfer. Transfers do not occur after the transfer_info_t::activation source event (or when transfer_api_t::start is called if ELC_EVENT_ELC_SOFTWARE_EVENT_0 or ELC_EVENT_ELC_SOFTWARE_EVENT_0 is chosen as transfer_info_t::activation_source).

Note
If a transfer is in progress, it will be completed. Subsequent transfer requests do not cause a transfer.
Implemented as
Parameters
[in]p_ctrlControl block set in transfer_api_t::open call for this transfer.

◆ enable

ssp_err_t(* transfer_api_t::enable) (transfer_ctrl_t *const p_ctrl)

Enable transfer. Transfers occur after the activation source event (or when transfer_api_t::start is called if ELC_EVENT_ELC_SOFTWARE_EVENT_0 or ELC_EVENT_ELC_SOFTWARE_EVENT_0 is chosen as activation source).

Implemented as
Parameters
[in]p_ctrlControl block set in transfer_api_t::open call for this transfer.

◆ infoGet

ssp_err_t(* transfer_api_t::infoGet) (transfer_ctrl_t *const p_ctrl, transfer_properties_t *const p_info)

Provides information about this transfer.

Implemented as
Parameters
[in]p_ctrlControl block set in transfer_api_t::open call for this transfer.
[out]p_infoDriver specific information.

◆ open

ssp_err_t(* transfer_api_t::open) (transfer_ctrl_t *const p_ctrl, transfer_cfg_t const *const p_cfg)

Initial configuration. Enables the transfer if auto_enable is true and p_src, p_dest, and length are valid. Transfers can also be enabled using transfer_api_t::enable or transfer_api_t::reset.

Implemented as
Parameters
[in,out]p_ctrlPointer to control block. Must be declared by user. Elements set here.
[in]p_cfgPointer to configuration structure. All elements of this structure must be set by user.

◆ reset

ssp_err_t(* transfer_api_t::reset) (transfer_ctrl_t *const p_ctrl, void const *p_src, void *p_dest, uint16_t const num_transfers)

Reset source address pointer, destination address pointer, and/or length, keeping all other settings the same. Enable the transfer if p_src, p_dest, and length are valid.

Implemented as
Parameters
[in]p_ctrlControl block set in transfer_api_t::open call for this transfer.
[in]p_srcPointer to source. Set to NULL if source pointer should not change.
[in]p_destPointer to destination. Set to NULL if destination pointer should not change.
[in]num_transfersTransfer length in normal mode or number of blocks in block mode. In DMAC only, resets number of repeats (initially stored in transfer_info_t::num_blocks) in repeat mode. Not used in repeat mode for DTC.

◆ start

ssp_err_t(* transfer_api_t::start) (transfer_ctrl_t *const p_ctrl, transfer_start_mode_t mode)

Start transfer in software.

Warning
Only works if ELC_EVENT_ELC_SOFTWARE_EVENT_0 or ELC_EVENT_ELC_SOFTWARE_EVENT_0 is chosen as transfer_info_t::activation_source.
Note
DTC only supports TRANSFER_START_MODE_SINGLE. DTC does not support TRANSFER_START_MODE_REPEAT.
Implemented as
Parameters
[in]p_ctrlControl block set in transfer_api_t::open call for this transfer.
[in]modeSelect mode from transfer_start_mode_t.

◆ stop

ssp_err_t(* transfer_api_t::stop) (transfer_ctrl_t *const p_ctrl)

Stop transfer in software. The transfer will stop after completion of the current transfer.

Note
Not supported for DTC.
Only applies for transfers started with TRANSFER_START_MODE_REPEAT.
Warning
Only works if ELC_EVENT_ELC_SOFTWARE_EVENT_0 or ELC_EVENT_ELC_SOFTWARE_EVENT_0 is chosen as transfer_info_t::activation_source.
Implemented as
Parameters
[in]p_ctrlControl block set in transfer_api_t::open call for this transfer.

◆ Stop_ActivationRequest

ssp_err_t(* transfer_api_t::Stop_ActivationRequest) (transfer_ctrl_t *const p_ctrl)

Clears the DMA activation request with a DMA dummy transfer as per flowchart in the hardware manual. Implements transfer_api_t::Stop_ActivationRequest.

Note
This function to be used only in scenario when a DMA activation request source might occur in the next request after a DMA transfer completes. If this happens, the DMA transfer starts and the DMA activation request is held in DMAC.
Implemented as
Parameters
[in]p_ctrlControl block set in transfer_api_t::open call for this transfer.

◆ versionGet

ssp_err_t(* transfer_api_t::versionGet) (ssp_version_t *const p_version)

Gets version and stores it in provided pointer p_version.

Implemented as
Parameters
[out]p_versionCode and API version used.

The documentation for this struct was generated from the following file: