Header file for all exported functions for access to auxilliary ports of Silicon Software hardware.
More...
#include <cstring>
Go to the source code of this file.
|
|
These functions can be used to get and set certain operational parameters of a port.
|
int | SisoAuxPortGetProperty (SisoAuxPort handle, const char *property, SisoAuxPortPropertyType type, void *value, unsigned int size) |
|
int | SisoAuxPortSetProperty (SisoAuxPort handle, const char *property, SisoAuxPortPropertyType type, void *value, unsigned int size) |
|
|
These functions can be used to send and receive data on a port.
|
int | SisoAuxPortBeginTransferBlock (SisoAuxPort handle, unsigned int timeout) |
|
int | SisoAuxPortEndTransferBlock (SisoAuxPort handle) |
|
int | SisoAuxPortFlush (SisoAuxPort handle, SisoAuxPortFlushType flush, unsigned int timeout) |
|
int | SisoAuxPortRead (SisoAuxPort handle, void *data, unsigned int size, unsigned int *length_ptr, unsigned int flags, unsigned int timeout) |
|
int | SisoAuxPortReceive (SisoAuxPort handle, unsigned int device_id, void *data, unsigned int size, unsigned int *length_ptr, unsigned int flags, unsigned int timeout) |
|
int | SisoAuxPortSend (SisoAuxPort handle, unsigned int device_id, const void *data, unsigned int size, unsigned int *length_ptr, unsigned int flags, unsigned int timeout) |
|
int | SisoAuxPortTransmit (SisoAuxPort handle, unsigned int device_id, const void *data_out, unsigned int size_out, unsigned int *length_out_ptr, void *data_in, unsigned int size_in, unsigned int *length_in_ptr, unsigned int flags, unsigned int timeout) |
|
int | SisoAuxPortWrite (SisoAuxPort handle, const void *data, unsigned int size, unsigned int *length_ptr, unsigned int flags, unsigned int timeout) |
|
Header file for all exported functions for access to auxilliary ports of Silicon Software hardware.
siso_auxport.h
Copyright (c) 2021 Basler AG, All Rights Reserved.
- Author
- Basler AG
◆ SISO_AUX_PORT_ERROR
#define SISO_AUX_PORT_ERROR (-1) |
An internal error occurred
◆ SISO_AUX_PORT_ERROR_BUSY
#define SISO_AUX_PORT_ERROR_BUSY (-8) |
The port was already opened using another handle
◆ SISO_AUX_PORT_ERROR_FREQUENCY_TOO_HIGH
#define SISO_AUX_PORT_ERROR_FREQUENCY_TOO_HIGH (-111) |
The requested frequency was too high
◆ SISO_AUX_PORT_ERROR_FREQUENCY_TOO_LOW
#define SISO_AUX_PORT_ERROR_FREQUENCY_TOO_LOW (-110) |
The requested frequency was too low
◆ SISO_AUX_PORT_ERROR_INVALID_BOARD_ID
#define SISO_AUX_PORT_ERROR_INVALID_BOARD_ID (-4) |
No board could be found for the specified id
◆ SISO_AUX_PORT_ERROR_INVALID_FLUSH_TYPE
#define SISO_AUX_PORT_ERROR_INVALID_FLUSH_TYPE (-54) |
The value for flush type was invalid
◆ SISO_AUX_PORT_ERROR_INVALID_POINTER
#define SISO_AUX_PORT_ERROR_INVALID_POINTER (-2) |
A pointer passed as parameter was either NULL, or memory could not be accessed
◆ SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLE
#define SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLE (-7) |
The port handle was invalid
◆ SISO_AUX_PORT_ERROR_INVALID_PORT_NUMBER
#define SISO_AUX_PORT_ERROR_INVALID_PORT_NUMBER (-6) |
No port could be found for the specified number
◆ SISO_AUX_PORT_ERROR_INVALID_PORT_TYPE
#define SISO_AUX_PORT_ERROR_INVALID_PORT_TYPE (-5) |
The port type specified was invalid
◆ SISO_AUX_PORT_ERROR_INVALID_PROPERTY
#define SISO_AUX_PORT_ERROR_INVALID_PROPERTY (-101) |
The name of the property to get/set was invalid, or not available for the type of the port the handle refers to
◆ SISO_AUX_PORT_ERROR_INVALID_PROPERTY_TYPE
#define SISO_AUX_PORT_ERROR_INVALID_PROPERTY_TYPE (-102) |
The type of the value pointer does not match the property value
◆ SISO_AUX_PORT_ERROR_INVALID_RWFLAGS
#define SISO_AUX_PORT_ERROR_INVALID_RWFLAGS (-51) |
The flags passed were invalid for the type of port the handle refers to, or not allowed in the combination given, or plain invalid
◆ SISO_AUX_PORT_ERROR_INVALID_SIZE
#define SISO_AUX_PORT_ERROR_INVALID_SIZE (-3) |
The size of memory passed by pointer was invalid
◆ SISO_AUX_PORT_ERROR_IO_FAILURE
#define SISO_AUX_PORT_ERROR_IO_FAILURE (-52) |
A general input/output error occurred
◆ SISO_AUX_PORT_ERROR_NO_DATA
#define SISO_AUX_PORT_ERROR_NO_DATA (-55) |
◆ SISO_AUX_PORT_ERROR_NOT_IMPLEMENTED
#define SISO_AUX_PORT_ERROR_NOT_IMPLEMENTED (-49) |
The function or feature has not been implemented yet
◆ SISO_AUX_PORT_ERROR_OUT_OF_MEMORY
#define SISO_AUX_PORT_ERROR_OUT_OF_MEMORY (-9) |
◆ SISO_AUX_PORT_ERROR_OVERFLOW
#define SISO_AUX_PORT_ERROR_OVERFLOW (-11) |
The operation exceeded the available buffers
◆ SISO_AUX_PORT_ERROR_PORT_NOT_OPEN
#define SISO_AUX_PORT_ERROR_PORT_NOT_OPEN (-10) |
The port has not been opened yet
◆ SISO_AUX_PORT_ERROR_READ_ONLY_PROPERTY
#define SISO_AUX_PORT_ERROR_READ_ONLY_PROPERTY (-103) |
The property can only be retrieved, not set
◆ SISO_AUX_PORT_ERROR_TIMEOUT
#define SISO_AUX_PORT_ERROR_TIMEOUT (-53) |
The operation could not be completed within the time specified
◆ SISO_AUX_PORT_FLOAT_PROPERTY_FREQUENCY
#define SISO_AUX_PORT_FLOAT_PROPERTY_FREQUENCY "Frequency:Float" |
The port frequency as a float value
◆ SISO_AUX_PORT_H
◆ SISO_AUX_PORT_INT_PROPERTY_FREQUENCY
#define SISO_AUX_PORT_INT_PROPERTY_FREQUENCY "Frequency:Int" |
The port frequency as an integer value
◆ SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BITS
#define SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BITS (0x2) |
transfer length is number of bits to read or write
◆ SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BYTES
#define SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BYTES (0x1) |
transfer length is number of bytes to read or write
◆ SISO_AUX_PORT_STRING_PROPERTY_NAME
#define SISO_AUX_PORT_STRING_PROPERTY_NAME "Name:Str" |
The symbolic name for the port as a string
◆ SISO_AUX_PORT_STRING_PROPERTY_TYPE
#define SISO_AUX_PORT_STRING_PROPERTY_TYPE "Type:Str" |
The type of the port as a string
◆ SISO_AUX_PORT_SUCCESS
#define SISO_AUX_PORT_SUCCESS 0 |
Function returned successfully
◆ SISO_I2C_PORT_ERROR_ACK_NAK_MISMATCH
#define SISO_I2C_PORT_ERROR_ACK_NAK_MISMATCH (-302) |
Device did not answer or rejected the request
◆ SISO_I2C_PORT_ERROR_ARBITRATION_LOST
#define SISO_I2C_PORT_ERROR_ARBITRATION_LOST (-301) |
Arbitration on a multi-master I2C bus was lost
◆ SISO_I2C_PORT_RWFLAGS_ACK_LAST_BYTE_READ
#define SISO_I2C_PORT_RWFLAGS_ACK_LAST_BYTE_READ (0x4000) |
Send ACK after last byte read (don't terminate transfer)
◆ SISO_I2C_PORT_RWFLAGS_ACK_POLLING
#define SISO_I2C_PORT_RWFLAGS_ACK_POLLING (0x8000) |
Poll for ACK on first byte written
◆ SISO_I2C_PORT_RWFLAGS_DONT_SEND_START
#define SISO_I2C_PORT_RWFLAGS_DONT_SEND_START (0x1000) |
Don't send START condition (no device id will be sent when using device level transmission API)
◆ SISO_I2C_PORT_RWFLAGS_DONT_SEND_STOP
#define SISO_I2C_PORT_RWFLAGS_DONT_SEND_STOP (0x2000) |
Don't send STOP condition after transfer (don't terminate message)
◆ SISO_I2C_PORT_RWFLAGS_NAK_LAST_BYTE_READ
#define SISO_I2C_PORT_RWFLAGS_NAK_LAST_BYTE_READ 0 |
Send NAK after last byte read
◆ SISO_I2C_PORT_RWFLAGS_SEND_START
#define SISO_I2C_PORT_RWFLAGS_SEND_START 0 |
Send START condition (and device id when using device level transmission API)
◆ SISO_I2C_PORT_RWFLAGS_SEND_STOP
#define SISO_I2C_PORT_RWFLAGS_SEND_STOP 0 |
Send STOP condition after transfer
◆ SISO_JTAG_PORT_BINARY_PROPERTY_CHAIN
#define SISO_JTAG_PORT_BINARY_PROPERTY_CHAIN "JTAGChain:Bin" |
◆ SISO_JTAG_PORT_DEVICE_ID_INVALID
#define SISO_JTAG_PORT_DEVICE_ID_INVALID (-1) |
The device id is not known
◆ SISO_JTAG_PORT_DEVICE_ID_NONE
#define SISO_JTAG_PORT_DEVICE_ID_NONE 0 |
The device is not expected to have an id
◆ SISO_JTAG_PORT_ERROR
#define SISO_JTAG_PORT_ERROR (-200) |
◆ SISO_JTAG_PORT_ERROR_CHAIN_LENGTH_MISMATCH
#define SISO_JTAG_PORT_ERROR_CHAIN_LENGTH_MISMATCH (-204) |
The length of the JTAG chain specified was invalid
◆ SISO_JTAG_PORT_ERROR_DATA_LENGTH_MISMATCH
#define SISO_JTAG_PORT_ERROR_DATA_LENGTH_MISMATCH (-206) |
TMS data length does not match TDI data length on RAW send
◆ SISO_JTAG_PORT_ERROR_INVALID_CHAIN
#define SISO_JTAG_PORT_ERROR_INVALID_CHAIN (-201) |
The JTAG chain specified was invalid
◆ SISO_JTAG_PORT_ERROR_INVALID_DEVICE_ID
#define SISO_JTAG_PORT_ERROR_INVALID_DEVICE_ID (-203) |
The device id specified in the JTAG chain was invalid
◆ SISO_JTAG_PORT_ERROR_INVALID_IR_LENGTH
#define SISO_JTAG_PORT_ERROR_INVALID_IR_LENGTH (-202) |
The length of the instruction register specified in the JTAG chain was invalid
◆ SISO_JTAG_PORT_ERROR_NO_CHAIN_SET
#define SISO_JTAG_PORT_ERROR_NO_CHAIN_SET (-205) |
◆ SISO_JTAG_PORT_INT_PROPERTY_NUM_TAPS
#define SISO_JTAG_PORT_INT_PROPERTY_NUM_TAPS "JTAGNumTaps:Int" |
The number of TAPs in a JTAG chain as an integer value
◆ SISO_JTAG_PORT_INT_PROPERTY_STATE
#define SISO_JTAG_PORT_INT_PROPERTY_STATE "JTAGState:Int" |
The current state of the JTAG port as an integer value
◆ SISO_JTAG_PORT_RWFLAGS_LSB_FIRST
#define SISO_JTAG_PORT_RWFLAGS_LSB_FIRST (0x400) |
Send and receive data starting with least significant bit
◆ SISO_JTAG_PORT_RWFLAGS_MSB_FIRST
#define SISO_JTAG_PORT_RWFLAGS_MSB_FIRST 0 |
Send and receive data starting with most significant bit
◆ SISO_JTAG_PORT_RWFLAGS_RAW_MODE
#define SISO_JTAG_PORT_RWFLAGS_RAW_MODE (0x80) |
Write data to JTAG shift registers
◆ SISO_JTAG_PORT_RWFLAGS_RAW_SEND_ONES_ON_OTHER
Send 1 bits on raw write for shift register without data
◆ SISO_JTAG_PORT_RWFLAGS_RAW_SEND_ZEROES_ON_OTHER
Send 0 bits on raw write for shift register without data
◆ SISO_JTAG_PORT_RWFLAGS_RAW_WRITE_TDI_DATA
#define SISO_JTAG_PORT_RWFLAGS_RAW_WRITE_TDI_DATA 0 |
Write data to the TDI shift register
◆ SISO_JTAG_PORT_RWFLAGS_RAW_WRITE_TMS_DATA
#define SISO_JTAG_PORT_RWFLAGS_RAW_WRITE_TMS_DATA (0x800) |
Write data to the TMS shift register
◆ SISO_JTAG_PORT_RWFLAGS_READ_MODE_MASK
#define SISO_JTAG_PORT_RWFLAGS_READ_MODE_MASK (0x60) |
◆ SISO_JTAG_PORT_RWFLAGS_SEND_ONES_ON_READ
#define SISO_JTAG_PORT_RWFLAGS_SEND_ONES_ON_READ (0x40) |
Send 1 bits on read if not enough data is available
◆ SISO_JTAG_PORT_RWFLAGS_SEND_ZEROES_ON_READ
#define SISO_JTAG_PORT_RWFLAGS_SEND_ZEROES_ON_READ (0x20) |
Send 0 bits on read if not enough data is available
◆ SISO_JTAG_PORT_RWFLAGS_STATE_IDLE
#define SISO_JTAG_PORT_RWFLAGS_STATE_IDLE (0x100) |
◆ SISO_JTAG_PORT_RWFLAGS_STATE_MASK
#define SISO_JTAG_PORT_RWFLAGS_STATE_MASK (0x300) |
◆ SISO_JTAG_PORT_RWFLAGS_STATE_SHIFT_DR
#define SISO_JTAG_PORT_RWFLAGS_STATE_SHIFT_DR (0x200) |
Transmit in SHIFT-DR state
◆ SISO_JTAG_PORT_RWFLAGS_STATE_SHIFT_IR
#define SISO_JTAG_PORT_RWFLAGS_STATE_SHIFT_IR (0x300) |
Transmit in SHIFT_IR state
◆ SISO_JTAG_PORT_RWFLAGS_USE_DEVICE_ID
#define SISO_JTAG_PORT_RWFLAGS_USE_DEVICE_ID 0 |
device_id field in API is JTAG device id
◆ SISO_JTAG_PORT_RWFLAGS_USE_TAP_NUMBER
#define SISO_JTAG_PORT_RWFLAGS_USE_TAP_NUMBER (0x10) |
device_id field in API is the number of the TAP in the chain descriptor
◆ SISO_JTAG_PORT_RWFLAGS_WAIT_ON_READ
#define SISO_JTAG_PORT_RWFLAGS_WAIT_ON_READ 0 |
Wait on read if no write has been issued, or not enough data is available
◆ SISO_JTAG_PORT_STATE_IDLE
#define SISO_JTAG_PORT_STATE_IDLE 1 |
◆ SISO_JTAG_PORT_STATE_RESET
#define SISO_JTAG_PORT_STATE_RESET 0 |
Reset the JTAG state machine
◆ SISO_JTAG_PORT_STATE_SHIFT_DR
#define SISO_JTAG_PORT_STATE_SHIFT_DR 2 |
Shift data to data register
◆ SISO_JTAG_PORT_STATE_SHIFT_IR
#define SISO_JTAG_PORT_STATE_SHIFT_IR 3 |
Shift data to instruction register
◆ SISO_UIQ_PORT_ERROR_INVALID_SPI_MODE
#define SISO_UIQ_PORT_ERROR_INVALID_SPI_MODE (-402) |
provided SPI mode is invalid
◆ SISO_UIQ_PORT_ERROR_INVALID_TRANSMISSION_MODE
#define SISO_UIQ_PORT_ERROR_INVALID_TRANSMISSION_MODE (-401) |
provided Transmission mode is invalid
◆ SISO_UIQ_PORT_INT_PROPERTY_NUM_WORDS_AVAILABLE
#define SISO_UIQ_PORT_INT_PROPERTY_NUM_WORDS_AVAILABLE "UiqNumWords:Int" |
Available number of UIQ words
◆ SISO_UIQ_PORT_INT_PROPERTY_SPI_MODE
#define SISO_UIQ_PORT_INT_PROPERTY_SPI_MODE "UiqSpiMode:Int" |
UIQ SPI mode (0, 1, 2 or 3)
◆ SISO_UIQ_PORT_INT_PROPERTY_TRANSMISSION_MODE
#define SISO_UIQ_PORT_INT_PROPERTY_TRANSMISSION_MODE "UiqTransmissionMode:Int" |
UIQ transmission mode (number of bytes per transaction)
◆ SisoAuxPort
Opaque handle for auxiliary port
◆ SisoAuxPortFlushType
◆ SisoAuxPortPropertyType
◆ SisoAuxPortType
◆ SisoAuxPortFlushType_Enum
Flush type
Enumerator |
---|
SISO_AUX_PORT_FLUSH_ALL | |
SISO_AUX_PORT_FLUSH_INPUT | |
SISO_AUX_PORT_FLUSH_OUTPUT | |
◆ SisoAuxPortPropertyType_Enum
Property type
Enumerator |
---|
SISO_AUX_PORT_PROPERTY_TYPE_INT | Integer value
|
SISO_AUX_PORT_PROPERTY_TYPE_FLOAT | Float value
|
SISO_AUX_PORT_PROPERTY_TYPE_STRING | String (supply a character buffer)
|
SISO_AUX_PORT_PROPERTY_TYPE_BINARY | Binary (further defined)
|
◆ SisoAuxPortType_Enum
Auxiliary port types
Enumerator |
---|
SISO_AUX_PORT_ANY | Port type unspecified (all ports)
|
SISO_AUX_PORT_JTAG | JTAG ports
|
SISO_AUX_PORT_I2C | I2C ports
|
SISO_AUX_PORT_UIQ | UIQ ports
|
SISO_AUX_PORT_SPI | SPI ports
|
◆ SisoAuxPortBeginTransferBlock()
int SisoAuxPortBeginTransferBlock |
( |
SisoAuxPort |
handle, |
|
|
unsigned int |
timeout |
|
) |
| |
Begin transfer block
The AuxPort API is optimized for block transfers. When using the API to do many small transfers, the stability of the system can suffer. With the function pair SisoAuxPortBeginTransferBlock() and SisoAuxPortEndTransferBlock() such transfers can be made more efficient and secure. Note, however, that a transfer block is exclusive across the whole system with regard to the board. The transfer block will block access to the board for many other APIs not related to SisoAuxPort (for example, but not limited to, scanning and initializing boards). As a general rule, don't hold a transfer block for much more than a second, unless you know that no other API needs access to the board while holding the transfer block.
- Parameters
-
handle | Port handle |
timeout | Timeout in milliseconds (0 means return immediately, -1 means wait without timeout) |
- Return values
-
◆ SisoAuxPortClose()
Close auxiliary port
- Parameters
-
- Returns
- 0 on success, negative value on error
- Return values
-
◆ SisoAuxPortEndTransferBlock()
End transfer block
- Parameters
-
- Return values
-
◆ SisoAuxPortFlush()
Flush data on auxiliary port
- Parameters
-
handle | Port handle |
flush | buffers |
timeout | Timeout in milliseconds (0 means return immediately, -1 means wait without timeout) |
- Returns
- 0 on success, negative value on error
- Return values
-
◆ SisoAuxPortFree()
Free auxiliary port handle
- Parameters
-
- Returns
- 0 on success, negative value on error
- Return values
-
◆ SisoAuxPortGetFirstNumberOfType()
int SisoAuxPortGetFirstNumberOfType |
( |
unsigned int |
board_id, |
|
|
SisoAuxPortType |
port_type |
|
) |
| |
Get number of first port of given type
- Parameters
-
board_id | Number of Siso board |
port_type | Port type |
- Returns
- Number of first port on success, negative value on error
- Return values
-
◆ SisoAuxPortGetNumberOfPorts()
int SisoAuxPortGetNumberOfPorts |
( |
unsigned int |
board_id, |
|
|
SisoAuxPortType |
port_type |
|
) |
| |
Get number of available ports of given type
- Parameters
-
board_id | Number of Siso board |
port_type | Port type |
- Returns
- Number of ports on success, negative value on error
- Return values
-
◆ SisoAuxPortGetProperty()
Get port property
- Parameters
-
handle | Port handle |
property | Name of the property to get |
type | Type of the value pointer |
value | Pointer to value variable |
size | Size of the value variable |
- Returns
- 0 on success, negative value on error
- Return values
-
◆ SisoAuxPortGetType()
int SisoAuxPortGetType |
( |
unsigned int |
board_id, |
|
|
unsigned int |
port_num, |
|
|
SisoAuxPortType * |
type_ptr |
|
) |
| |
Get port type
- Parameters
-
board_id | Number of Siso board |
port_num | Number of port |
type_ptr | Pointer to port type variable |
- Returns
- 0 on success, negative value on error
- Return values
-
◆ SisoAuxPortInit()
Initialise port handle
- Parameters
-
board_id | Number of Siso board |
port_num | Number of port |
type | Port type |
handle_ptr | Pointer to port handle variable |
- Returns
- 0 on success, negative value on error
- Return values
-
◆ SisoAuxPortOpen()
Open port
- Parameters
-
- Returns
- 0 on success, negative value on error
- Return values
-
◆ SisoAuxPortRead()
int SisoAuxPortRead |
( |
SisoAuxPort |
handle, |
|
|
void * |
data, |
|
|
unsigned int |
size, |
|
|
unsigned int * |
length_ptr, |
|
|
unsigned int |
flags, |
|
|
unsigned int |
timeout |
|
) |
| |
Receive raw data on auxiliary port
- Parameters
-
handle | Port handle |
data | Data buffer |
size | Size of data buffer in bytes |
length_ptr | Pointer to transfer length variable; requested length on input, actual transfer length on output |
flags | Read flags |
timeout | Timeout in milliseconds (0 means return immediately, -1 means wait without timeout) |
- Returns
- 0 on success, negative value on error
- Return values
-
◆ SisoAuxPortReceive()
int SisoAuxPortReceive |
( |
SisoAuxPort |
handle, |
|
|
unsigned int |
device_id, |
|
|
void * |
data, |
|
|
unsigned int |
size, |
|
|
unsigned int * |
length_ptr, |
|
|
unsigned int |
flags, |
|
|
unsigned int |
timeout |
|
) |
| |
Receive data from device on auxiliary port
- Parameters
-
handle | Port handle |
device_id | Device id, or TAP number |
data | Data buffer |
size | Size of data buffer in bytes |
length_ptr | Pointer to transfer length variable; requested length on input, actual transfer length on output |
flags | Read flags |
timeout | Timeout in milliseconds (0 means return immediately, -1 means wait without timeout) |
- Returns
- 0 on success, negative value on error
- Return values
-
◆ SisoAuxPortSend()
int SisoAuxPortSend |
( |
SisoAuxPort |
handle, |
|
|
unsigned int |
device_id, |
|
|
const void * |
data, |
|
|
unsigned int |
size, |
|
|
unsigned int * |
length_ptr, |
|
|
unsigned int |
flags, |
|
|
unsigned int |
timeout |
|
) |
| |
Send data to device
- Parameters
-
handle | Port handle |
device_id | Device id, or TAP number |
data | Data buffer |
size | Size of data buffer in bytes |
length_ptr | Pointer to transfer length variable; requested length on input, actual transfer length on output |
flags | Write flags |
timeout | Timeout in milliseconds (0 means return immediately, -1 means wait without timeout) |
- Returns
- 0 on success, negative value on error
- Return values
-
◆ SisoAuxPortSetProperty()
Set port property
- Parameters
-
handle | Port handle |
property | Name of the property to set |
type | Type of the value pointer |
value | Pointer to value variable |
size | Size of the value variable |
- Returns
- 0 on success, negative value on error
- Return values
-
◆ SisoAuxPortTransmit()
int SisoAuxPortTransmit |
( |
SisoAuxPort |
handle, |
|
|
unsigned int |
device_id, |
|
|
const void * |
data_out, |
|
|
unsigned int |
size_out, |
|
|
unsigned int * |
length_out_ptr, |
|
|
void * |
data_in, |
|
|
unsigned int |
size_in, |
|
|
unsigned int * |
length_in_ptr, |
|
|
unsigned int |
flags, |
|
|
unsigned int |
timeout |
|
) |
| |
Send and receive data to/from device on auxiliary port
- Parameters
-
handle | Port handle |
device_id | Device id, or TAP number |
data_out | Send data buffer |
size_out | Size of send data buffer in bytes |
length_out_ptr | Pointer to send transfer length variable; requested length on input, actual transfer length on output |
data_in | Receive data buffer |
size_in | Size of receive data buffer in bytes |
length_in_ptr | Pointer to receive transfer length variable; requested length on input, actual transfer length on output |
flags | Read/Write flags |
timeout | Timeout in milliseconds (0 means return immediately, -1 means wait without timeout) |
- Returns
- 0 on success, negative value on error
- Return values
-
◆ SisoAuxPortWrite()
int SisoAuxPortWrite |
( |
SisoAuxPort |
handle, |
|
|
const void * |
data, |
|
|
unsigned int |
size, |
|
|
unsigned int * |
length_ptr, |
|
|
unsigned int |
flags, |
|
|
unsigned int |
timeout |
|
) |
| |
Send raw data on auxiliary port
- Parameters
-
handle | Port handle |
data | Data buffer |
size | Size of data buffer in bytes |
length_ptr | Pointer to transfer length variable; requested length on input, actual transfer length on output |
flags | Write flags |
timeout | Timeout in milliseconds (0 means return immediately, -1 means wait without timeout) |
- Returns
- 0 on success, negative value on error
- Return values
-
|