AM64x INDUSTRIAL COMMUNICATIONS SDK  2026.00.00

Introduction

IO-Link Master Firmware Hardware Abstraction Layer.

The FWHAL module provides an abstraction layer between the IO-Link stack and the PRU-ICSS firmware. It handles:

Data Structures

struct  IOLFW_PortInst_t
 IO-Link port instance data. More...
 
struct  IOLFW_Inst_t
 IOLFW instance handle. More...
 
struct  IOLFW_GpioConfig_t
 GPIO pin configuration. More...
 
struct  IOLFW_GpioPruConfig_t
 GPIO configuration with PRU pin mapping. More...
 
struct  IOLFW_GpioEnConfig_t
 GPIO enable configuration with PRU direct access. More...
 
struct  IOLFW_PortConfig_t
 IO-Link port hardware configuration. More...
 
struct  IOLFW_Config_t
 IOLFW initialization configuration. More...
 
struct  IOLFW_PlCallbacks_t
 Physical Layer (PL) callbacks. More...
 
struct  IOLFW_SpCallbacks_t
 Stack Porting Layer (SP) callbacks. More...
 

Typedefs

typedef struct IOLFW_PruMem IOLFW_PruMem_t
 
typedef struct IOLFW_PruMemTimer IOLFW_PruMemTimer_t
 
typedef void(* IOLFW_cbSetMode_t) (IOLFW_Inst_t *pFwInstance, uint8_t portNum, IOLFW_ePortMode_t mode)
 Port mode change callback. More...
 
typedef const IOLFW_PortConfig_t *(* IOLFW_cbGetPortCfg_t) (IOLFW_Inst_t *pFwInstance, uint8_t portNum)
 Get port configuration callback. More...
 
typedef void(* IOLFW_cbRxErrEvent_t) (IOLFW_Inst_t *pFwInstance, uint8_t port, IOLFW_eRxErrorEvents_t rxErr)
 RX error event callback. More...
 
typedef void(* IOLFW_cbTransferInd_t) (IOLFW_Inst_t *pFwInstance, uint8_t port, uint8_t dataLen, IOLFW_eTransferStatus_t eTrStatus)
 Transfer indication callback. More...
 
typedef void(* IOLFW_cbStartupCmpl_t) (IOLFW_Inst_t *pFwInstance, uint8_t port, IOLFW_eStartupStatus_t eStrStatus)
 Startup/wake-up completion callback. More...
 
typedef IOLFW_Inst_t *(* IOLFW_cbGetInstCont_t) (uint8_t inst_p)
 Get instance container callback. More...
 

Enumerations

enum  IOLFW_ePortMode_t {
  IOLFW_ePortMode_SioInactive = 0, IOLFW_ePortMode_Sdci, IOLFW_ePortMode_SioDI, IOLFW_ePortMode_SioDO,
  IOLFW_ePortMode_Force32Bit = 0x7fffffff
}
 IO-Link port operating mode. More...
 
enum  IOLFW_eInstanceState_t { IOLFW_eInstanceState_NotInitialized = 0, IOLFW_eInstanceState_Init, IOLFW_eInstanceState_Running }
 IOLFW instance state. More...
 
enum  IOLFW_eBaudrate_t { IOLFW_eBaudrate_Auto = 0, IOLFW_eBaudrate_Com1, IOLFW_eBaudrate_Com2, IOLFW_eBaudrate_Com3 }
 IO-Link transmission rate (baud rate) More...
 
enum  IOLFW_eRxErrorEvents_t { IOLFW_eRxErrorEvents_Rxol = 0 }
 RX error event types. More...
 
enum  IOLFW_eTransferStatus_t { IOLFW_eTransferStatus_Ok = 0, IOLFW_eTransferStatus_ParityError, IOLFW_eTransferStatus_FramingError, IOLFW_eTransferStatus_Overrun }
 Data transfer status codes. More...
 
enum  IOLFW_eStartupStatus_t { IOLFW_eStartupStatus_Ok = 0, IOLFW_eStartupStatus_NoResponse }
 Port startup/wake-up status codes. More...
 

Macros

