NXP Reader Library  v17.1.0.2535
Component : MP300USB
Collaboration diagram for Component : MP300USB:

Data Structures

struct  phbalReg_Mp300Usb_DataParams_t
 MP300USB BAL parameter structure. More...
 

Macros

#define PHBAL_REG_MP300USB_ID   0x0BU
 ID for Mp300Usb BAL component.
 

Functions

phStatus_t phbalReg_Mp300Usb_Init (phbalReg_Mp300Usb_DataParams_t *pDataParams, uint16_t wSizeOfDataParams)
 Initialise the PEGODA USB BAL component. More...
 

BAL Communication Configs

#define PHBAL_REG_MP300USB_CONFIG_EXCHANGE_DELAY_COUNT   (PH_CONFIG_CUSTOM_BEGIN + 0)
 An integer value to throttle USB comms speed.
 
#define PHBAL_REG_MP300USB_CONFIG_VENDOR_ID_FILTER   (PH_CONFIG_CUSTOM_BEGIN + 1)
 Filter for ventor ID used in GetPortList to filter USB devices. More...
 
#define PHBAL_REG_MP300USB_CONFIG_PRODUCT_ID_FILTER   (PH_CONFIG_CUSTOM_BEGIN + 2)
 Filter for Product ID used in GetPortList to filter USB devices. More...
 
#define PHBAL_REG_MP300USB_CONFIG_EXCHANGE_MODE   (PH_CONFIG_CUSTOM_BEGIN + 3)
 Exchange mode of USB (INTERRUPT or BULK)
 

BAL Configuration Values

#define PHBAL_REG_MP300USB_VALUE_EXCHANGEMODE_INTERRUPT   0x0000U
 Interrupt transfer kBit/s.
 
#define PHBAL_REG_MP300USB_VALUE_EXCHANGEMODE_BULK   0x0001U
 Bulk transfer kBit/s.
 

Function pointers

typedef void(__cdecl * PHBAL_REG_MP300USB_INIT) ()
 
typedef int32_t(__cdecl * PHBAL_REG_MP300USB_FIND_BUSSES) ()
 
typedef int32_t(__cdecl * PHBAL_REG_MP300USB_FIND_DEVICES) ()
 
typedef void *(__cdecl * PHBAL_REG_MP300USB_GET_BUSSES) ()
 
typedef void *(__cdecl * PHBAL_REG_MP300USB_OPEN) (void *usb_device_handle)
 
typedef int32_t(__cdecl * PHBAL_REG_MP300USB_CLOSE) (void *usb_device_handle)
 
typedef int32_t(__cdecl * PHBAL_REG_MP300USB_CLAIM_INTERFACE) (void *usb_device_handle, int32_t interface_num)
 
typedef int32_t(__cdecl * PHBAL_REG_MP300USB_RELEASE_INTERFACE) (void *usb_device_handle, int32_t interface_num)
 
typedef int32_t(__cdecl * PHBAL_REG_MP300USB_INTERRUPT_WRITE) (void *usb_device_handle, int32_t ep, int8_t *bytes, int32_t size, int32_t timeout)
 
typedef int32_t(__cdecl * PHBAL_REG_MP300USB_BULK_WRITE) (void *usb_device_handle, int32_t ep, int8_t *bytes, int32_t size, int32_t timeout)
 
typedef int32_t(__cdecl * PHBAL_REG_MP300USB_INTERRUPT_READ) (void *usb_device_handle, int32_t ep, int8_t *bytes, int32_t size, int32_t timeout)
 
typedef int32_t(__cdecl * PHBAL_REG_MP300USB_BULK_READ) (void *usb_device_handle, int32_t ep, int8_t *bytes, int32_t size, int32_t timeout)
 
typedef int32_t(__cdecl * PHBAL_REG_MP300USB_GET_STRING_SIMPLE) (void *usb_device_handle, int32_t index, int8_t *buf, size_t buflen)
 

Detailed Description

Macro Definition Documentation

◆ PHBAL_REG_MP300USB_CONFIG_VENDOR_ID_FILTER

#define PHBAL_REG_MP300USB_CONFIG_VENDOR_ID_FILTER   (PH_CONFIG_CUSTOM_BEGIN + 1)

Filter for ventor ID used in GetPortList to filter USB devices.

If Vendor ID and Product ID is set to zero all devices are listed

◆ PHBAL_REG_MP300USB_CONFIG_PRODUCT_ID_FILTER

#define PHBAL_REG_MP300USB_CONFIG_PRODUCT_ID_FILTER   (PH_CONFIG_CUSTOM_BEGIN + 2)

Filter for Product ID used in GetPortList to filter USB devices.

If Vendor ID and Product ID is set to zero all devices are listed

Function Documentation

◆ phbalReg_Mp300Usb_Init()

phStatus_t phbalReg_Mp300Usb_Init ( phbalReg_Mp300Usb_DataParams_t pDataParams,
uint16_t  wSizeOfDataParams 
)

Initialise the PEGODA USB BAL component.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSParameter structure size is invalid.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wSizeOfDataParams[In] Specifies the size of the data parameter structure.