| Online Development Notebook > Index > ODN > USBm DLL Programming > Device Commands > InitPorts |
InitPorts
Description:
This is a USBm.dll function that initializes both ports to be passive inputs.
There are two 8-bit ports on the U401⁄421, 16 I⁄O lines. The 16 total I⁄O lines can be set to inputs or outputs on an individual per-line basis. The initial state of the ports on power up is that all of the 16 lines are set to be inputs. This command duplicates the power up conditions of setting all lines to input.
Command Syntax: (USBm.dll)
USBm_InitPorts(device)
The USBm_InitPorts function syntax has these parts:
| Part | Description |
| device | A zero-based index to address the appropriate USB device. |
Remarks:
Calling USBm_InitPorts will reset the ports.
VB Declaration
| Public Declare Function USBm_InitPorts _ Lib "USBm.dll" _ (ByVal device As Byte) _ As Integer |
VB Example
| USBm_InitPorts (3) |
This code fragment initializes the ports of device number three.
C Example
-TBD-
| Hardware: U401 USB Interface U421 USB Interface |
| Programming: USBm DLL Programming Download Files |
| Application Notes: U4x1 Application Notes Misc Applications and Information FAQ |