#define IOLFW_TA_BIT_DEFAULT   (11)
 
#define IOLFW_MAX_PD_SIZE   (32)
 
#define IOLFW_MAX_OD_SIZE   (32)
 
#define IOLFW_TR_DEF   (3)
 
#define IOLFW_MAX_RESPONSE_TIME   (85U)
 
#define IOLFW_STRUCT_PACKED   __attribute__((__packed__))
 
#define IOLFW_ERR_SUCCESS   (0)
 
#define IOLFW_ERR_BASE_CODE   (-150)
 
#define IOLFW_ERR_PRECONFIG   (IOLFW_ERR_BASE_CODE - 1)
 
#define IOLFW_ERR_EMPTY_ARG   (IOLFW_ERR_BASE_CODE - 2)
 
#define IOLFW_ERR_INST_INVALID   (IOLFW_ERR_BASE_CODE - 4)
 
#define IOLFW_ERR_INST_ALL_USED   (IOLFW_ERR_BASE_CODE - 5)
 
#define IOLFW_ERR_CB_PORT_CFG   (IOLFW_ERR_BASE_CODE - 6)
 
#define IOLFW_ERR_CB_SET_MODE   (IOLFW_ERR_BASE_CODE - 7)
 
#define IOLFW_ERR_CB_RX_ERR_EVT   (IOLFW_ERR_BASE_CODE - 9)
 
#define IOLFW_ERR_CB_TR_IND   (IOLFW_ERR_BASE_CODE - 10)
 
#define IOLFW_ERR_CB_START_COMP   (IOLFW_ERR_BASE_CODE - 11)
 
#define IOLFW_ERR_PRU_CLOCK   (IOLFW_ERR_BASE_CODE - 12)
 
#define IOLFW_ERR_IEP_CLOCK   (IOLFW_ERR_BASE_CODE - 13)
 
#define IOLFW_ERR_VAL_OUT_OF_RANGE   (IOLFW_ERR_BASE_CODE - 14)
 
#define IOLFW_ERR_NULL_PTR   (IOLFW_ERR_BASE_CODE - 15)
 
#define IOLFW_ERR_PORT_OUT_OF_RANGE   (IOLFW_ERR_BASE_CODE - 16)
 
#define IOLFW_ERR_INVALID_CYCLE_TIME   (IOLFW_ERR_BASE_CODE - 17)
 
#define IOLFW_MAX_INST   (1)
 
#define IOLFW_MAX_PORTS   (8)
 

Callback Registration Functions

void IOLFW_registerSetModeCallback (IOLFW_cbSetMode_t pCallback)
 Register port mode change callback. More...
 
void IOLFW_registerGetPortCfgCallback (IOLFW_cbGetPortCfg_t pCallback)
 Register port configuration callback. More...
 
void IOLFW_registerRxErrEventCallback (IOLFW_cbRxErrEvent_t pCallback)
 Register RX error event callback. More...
 
void IOLFW_registerTransferIndCallback (IOLFW_cbTransferInd_t pCallback)
 Register transfer indication callback. More...
 
void IOLFW_registerStartupCmplCallback (IOLFW_cbStartupCmpl_t pCallback)
 Register startup completion callback. More...
 

Initialization Functions

int32_t IOLFW_init (IOLFW_Inst_t **pFwInstance, IOLFW_Config_t *pConfig)
 Initialize IOLFW instance. More...
 
int32_t IOLFW_deInit (IOLFW_Inst_t *pFwInstance)
 De-initialize IOLFW instance. More...
 

Port Operations

int32_t IOLFW_setPortMode (IOLFW_Inst_t *pFwInstance, uint8_t port, IOLFW_ePortMode_t eTargetMode)
 Set port operating mode. More...
 
IOLFW_eBaudrate_t IOLFW_getBaudRate (IOLFW_Inst_t *pFwInstance, uint8_t port)
 Get current baud rate of port. More...
 
int32_t IOLFW_wakeUp (IOLFW_Inst_t *pFwInstance, uint8_t port)
 Initiate IO-Link wake-up sequence. More...
 
