|
| SILABS_STATUS | IOP_GetDeviceManufacturerString (const HANDLE hHandle, char *pDeviceString, const size_t DeviceStringLenInBytes, size_t *pLenInBytes) |
| | Return the device-defined string containing the name of the manufacturer of this device. More...
|
| |
| SILABS_STATUS | IOP_GetDeviceProductString (const HANDLE hHandle, char *pDeviceString, const size_t DeviceStringLenInBytes, size_t *pLenInBytes) |
| | Return the device-defined string that contains a description of the device. More...
|
| |
| SILABS_STATUS | IOP_GetDeviceSerialNumberString (const HANDLE hHandle, char *pDeviceString, const size_t DeviceStringLenInBytes, size_t *pLenInBytes) |
| | Return the device-defined string that contains a manufacturer-determined serial number for the device. More...
|
| |
| SILABS_STATUS | IOP_GetDeviceFirmwareVersionString (const HANDLE hHandle, char *pDeviceString, const size_t DeviceStringLenInBytes, size_t *pLenInBytes) |
| | Return the device-defined string that contains a manufacturer-determined Firmware Version for the device. More...
|
| |
|
| SILABS_STATUS | IOP_GetLibraryVersion (uint8_t *major, uint8_t *minor, BOOL *pbIsReleaseBuild) |
| | Reads and returns the interface library version from the DLL or static library. More...
|
| |
| SILABS_STATUS | IOP_GetNumDevices (const uint16_t Vid, const uint16_t Pid, uint32_t *pNumDevices) |
| | Determines the number of devices of interest connected to the system. More...
|
| |
| SILABS_STATUS | IOP_GetDevicePathString (const uint32_t DeviceIndex, char *pDevicePathString, const size_t DevicePathStringLenInBytes, size_t *pLenInBytes) |
| | return the device instance's DevicePath string More...
|
| |
| SILABS_STATUS | IOP_GetVIDPIDFromDevicePath (const uint32_t DeviceIndex, uint16_t *pVid, uint16_t *pPid) |
| | derives the device instance's VID and PID from the device instance's DevicePath returned by IOP_GetDevicePathString() More...
|
| |
| SILABS_STATUS | IOP_GetSerialNumberStringFromDevicePath (const uint32_t DeviceIndex, char *pSerialNumberString, const size_t SerialNumberStringLenInBytes, size_t *pLenInBytes) |
| | derives the device instance's Serial Number string from the device instance's DevicePath returned by IOP_GetDevicePathString() More...
|
| |
| SILABS_STATUS | IOP_Open (const uint32_t DeviceIndex, PHANDLE pHandle) |
| | Opens a handle to the device. More...
|
| |
| SILABS_STATUS | IOP_OpenByDevicePath (const char *pDevicePath, PHANDLE pHandle) |
| | Opens a handle to the device. More...
|
| |
| SILABS_STATUS | IOP_Close (const HANDLE hHandle) |
| | Closes an open handle to the device. More...
|
| |
| SILABS_STATUS | IOP_GetCurrentAlternateSetting (const HANDLE hHandle, SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS *pAlternateSettingNumber) |
| | Returns an indication of the current Alternate Setting in use. More...
|
| |
| SILABS_STATUS | IOP_SetCurrentAlternateSetting (const HANDLE hHandle, const SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS AlternateSettingNumber) |
| | Set the current Alternate Setting on the device. More...
|
| |
| SILABS_STATUS | IOP_SetCurrentAlternateSettingIDLE (const HANDLE hHandle) |
| | Set the current Alternate Setting on the device to IDLE. More...
|
| |
| SILABS_STATUS | IOP_SetCurrentAlternateSettingUART (const HANDLE hHandle) |
| | Set the current Alternate Setting on the device to UART. More...
|
| |
| SILABS_STATUS | IOP_SetCurrentAlternateSettingIOP (const HANDLE hHandle) |
| | Set the current Alternate Setting on the device to IOP. More...
|
| |
|
| SILABS_STATUS | IOP_Read (const HANDLE hHandle, uint8_t *pBuffer, const size_t BufferLenInBytes, size_t *pBytesRead, LPOVERLAPPED o=NULL) |
| | Reads from the device into a buffer. More...
|
| |
| SILABS_STATUS | IOP_Write (const HANDLE hHandle, uint8_t *pBuffer, const size_t BufferLenInBytes, size_t *pBytesWritten, LPOVERLAPPED o=NULL) |
| | Write buffer to device. More...
|
| |
|
| SILABS_STATUS | IOP_GetAccessoryInfo (const HANDLE hHandle, SILABS_IOP_ACCESSORY_INFO *pAccessoryInfo) |
| | Returns accessory identification information of the device. More...
|
| |
| SILABS_STATUS | IOP_GetPortConfiguration (const HANDLE hHandle, const uint8_t PortNumber, SILABS_IOP_PORT_CONFIGURATION *pPortConfiguration) |
| | Returns pin configuration for digital port of the device. More...
|
| |
| SILABS_STATUS | IOP_GetDigitalPort (const HANDLE hHandle, const uint8_t PortNumber, const uint16_t PinMask, SILABS_IOP_DIGITAL_PORT_VALUE *pDigitalPortValue) |
| | Returns current digital port value of the device. More...
|
| |
| SILABS_STATUS | IOP_SetDigitalPort (const HANDLE hHandle, const uint8_t PortNumber, SILABS_IOP_DIGITAL_PORT_VALUE *pDigitalPortValue) |
| | writes one or more digital output pins in a port. More...
|
| |
| SILABS_STATUS | IOP_GetAnalogPin (const HANDLE hHandle, const uint8_t PinNumber, SILABS_IOP_ANALOG_PIN_VALUE *pAnalogPinValue) |
| | Returns current analog pin value of the device. More...
|
| |
| SILABS_STATUS | IOP_GetSerialState (const HANDLE hHandle, SILABS_IOP_SERIAL_STATE *pSerialState) |
| | Returns error status for serial session. More...
|
| |
| SILABS_STATUS | IOP_DoI2CTransfer (const HANDLE hHandle, const uint8_t SlaveAddress, _In_reads_bytes_opt_(WriteMsgLength) const uint8_t *WriteMsg, const uint8_t WriteMsgLength, uint8_t *ReadMsg, const uint8_t ReadMsgLength, uint8_t *pNumBytesRead, DEVICE_I2C_STATUS *pDeviceI2CStatus) |
| | Requests that the specified I2C transfer be completed and the results returned. More...
|
| |
The Silicon Labs CP2615 USB Digital Audio Bridge is a composite USB device that provides three USB interfaces:
0. USB HID Class consumer controls (volume, mute and playback buttons)
- USB serial data bridge (vendor specific, not a USB standard class)
- USB Audio Class 1.0 to I2S digital audio bridge
The HID and Audio interfaces are standard class implementations that are natively supported by the host OS (e.g.Android, Windows). The USB serial data bridge is a vendor specific interface and is accessed via this slabiop host interface library.
The USB serial data bridge interface has three alternate settings SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS:
0 SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS_IDLE. IDLE - has no endpoints and is used to disable the IO link. 1 SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS_UART. UART - has one Bulk IN and one Bulk OUT endpoint for transporting UART data. 2 SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS_IOP. IOP - has one Bulk IN and one Bulk OUT endpoint for transporting IOP messages.
To exchange IOP messages with the CP2615 device, the application follows these steps:
- Locate the CP2615 device by searching for its configured VID and PID. IOP_GetNumDevices()
- Open a device handle for the CP2615. IOP_Open()
- Locate the IO interface by comparing interface class and subclass values.
- Use the host API to claim the interface.
- Use the host API to set the interface to alternate setting 2 (IOP). IOP_SetCurrentAlternateSettingIOP()
- Use the host API to transfer IOP messages over the interface's bulk pipes.
The IOP protocol includes the message iop_DoI2cTransfer IOP_DoI2CTransfer(), which is used to implement an I2C bridge over the CP2615. This message requests the CP2615 to perform a master I2C transfer. Depending on the slave I2C address, the transfer is completed on the physical I2C bus or to a virtual EEPROM implemented by the CP2615. The virtual EEPROM is at slave address 0xF2 and adheres to the protocol described in the configuration mode section of the CP2615 datasheet.
- Note
- all slabiop IOP Library strings are UTF-8 encoded
◆ SILABS_IOP_ACCESSORY_INFO
| struct SILABS_IOP_ACCESSORY_INFO |
| Data Fields |
|
uint16_t |
OptionID |
Customer specified value read from the configuration. |
|
uint16_t |
PartID |
Encoded part number of the chip (0x1400 for CP2615 Rev 1.0). |
|
uint16_t |
ProtocolVersion |
IOP protocol version. |
◆ SILABS_IOP_PORT_CONFIGURATION
| struct SILABS_IOP_PORT_CONFIGURATION |
| Data Fields |
|
uint16_t |
PinDirection |
Bitmask: 0 = Input, 1 = Output. |
|
uint16_t |
PinFunction |
Bitmask: 0 = Alternate, 1 = GPIO. |
|
uint16_t |
PinOutMode |
Bitmask: 0 = Open-Drain, 1 = Push-Pull. |
|
uint8_t |
PortNumber |
The target digital port. |
◆ SILABS_IOP_DIGITAL_PORT_VALUE
| struct SILABS_IOP_DIGITAL_PORT_VALUE |
| Data Fields |
|
uint16_t |
PinMask |
Bitmask indicates which pins changed or were queried by the iop_GetDigitalPort message. |
|
uint8_t |
PortNumber |
The target digital port. |
|
uint16_t |
PortValue |
Bitfield returns current digital pin values (all pins are returned). |
◆ SILABS_IOP_ANALOG_PIN_VALUE
| struct SILABS_IOP_ANALOG_PIN_VALUE |
| Data Fields |
|
uint8_t |
PinNumber |
The target analog pin. |
|
uint16_t |
PinValue |
Value read from the analog pin. (10-bit right-justified, Vdd fullscale for CP2615) |
|
uint32_t |
TimeStamp |
32-bit Timestamp. 1 msec resolution. |
◆ SILABS_IOP_SERIAL_STATE
| struct SILABS_IOP_SERIAL_STATE |
| Data Fields |
|
uint8_t |
ReceiveError |
Receive stream errors. 0 = no errors, non-zero = receive overflow. |
◆ SLABIOPLIB_API
◆ WINAPI
◆ DEVICE_I2C_STATUS
| Enumerator |
|---|
| DEVICE_I2C_STATUS_SUCCESS | I2C transfer completed without errors.
|
| DEVICE_I2C_STATUS_BUS_ERROR | I2C bus error (NAK received).
|
| DEVICE_I2C_STATUS_BUS_BUSY | I2C bus was busy.
|
| DEVICE_I2C_STATUS_TIMEOUT | I2C transfer timed out (slave did not respond).
|
| DEVICE_I2C_STATUS_INVALID_PARAMETER | Parameter error (read or write count out of range).
|
| DEVICE_I2C_STATUS_CFG_LOCKED | Writing to configuration memory failed because the configuration is locked.
|
◆ SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS
| Enumerator |
|---|
| SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS_IDLE | Idle. Has no endpoints and is used to disable the IO link.
|
| SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS_UART | UART. Has one Bulk IN and one Bulk OUT endpoint for transporting UART data.
|
| SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS_IOP | I/O Protocol. Has one Bulk IN and one Bulk OUT endpoint for transporting IOP messages.
|
| SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS_UNKNOWN | an unknown Alternate Settings
|
◆ IOP_Close()
Closes an open handle to the device.
After a successful close the handle is no longer valid.
- Parameters
-
| [in] | hHandle | is an open handle to the device |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_DoI2CTransfer()
| SILABS_STATUS IOP_DoI2CTransfer |
( |
const HANDLE |
hHandle, |
|
|
const uint8_t |
SlaveAddress, |
|
|
_In_reads_bytes_opt_(WriteMsgLength) const uint8_t * |
WriteMsg, |
|
|
const uint8_t |
WriteMsgLength, |
|
|
uint8_t * |
ReadMsg, |
|
|
const uint8_t |
ReadMsgLength, |
|
|
uint8_t * |
pNumBytesRead, |
|
|
DEVICE_I2C_STATUS * |
pDeviceI2CStatus |
|
) |
| |
Requests that the specified I2C transfer be completed and the results returned.
This requests that the specified I2C transfer be completed and the results returned. The transfer consists of a write cycle followed by a read cycle. Either the write or the read cycle may be skipped by setting the associated byte count to 0. Transfer status and any data read from the I2C bus is returned in an iop_I2cTransferResult message
- Note
- The Current Alternate Setting of the device must be set to SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS_IOP for successful operation of this function see IOP_SetCurrentAlternateSetting() or IOP_SetCurrentAlternateSettingIOP().
- Parameters
-
| [in] | hHandle | is an handle to the device |
| [in] | SlaveAddress | is the I2C slave address |
| [in] | WriteMsg | is the I2C write data |
| [in] | WriteMsgLength | is the Number of bytes to write. Set to 0 for read-only transfer. (Max value is 54 for CP2615) |
| [out] | ReadMsg | points at a ReadMsgLength-bytes sized buffer into which the I2C read data is returned |
| [in] | ReadMsgLength | is the Number of bytes to read. Set to 0 for write-only transfer. (Max value is 54 for CP2615) |
| [out] | pNumBytesRead | points at a 1-byte sized buffer into which the actual number of read uint8_ts is written on successful returns |
| [out] | pDeviceI2CStatus | status of i2c device return |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_GetAccessoryInfo()
◆ IOP_GetAnalogPin()
◆ IOP_GetCurrentAlternateSetting()
Returns an indication of the current Alternate Setting in use.
- Parameters
-
| [in] | hHandle | is an handle to the device |
| [out] | pAlternateSettingNumber | points at a SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS sized buffer into which the current alternate setting for is returned |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_GetDeviceFirmwareVersionString()
| SILABS_STATUS IOP_GetDeviceFirmwareVersionString |
( |
const HANDLE |
hHandle, |
|
|
char * |
pDeviceString, |
|
|
const size_t |
DeviceStringLenInBytes, |
|
|
size_t * |
pLenInBytes |
|
) |
| |
Return the device-defined string that contains a manufacturer-determined Firmware Version for the device.
- Parameters
-
| [in] | hHandle | is an handle to the device |
| [out] | pDeviceString | points at a buffer into which the device-defined string containing the Firmware Version of this device will be copied and returned |
| [in] | DeviceStringLenInBytes | the length in bytes of pDeviceString the buffer into which the Firmware Version string will be copied and returned |
| [out] | pLenInBytes | points at a size_t-sized location into which the length of the returned string will be copied and returned |
- Note
- all strings are UTF-8 encoded, nul-terminated
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_GetDeviceManufacturerString()
| SILABS_STATUS IOP_GetDeviceManufacturerString |
( |
const HANDLE |
hHandle, |
|
|
char * |
pDeviceString, |
|
|
const size_t |
DeviceStringLenInBytes, |
|
|
size_t * |
pLenInBytes |
|
) |
| |
Return the device-defined string containing the name of the manufacturer of this device.
- Parameters
-
| [in] | hHandle | is an handle to the device |
| [out] | pDeviceString | points at a buffer into which the device-defined string containing the name of the manufacturer of this device will be copied and returned |
| [in] | DeviceStringLenInBytes | the length in bytes of pDeviceString the buffer into which the manufacturer string will be copied and returned |
| [out] | pLenInBytes | points at a size_t-sized location into which the length of the returned string will be copied and returned |
- Note
- all strings are UTF-8 encoded, nul-terminated
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_GetDevicePathString()
| SILABS_STATUS IOP_GetDevicePathString |
( |
const uint32_t |
DeviceIndex, |
|
|
char * |
pDevicePathString, |
|
|
const size_t |
DevicePathStringLenInBytes, |
|
|
size_t * |
pLenInBytes |
|
) |
| |
return the device instance's DevicePath string
- Note
- By observation, DevicePath looks like this: "\\\\?\\usb#vid_10c4&pid_ea60#0001#{a2a39220-39f4-4b88-aecb-3d86a35dc748}"
-
todo insert reference to Windows/MSDN web site describing that
- Parameters
-
| [in] | DeviceIndex | is the desired device's index into the device list used to determine IOP_GetNumDevices() |
| [out] | pDevicePathString | points at a buffer into which the DevicePath string will be copied and returned |
| [in] | DevicePathStringLenInBytes | the length in bytes of pDevicePathString the buffer into which the DevicePath string will be copied and returned |
| [out] | pLenInBytes | points at a size_t-sized location into which the length of the returned string will be copied and returned |
- Note
- all strings are UTF-8 encoded, nul-terminated
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_GetDeviceProductString()
| SILABS_STATUS IOP_GetDeviceProductString |
( |
const HANDLE |
hHandle, |
|
|
char * |
pDeviceString, |
|
|
const size_t |
DeviceStringLenInBytes, |
|
|
size_t * |
pLenInBytes |
|
) |
| |
Return the device-defined string that contains a description of the device.
- Parameters
-
| [in] | hHandle | is an handle to the device |
| [out] | pDeviceString | points at a buffer into which the device-defined string that contains a description of the device will be copied and returned |
| [in] | DeviceStringLenInBytes | the length in bytes of pDeviceString the buffer into which the description of the device string will be copied and returned |
| [out] | pLenInBytes | points at a size_t-sized location into which the length of the returned string will be copied and returned |
- Note
- all strings are UTF-8 encoded, nul-terminated
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_GetDeviceSerialNumberString()
| SILABS_STATUS IOP_GetDeviceSerialNumberString |
( |
const HANDLE |
hHandle, |
|
|
char * |
pDeviceString, |
|
|
const size_t |
DeviceStringLenInBytes, |
|
|
size_t * |
pLenInBytes |
|
) |
| |
Return the device-defined string that contains a manufacturer-determined serial number for the device.
- Parameters
-
| [in] | hHandle | is an handle to the device |
| [out] | pDeviceString | points at a buffer into which the device-defined string containing the serial number of this device will be copied and returned |
| [in] | DeviceStringLenInBytes | the length in bytes of pDeviceString the buffer into which the serial number string will be copied and returned |
| [out] | pLenInBytes | points at a size_t-sized location into which the length of the returned string will be copied and returned |
- Note
- all strings are UTF-8 encoded, nul-terminated
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_GetDigitalPort()
Returns current digital port value of the device.
This requests the current value for the specified digital port. The PinMask parameter is copied into the returned SILABS_IOP_DIGITAL_PORT_VALUE and not interpreted..
- Note
- The Current Alternate Setting of the device must be set to SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS_IOP for successful operation of this function see IOP_SetCurrentAlternateSetting() or IOP_SetCurrentAlternateSettingIOP().
- Parameters
-
| [in] | hHandle | is an handle to the device |
| [in] | PortNumber | is the digital port to query |
| [in] | PinMask | is a bitmask indicates which pins changed or were queried |
| [out] | pDigitalPortValue | points at a SILABS_IOP_DIGITAL_PORT_VALUE sized buffer into which the current digital port value is returned |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_GetLibraryVersion()
| SILABS_STATUS IOP_GetLibraryVersion |
( |
uint8_t * |
major, |
|
|
uint8_t * |
minor, |
|
|
BOOL * |
pbIsReleaseBuild |
|
) |
| |
Reads and returns the interface library version from the DLL or static library.
- Parameters
-
| [out] | major | points at a uint8_t-sized buffer into which the major version number of the interface library Version value will be written |
| [out] | minor | points at a uint8_t-sized buffer into which the minor version number of the interface library Version value will be written |
| [out] | pbIsReleaseBuild | points at a _Bool-sized buffer into which a boolean value of whether this is a Release build of the interface library will be written (true for Release build, false for Debug builds) |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_GetNumDevices()
| SILABS_STATUS IOP_GetNumDevices |
( |
const uint16_t |
Vid, |
|
|
const uint16_t |
Pid, |
|
|
uint32_t * |
pNumDevices |
|
) |
| |
Determines the number of devices of interest connected to the system.
- Parameters
-
| [in] | Vid | is the USB VID of any devices of interest |
| [in] | Pid | is the USB PID of any devices of interest |
| [out] | pNumDevices | a pointer to a uint32_t/4-uint8_t location to hold the returned device count |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_GetPortConfiguration()
Returns pin configuration for digital port of the device.
This requests the pin configuration data for all pins in the specified port.
- Note
- The Current Alternate Setting of the device must be set to SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS_IOP for successful operation of this function see IOP_SetCurrentAlternateSetting() or IOP_SetCurrentAlternateSettingIOP().
- Parameters
-
| [in] | hHandle | is an handle to the device |
| [in] | PortNumber | is the port to query |
| [out] | pPortConfiguration | points at a SILABS_IOP_PORT_CONFIGURATION sized buffer into which the accessory identification information is returned |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_GetSerialNumberStringFromDevicePath()
| SILABS_STATUS IOP_GetSerialNumberStringFromDevicePath |
( |
const uint32_t |
DeviceIndex, |
|
|
char * |
pSerialNumberString, |
|
|
const size_t |
SerialNumberStringLenInBytes, |
|
|
size_t * |
pLenInBytes |
|
) |
| |
derives the device instance's Serial Number string from the device instance's DevicePath returned by IOP_GetDevicePathString()
- Parameters
-
| [in] | DeviceIndex | is the desired device's index into the device list used to determine IOP_GetNumDevices() |
| [out] | pSerialNumberString | points at a buffer into which the Serial Number string will be copied and returned |
| [in] | SerialNumberStringLenInBytes | the length in bytes of pSerialNumberString the buffer into which the Serial Number string will be copied and returned |
| [out] | pLenInBytes | points at a size_t-sized location into which the length of the returned string will be copied and returned |
- Note
- all strings are UTF-8 encoded, nul-terminated
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_GetSerialState()
◆ IOP_GetVIDPIDFromDevicePath()
| SILABS_STATUS IOP_GetVIDPIDFromDevicePath |
( |
const uint32_t |
DeviceIndex, |
|
|
uint16_t * |
pVid, |
|
|
uint16_t * |
pPid |
|
) |
| |
derives the device instance's VID and PID from the device instance's DevicePath returned by IOP_GetDevicePathString()
- Parameters
-
| [in] | DeviceIndex | is the desired device's index into the device list used to determine IOP_GetNumDevices() |
| [out] | pVid | points to a 2-byte buffer into which the device's Vendor ID will be returned |
| [out] | pPid | points to a 2-byte buffer into which the device's Product ID will be returned |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_Open()
| SILABS_STATUS IOP_Open |
( |
const uint32_t |
DeviceIndex, |
|
|
PHANDLE |
pHandle |
|
) |
| |
Opens a handle to the device.
- Parameters
-
| [in] | DeviceIndex | is the desired device's index into the device list used to determine IOP_GetNumDevices() |
| [out] | pHandle | is a pointer to a HANDLE/4-uint8_t location to hold the returned open handle to the device |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_OpenByDevicePath()
| SILABS_STATUS IOP_OpenByDevicePath |
( |
const char * |
pDevicePath, |
|
|
PHANDLE |
pHandle |
|
) |
| |
Opens a handle to the device.
- Parameters
-
| [in] | pDevicePath | is the desired device's DevicePath. |
| [out] | pHandle | is a pointer to a HANDLE/4-uint8_t location to hold the returned open handle to the device |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_Read()
| SILABS_STATUS IOP_Read |
( |
const HANDLE |
hHandle, |
|
|
uint8_t * |
pBuffer, |
|
|
const size_t |
BufferLenInBytes, |
|
|
size_t * |
pBytesRead, |
|
|
LPOVERLAPPED |
o = NULL |
|
) |
| |
Reads from the device into a buffer.
- Note
- The Current Alternate Setting of the device must be set to SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS_UART for successful operation of this function see IOP_SetCurrentAlternateSetting() or IOP_SetCurrentAlternateSettingUART().
- Parameters
-
| [in] | hHandle | is an handle to the device |
| [in] | pBuffer | points at a buffer into which bytes will be read from the device |
| [in] | BufferLenInBytes | is the size in bytes bytes of that buffer into which bytes will be read from the device |
| [out] | pBytesRead | is the number of bytes read from the device and placed into the buffer |
| [in] | o | is ... |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_SetCurrentAlternateSetting()
Set the current Alternate Setting on the device.
- Parameters
-
| [in] | hHandle | is an handle to the device |
| [in] | AlternateSettingNumber | is the new desired Alternate Setting Number SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS to configure the device with |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_SetCurrentAlternateSettingIDLE()
| SILABS_STATUS IOP_SetCurrentAlternateSettingIDLE |
( |
const HANDLE |
hHandle | ) |
|
Set the current Alternate Setting on the device to IDLE.
- Parameters
-
| [in] | hHandle | is an handle to the device |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_SetCurrentAlternateSettingIOP()
| SILABS_STATUS IOP_SetCurrentAlternateSettingIOP |
( |
const HANDLE |
hHandle | ) |
|
Set the current Alternate Setting on the device to IOP.
- Parameters
-
| [in] | hHandle | is an handle to the device |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_SetCurrentAlternateSettingUART()
| SILABS_STATUS IOP_SetCurrentAlternateSettingUART |
( |
const HANDLE |
hHandle | ) |
|
Set the current Alternate Setting on the device to UART.
- Parameters
-
| [in] | hHandle | is an handle to the device |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_SetDigitalPort()
writes one or more digital output pins in a port.
This writes one or more digital output pins in a port. The PinMask determines which pins will be written. If a target pin is not a digital output, the pin is not written.
- Note
- The Current Alternate Setting of the device must be set to SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS_IOP for successful operation of this function see IOP_SetCurrentAlternateSetting() or IOP_SetCurrentAlternateSettingIOP().
- Parameters
-
| [in] | hHandle | is an handle to the device |
| [in] | PortNumber | is the digital port to set |
| [in] | pDigitalPortValue | points at a SILABS_IOP_DIGITAL_PORT_VALUE sized buffer describing which pins will be written |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-
◆ IOP_Write()
| SILABS_STATUS IOP_Write |
( |
const HANDLE |
hHandle, |
|
|
uint8_t * |
pBuffer, |
|
|
const size_t |
BufferLenInBytes, |
|
|
size_t * |
pBytesWritten, |
|
|
LPOVERLAPPED |
o = NULL |
|
) |
| |
Write buffer to device.
- Note
- The Current Alternate Setting of the device must be set to SILABS_IOP_INTERFACE_ALTERNATE_SETTINGS_UART for successful operation of this function see IOP_SetCurrentAlternateSetting() or IOP_SetCurrentAlternateSettingUART().
- Parameters
-
| [in] | hHandle | is an handle to the device |
| [in] | pBuffer | points at a buffer containing the data to be written to the device |
| [in] | BufferLenInBytes | is the number of bytes in that buffer to be written to the device |
| [out] | pBytesWritten | is the number of bytes from that buffer successfully written to the device |
| [in] | o | is ... |
- Returns
- Returns SILABS_STATUS_SUCCESS on success, or another SILABS_STATUS Return value if there is an error.
- Return values
-