PROFINET Device4.1.1
 
Loading...
Searching...
No Matches

◆ PN_API_IOD_freeIsoObj()

uint32_t PN_API_IOD_freeIsoObj ( PN_API_IOD_Handle_t *const  pnHandle,
PN_API_IOD_IsoObjHndl_t const  objHandle 
)

Dealocates a pre-existing object.

This function clears a pre-existing isochronous object.

Warning
Because of some internal limitation, it is required to free all instances at once. If only single one is freed, the others will not work anymore.
Parameters
[in]pnHandleProfinet API Handle.
[out]objHandleHandle to given address.
Returns
result of the operation as uint32_t.
Return values
PN_API_OKSuccess.
PN_API_NOT_OKSomething went wrong.
PN_API_ERR_PARAMInvalid parameter.
Warning
The application is responsible for reconfiguring a GPIO previously set up using PN_API_IOD_activateIsoGpioObj().
Example
#include "pn_api_iod_isoch.h"
#include "pn_api_iod_startup.h"
PN_API_IOD_Handle_t* pnHandle = NULL;
uint32_t status;
pnHandle = PN_API_IOD_new();
//Prepare and call PN_API_IOD_startup()
...
//Initialize the isochronous object using PN_API_IOD_activateIsoIsrObj() or
//PN_API_IOD_activateIsoGpioObj() in the user application, and obtain the
object handle (objHandle).
status = PN_API_IOD_freeIsoObj(pnHandle, objHandle);
PN_API_IOD_Handle_t * PN_API_IOD_new(void)
Creates Profinet API handle.
uint32_t PN_API_IOD_freeIsoObj(PN_API_IOD_Handle_t *const pnHandle, PN_API_IOD_IsoObjHndl_t const objHandle)
Dealocates a pre-existing object.
struct PN_API_IOD_Handle PN_API_IOD_Handle_t
API handle instance which holds IO device's info.
Definition pn_api_iod_types.h:61