int32_t IOLFW_transferPrepare (IOLFW_Inst_t *pFwInstance, uint8_t port, uint8_t *pData, uint8_t dataLength, uint8_t *pResponseData, uint8_t responseLength)
 Prepare data transfer. More...
 

Cycle Timer Functions

int32_t IOLFW_setMaxRespTime (IOLFW_Inst_t *pFwInstance, uint8_t port, uint8_t taRespTime)
 Set maximum response time. More...
 
int32_t IOLFW_resetCycleTime (IOLFW_Inst_t *pFwInstance, uint8_t port)
 Reset cycle timer counter. More...
 
int32_t IOLFW_setCycleTime (IOLFW_Inst_t *pFwInstance, uint8_t port, uint32_t timeUs)
 Set cycle time. More...
 
int32_t IOLFW_enableCycleTimer (IOLFW_Inst_t *pFwInstance, uint8_t port, bool enable)
 Enable or disable cycle timer. More...
 
int32_t IOLFW_configCycleTime (IOLFW_Inst_t *pFwInstance, uint8_t port, uint32_t timeUs)
 Configure and enable cycle time. More...
 

Macro Definition Documentation

◆ IOLFW_TA_BIT_DEFAULT

#define IOLFW_TA_BIT_DEFAULT   (11)

◆ IOLFW_MAX_PD_SIZE

#define IOLFW_MAX_PD_SIZE   (32)

◆ IOLFW_MAX_OD_SIZE

#define IOLFW_MAX_OD_SIZE   (32)

◆ IOLFW_TR_DEF

#define IOLFW_TR_DEF   (3)

◆ IOLFW_MAX_RESPONSE_TIME

#define IOLFW_MAX_RESPONSE_TIME   (85U)

◆ IOLFW_STRUCT_PACKED

#define IOLFW_STRUCT_PACKED   __attribute__((__packed__))

◆ IOLFW_ERR_SUCCESS

#define IOLFW_ERR_SUCCESS   (0)

◆ IOLFW_ERR_BASE_CODE

#define IOLFW_ERR_BASE_CODE   (-150)

◆ IOLFW_ERR_PRECONFIG

#define IOLFW_ERR_PRECONFIG   (IOLFW_ERR_BASE_CODE - 1)

PRU configuration failed

◆ IOLFW_ERR_EMPTY_ARG

#define IOLFW_ERR_EMPTY_ARG   (IOLFW_ERR_BASE_CODE - 2)

Empty argument

◆ IOLFW_ERR_INST_INVALID

#define IOLFW_ERR_INST_INVALID   (IOLFW_ERR_BASE_CODE - 4)

Invalid instance

◆ IOLFW_ERR_INST_ALL_USED

#define IOLFW_ERR_INST_ALL_USED   (IOLFW_ERR_BASE_CODE - 5)

All IOLFW instances in use

◆ IOLFW_ERR_CB_PORT_CFG

#define IOLFW_ERR_CB_PORT_CFG   (IOLFW_ERR_BASE_CODE - 6)

Port config callback not registered

◆ IOLFW_ERR_CB_SET_MODE

#define IOLFW_ERR_CB_SET_MODE   (IOLFW_ERR_BASE_CODE - 7)

Set mode callback not registered

◆ IOLFW_ERR_CB_RX_ERR_EVT

#define IOLFW_ERR_CB_RX_ERR_EVT   (IOLFW_ERR_BASE_CODE - 9)

RX error event callback not registered

◆ IOLFW_ERR_CB_TR_IND

#define IOLFW_ERR_CB_TR_IND   (IOLFW_ERR_BASE_CODE - 10)

Transfer indicator callback not registered

◆ IOLFW_ERR_CB_START_COMP

#define IOLFW_ERR_CB_START_COMP   (IOLFW_ERR_BASE_CODE - 11)

Startup completion callback not registered

◆ IOLFW_ERR_PRU_CLOCK

#define IOLFW_ERR_PRU_CLOCK   (IOLFW_ERR_BASE_CODE - 12)

Configured PRU clock frequency is not supported for IO-Link

◆ IOLFW_ERR_IEP_CLOCK

#define IOLFW_ERR_IEP_CLOCK   (IOLFW_ERR_BASE_CODE - 13)

