![]() |
Synergy Software Package User's Manual
|
DMA controller for PTP driver. More...
Data Structures | |
| struct | ptpedmac_instance_ctrl_t |
Functions | |
| ssp_err_t | R_PTPEDMAC_Open (ptpedmac_ctrl_t *const p_api_ctrl, ptpedmac_cfg_t const *const p_cfg) |
| Open the PTP host interface (PTPEDMAC), handles required initialization described in hardware manual. Implements ptpedmac_api_t::open. More... | |
| ssp_err_t | R_PTPEDMAC_LinkProcess (ptpedmac_ctrl_t *const p_api_ctrl) |
| Sets PTP host interface to transfer PTP messages. Implements ptpedmac_api_t::linkProcess. More... | |
| ssp_err_t | R_PTPEDMAC_CheckLink (ptpedmac_ctrl_t *const p_api_ctrl) |
| Checks PTP host interface communication link. Implements ptpedmac_api_t::checkLink. More... | |
| ssp_err_t | R_PTPEDMAC_Read (ptpedmac_ctrl_t *const p_api_ctrl, uint32_t *p_channel, void *p_buffer, int32_t *p_num_received) |
| Receive PTP message. Implements ptpedmac_api_t::read. More... | |
| ssp_err_t | R_PTPEDMAC_Close (ptpedmac_ctrl_t *const p_api_ctrl) |
| Disable PTP host interface. Implements ptpedmac_api_t::close. More... | |
| ssp_err_t | R_PTPEDMAC_VersionGet (ssp_version_t *const p_version) |
| This function returns the API version. Implements ptpedmac_api_t::versionGet. More... | |
DMA controller for PTP driver.
This module implements the following interface: PTPEDMAC driver Interface.
| ssp_err_t R_PTPEDMAC_CheckLink | ( | ptpedmac_ctrl_t *const | p_api_ctrl | ) |
Checks PTP host interface communication link. Implements ptpedmac_api_t::checkLink.
| SSP_SUCCESS | PTP host interface link status is verified successfully |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_NOT_OPEN | PTPEDMAC driver is not opened. |
| SSP_ERR_NOT_ENABLED | PTP host interface is not enabled |
Check the current status of PTP message transfer
| ssp_err_t R_PTPEDMAC_Close | ( | ptpedmac_ctrl_t *const | p_api_ctrl | ) |
Disable PTP host interface. Implements ptpedmac_api_t::close.
| SSP_SUCCESS | PTP host interface is closed successfully |
| SSP_ERR_NOT_OPEN | PTPEDMAC driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
Clear PTPEDMAC interrupt
Set PTP Host interface transfer flag to disable
The device is now considered closed
| ssp_err_t R_PTPEDMAC_LinkProcess | ( | ptpedmac_ctrl_t *const | p_api_ctrl | ) |
Sets PTP host interface to transfer PTP messages. Implements ptpedmac_api_t::linkProcess.
| SSP_SUCCESS | PTP host interface has linked successfully to transfer PTP messages |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_NOT_OPEN | PTPEDMAC driver is not opened. |
Initialize the receive descriptor
Initialize and configure PTPEDMAC
Set PTP Host interface transfer flag to enable
| ssp_err_t R_PTPEDMAC_Open | ( | ptpedmac_ctrl_t *const | p_api_ctrl, |
| ptpedmac_cfg_t const *const | p_cfg | ||
| ) |
Open the PTP host interface (PTPEDMAC), handles required initialization described in hardware manual. Implements ptpedmac_api_t::open.
| SSP_SUCCESS | PTP host interface has opened successfully and initialization was successful. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_IRQ_BSP_DISABLED | A required interrupt does not exist in the vector table |
Reset PTPEDMAC
Wait at least 64 cycles of PCLKA to reset the PTPEDMAC and EPTPC. PCLKA must be at least 12.5 MHz to use Ethernet, so wait at least 5.12 us.
Make sure the peripheral exists.
Initialize the channel state information.
If interrupt is registered in the vector table, disable interrupts, set priority, and store control block in the vector information so it can be accessed from the callback.
Enable PINT interrupt
Initialize frame transfer status flag
Mark driver as opened by initializing it to "DMAC" in its ASCII equivalent for this unit.
| ssp_err_t R_PTPEDMAC_Read | ( | ptpedmac_ctrl_t *const | p_api_ctrl, |
| uint32_t * | p_channel, | ||
| void * | p_buffer, | ||
| int32_t * | p_num_received | ||
| ) |
Receive PTP message. Implements ptpedmac_api_t::read.
| SSP_SUCCESS | PTP message received successfully |
| SSP_ERR_TIMEOUT | No data received |
| SSP_ERR_NOT_OPEN | PTPEDMAC driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_NOT_ENABLED | PTP host interface is not enabled |
Set the allocated buffer pointer for received data
| ssp_err_t R_PTPEDMAC_VersionGet | ( | ssp_version_t *const | p_version | ) |
This function returns the API version. Implements ptpedmac_api_t::versionGet.
| [in] | p_version | Pointer to the API version block |
| SSP_SUCCESS | Successful close. |
| SSP_ERR_ASSERTION | The parameter p_version is NULL. |
Return the version number