Configured IEP clock frequency is not supported for IO-Link

◆ IOLFW_ERR_VAL_OUT_OF_RANGE

#define IOLFW_ERR_VAL_OUT_OF_RANGE   (IOLFW_ERR_BASE_CODE - 14)

Parameter is out of range

◆ IOLFW_ERR_NULL_PTR

#define IOLFW_ERR_NULL_PTR   (IOLFW_ERR_BASE_CODE - 15)

NULL pointer passed to function

◆ IOLFW_ERR_PORT_OUT_OF_RANGE

#define IOLFW_ERR_PORT_OUT_OF_RANGE   (IOLFW_ERR_BASE_CODE - 16)

Port number out of valid range

◆ IOLFW_ERR_INVALID_CYCLE_TIME

#define IOLFW_ERR_INVALID_CYCLE_TIME   (IOLFW_ERR_BASE_CODE - 17)

Cycle time value invalid

◆ IOLFW_MAX_INST

#define IOLFW_MAX_INST   (1)

◆ IOLFW_MAX_PORTS

#define IOLFW_MAX_PORTS   (8)

Typedef Documentation

◆ IOLFW_PruMem_t

typedef struct IOLFW_PruMem IOLFW_PruMem_t

◆ IOLFW_PruMemTimer_t

typedef struct IOLFW_PruMemTimer IOLFW_PruMemTimer_t

◆ IOLFW_cbSetMode_t

typedef void(* IOLFW_cbSetMode_t) (IOLFW_Inst_t *pFwInstance, uint8_t portNum, IOLFW_ePortMode_t mode)

Port mode change callback.

Called when the FWHAL needs to change the port's physical layer mode. The application should configure the transceiver accordingly.

Parameters
[in]pFwInstanceIOLFW instance handle
[in]portNumPort number (0 to IOLFW_MAX_PORTS-1)
[in]modeTarget port mode

◆ IOLFW_cbGetPortCfg_t

typedef const IOLFW_PortConfig_t*(* IOLFW_cbGetPortCfg_t) (IOLFW_Inst_t *pFwInstance, uint8_t portNum)

Get port configuration callback.

Called during initialization to retrieve the hardware configuration for a specific port.

Parameters
[in]pFwInstanceIOLFW instance handle
[in]portNumPort number (0 to IOLFW_MAX_PORTS-1)
Returns
Pointer to port configuration, or NULL if port not available

◆ IOLFW_cbRxErrEvent_t

typedef void( * IOLFW_cbRxErrEvent_t) (IOLFW_Inst_t *pFwInstance, uint8_t port, IOLFW_eRxErrorEvents_t rxErr)

RX error event callback.

Called when an RX error is detected on a port.

Parameters
[in]pFwInstanceIOLFW instance handle
[in]portPort number
[in]rxErrError type

◆ IOLFW_cbTransferInd_t

typedef void(* IOLFW_cbTransferInd_t) (IOLFW_Inst_t *pFwInstance, uint8_t port, uint8_t dataLen, IOLFW_eTransferStatus_t eTrStatus)

Transfer indication callback.

Called when an IO-Link data transfer completes (successfully or with error).

Parameters
[in]pFwInstanceIOLFW instance handle
[in]portPort number
[in]dataLenNumber of bytes received
[in]eTrStatusTransfer result status

◆ IOLFW_cbStartupCmpl_t

typedef void( * IOLFW_cbStartupCmpl_t) (IOLFW_Inst_t *pFwInstance, uint8_t port, IOLFW_eStartupStatus_t eStrStatus)

Startup/wake-up completion callback.

Called when the IO-Link wake-up sequence completes on a port.

Parameters
[in]pFwInstanceIOLFW instance handle
[in]portPort number
[in]eStrStatusStartup result status

◆ IOLFW_cbGetInstCont_t

typedef IOLFW_Inst_t*(* IOLFW_cbGetInstCont_t) (uint8_t inst_p)

Get instance container callback.

Parameters
[in]inst_pInstance index
Returns
Pointer to IOLFW instance, or NULL if not found

Enumeration Type Documentation

◆ IOLFW_ePortMode_t

IO-Link port operating mode.

Defines the operating mode for an IO-Link port. Ports can operate in Standard IO (SIO) mode for legacy digital I/O or SDCI mode for IO-Link communication.

Enumerator
IOLFW_ePortMode_SioInactive 

SIO mode inactive (port disabled)

IOLFW_ePortMode_Sdci 

SDCI mode for IO-Link communication

IOLFW_ePortMode_SioDI 

SIO mode as digital input

IOLFW_ePortMode_SioDO 

SIO mode as digital output

IOLFW_ePortMode_Force32Bit 

Force enum to 32-bit

◆ IOLFW_eInstanceState_t

IOLFW instance state.

Tracks the lifecycle state of an IOLFW instance.

Enumerator
IOLFW_eInstanceState_NotInitialized 

Instance not initialized

IOLFW_eInstanceState_Init 

Instance initialized but not running

IOLFW_eInstanceState_Running 

Instance running and ready for operations

◆ IOLFW_eBaudrate_t

IO-Link transmission rate (baud rate)

Defines the IO-Link communication speed. IO-Link supports three transmission rates (COM1, COM2, COM3) as defined in the IO-Link specification.

Enumerator
IOLFW_eBaudrate_Auto 

Auto-detect baud rate during startup

IOLFW_eBaudrate_Com1 

COM1: 4.8 kbit/s

IOLFW_eBaudrate_Com2 

COM2: 38.4 kbit/s

IOLFW_eBaudrate_Com3 

COM3: 230.4 kbit/s

◆ IOLFW_eRxErrorEvents_t

RX error event types.

Error events that can occur during reception of IO-Link frames.

Enumerator
IOLFW_eRxErrorEvents_Rxol 

RX overload: response received without request

◆ IOLFW_eTransferStatus_t

Data transfer status codes.

Status codes returned after an IO-Link data transfer operation completes.

Enumerator
IOLFW_eTransferStatus_Ok 

Transfer completed successfully

IOLFW_eTransferStatus_ParityError 

UART parity error detected

IOLFW_eTransferStatus_FramingError 

UART framing error (invalid stop bit)

IOLFW_eTransferStatus_Overrun 

UART overrun (octet collision)

◆ IOLFW_eStartupStatus_t

Port startup/wake-up status codes.

Status codes returned after the IO-Link wake-up sequence completes.

Enumerator
IOLFW_eStartupStatus_Ok 

Device found, communication established

IOLFW_eStartupStatus_NoResponse 

No device response during wake-up

Function Documentation

◆ IOLFW_registerSetModeCallback()

void IOLFW_registerSetModeCallback ( IOLFW_cbSetMode_t  pCallback)

Register port mode change callback.

See IOLFW_cbSetMode_t for callback details.

Note
Must be called before IOLFW_init().
Parameters
[in]pCallbackCallback function pointer

◆ IOLFW_registerGetPortCfgCallback()

void IOLFW_registerGetPortCfgCallback ( IOLFW_cbGetPortCfg_t  pCallback)

Register port configuration callback.

See IOLFW_cbGetPortCfg_t for callback details.

Note
Must be called before IOLFW_init().
Parameters
[in]pCallbackCallback function pointer

◆ IOLFW_registerRxErrEventCallback()

void IOLFW_registerRxErrEventCallback ( IOLFW_cbRxErrEvent_t  pCallback)

Register RX error event callback.

See IOLFW_cbRxErrEvent_t for callback details.

Note
Must be called before IOLFW_init().
Parameters
[in]pCallbackCallback function pointer

◆ IOLFW_registerTransferIndCallback()

void IOLFW_registerTransferIndCallback ( IOLFW_cbTransferInd_t  pCallback)

Register transfer indication callback.

See IOLFW_cbTransferInd_t for callback details.

Note
Must be called before IOLFW_init().
Parameters
[in]pCallbackCallback function pointer

◆ IOLFW_registerStartupCmplCallback()

void IOLFW_registerStartupCmplCallback ( IOLFW_cbStartupCmpl_t  pCallback)

Register startup completion callback.

See IOLFW_cbStartupCmpl_t for callback details.

Note
Must be called before IOLFW_init().
Parameters
[in]pCallbackCallback function pointer

◆ IOLFW_init()

int32_t IOLFW_init ( IOLFW_Inst_t **  pFwInstance,
IOLFW_Config_t pConfig 
)

Initialize IOLFW instance.

Initializes the IOLFW module for the specified PRU-ICSS instance. Loads PRU firmware and configures the ports.

Precondition
All required callbacks must be registered before calling this function.
Parameters
[out]pFwInstancePointer to receive the instance handle
[in]pConfigPointer to configuration structure
Return values
IOLFW_ERR_SUCCESSInitialization successful
IOLFW_ERR_PRECONFIGPRU configuration failed
IOLFW_ERR_CB_PORT_CFGPort config callback not registered
IOLFW_ERR_CB_SET_MODESet mode callback not registered
IOLFW_ERR_CB_RX_ERR_EVTRX error callback not registered
IOLFW_ERR_CB_TR_INDTransfer indication callback not registered
IOLFW_ERR_CB_START_COMPStartup callback not registered
IOLFW_ERR_INST_ALL_USEDAll instances in use
IOLFW_ERR_PRU_CLOCKUnsupported PRU clock frequency
IOLFW_ERR_IEP_CLOCKUnsupported IEP clock frequency

◆ IOLFW_deInit()

int32_t IOLFW_deInit ( IOLFW_Inst_t pFwInstance)

De-initialize IOLFW instance.

Stops the PRU firmware and releases all resources associated with the IOLFW instance.

Parameters
[in]pFwInstanceIOLFW instance handle
Return values
IOLFW_ERR_SUCCESSDe-initialization successful
IOLFW_ERR_INST_INVALIDInvalid instance handle
IOLFW_ERR_PRECONFIGPRU de-configuration failed

◆ IOLFW_setPortMode()

int32_t IOLFW_setPortMode ( IOLFW_Inst_t pFwInstance,
uint8_t  port,
IOLFW_ePortMode_t  eTargetMode 
)

Set port operating mode.

Changes the operating mode of the specified port. This triggers the cbSetMode callback for hardware reconfiguration.

Parameters
[in]pFwInstanceIOLFW instance handle
[in]portPort number (0 to IOLFW_MAX_PORTS-1)
[in]eTargetModeTarget port mode
Return values
IOLFW_ERR_SUCCESSMode change successful
IOLFW_ERR_NULL_PTRNULL instance pointer
IOLFW_ERR_PORT_OUT_OF_RANGEInvalid port number

◆ IOLFW_getBaudRate()

IOLFW_eBaudrate_t IOLFW_getBaudRate ( IOLFW_Inst_t pFwInstance,
uint8_t  port 
)

Get current baud rate of port.

Returns the currently configured transmission rate for the specified port.

Parameters
[in]pFwInstanceIOLFW instance handle
[in]portPort number (0 to IOLFW_MAX_PORTS-1)
Returns
Current baud rate setting

◆ IOLFW_wakeUp()

int32_t IOLFW_wakeUp ( IOLFW_Inst_t pFwInstance,
uint8_t  port 
)

Initiate IO-Link wake-up sequence.

Starts the IO-Link wake-up/startup sequence on the specified port. The result is reported via the cbStartupCmpl callback.

Parameters
[in]pFwInstanceIOLFW instance handle
[in]portPort number (0 to IOLFW_MAX_PORTS-1)
Return values
IOLFW_ERR_SUCCESSWake-up initiated successfully
IOLFW_ERR_NULL_PTRNULL instance pointer
IOLFW_ERR_PORT_OUT_OF_RANGEInvalid port number

◆ IOLFW_transferPrepare()

int32_t IOLFW_transferPrepare ( IOLFW_Inst_t pFwInstance,
uint8_t  port,
uint8_t *  pData,
uint8_t  dataLength,
uint8_t *  pResponseData,
uint8_t  responseLength 
)

Prepare data transfer.

Prepares the TX buffer for the next IO-Link data transfer cycle. The transfer is triggered by the cycle timer or manually. The result is reported via the cbTransferInd callback.

Parameters
[in]pFwInstanceIOLFW instance handle
[in]portPort number (0 to IOLFW_MAX_PORTS-1)
[in]pDataPointer to TX data buffer
[in]dataLengthNumber of bytes to transmit
[in]pResponseDataPointer to RX data buffer
[in]responseLengthExpected number of response bytes
Return values
IOLFW_ERR_SUCCESSTransfer prepared successfully
IOLFW_ERR_NULL_PTRNULL instance or data pointer
IOLFW_ERR_PORT_OUT_OF_RANGEInvalid port number
IOLFW_ERR_VAL_OUT_OF_RANGEData length exceeds maximum

◆ IOLFW_setMaxRespTime()

int32_t IOLFW_setMaxRespTime ( IOLFW_Inst_t pFwInstance,
uint8_t  port,
uint8_t  taRespTime 
)

Set maximum response time.

Configures the maximum allowed response time (T_A) for the specified port. This is the time window after TX completes in which a response is expected.

Parameters
[in]pFwInstanceIOLFW instance handle
[in]portPort number (0 to IOLFW_MAX_PORTS-1)
[in]taRespTimeMaximum response time in bit times
Return values
IOLFW_ERR_SUCCESSConfiguration successful
IOLFW_ERR_NULL_PTRNULL instance pointer
IOLFW_ERR_PORT_OUT_OF_RANGEInvalid port number

◆ IOLFW_resetCycleTime()

int32_t IOLFW_resetCycleTime ( IOLFW_Inst_t pFwInstance,
uint8_t  port 
)

Reset cycle timer counter.

Resets the cycle timer counter to zero for the specified port.

Parameters
[in]pFwInstanceIOLFW instance handle
[in]portPort number (0 to IOLFW_MAX_PORTS-1)
Return values
IOLFW_ERR_SUCCESSReset successful
IOLFW_ERR_NULL_PTRNULL instance pointer
IOLFW_ERR_PORT_OUT_OF_RANGEInvalid port number

◆ IOLFW_setCycleTime()

int32_t IOLFW_setCycleTime ( IOLFW_Inst_t pFwInstance,
uint8_t  port,
uint32_t  timeUs 
)

Set cycle time.

Configures the cycle time for the specified port.

Parameters
[in]pFwInstanceIOLFW instance handle
[in]portPort number (0 to IOLFW_MAX_PORTS-1)
[in]timeUsCycle time in microseconds
Return values
IOLFW_ERR_SUCCESSCycle time set successfully
IOLFW_ERR_NULL_PTRNULL instance pointer
IOLFW_ERR_PORT_OUT_OF_RANGEInvalid port number

◆ IOLFW_enableCycleTimer()

int32_t IOLFW_enableCycleTimer ( IOLFW_Inst_t pFwInstance,
uint8_t  port,
bool  enable 
)

Enable or disable cycle timer.

Enables or disables the automatic cycle timer for the specified port. When enabled, transfers are triggered automatically at the configured cycle time.

Parameters
[in]pFwInstanceIOLFW instance handle
[in]portPort number (0 to IOLFW_MAX_PORTS-1)
[in]enabletrue to enable, false to disable
Return values
IOLFW_ERR_SUCCESSTimer state changed successfully
IOLFW_ERR_NULL_PTRNULL instance pointer
IOLFW_ERR_PORT_OUT_OF_RANGEInvalid port number

◆ IOLFW_configCycleTime()

int32_t IOLFW_configCycleTime ( IOLFW_Inst_t pFwInstance,
uint8_t  port,
uint32_t  timeUs 
)

Configure and enable cycle time.

Convenience function that configures the cycle time and enables/disables the cycle timer in one call. If timeUs is 0, the timer is disabled.

Internal call sequence:

Parameters
[in]pFwInstanceIOLFW instance handle
[in]portPort number (0 to IOLFW_MAX_PORTS-1)
[in]timeUsCycle time in microseconds (0 to disable)
Return values
IOLFW_ERR_SUCCESSConfiguration successful
IOLFW_ERR_NULL_PTRNULL instance pointer
IOLFW_ERR_PORT_OUT_OF_RANGEInvalid port number