Silicon Software Logo

siso_auxport.h File Reference

siso_auxport.h File Reference

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.

Data Structures

struct  SisoJTAGChain_Struct
 
struct  SisoJTAGTAP_Struct
 

Macros

#define SISO_AUX_PORT_H
 
Port properties

These properties are defined for ports

#define SISO_AUX_PORT_FLOAT_PROPERTY_FREQUENCY   "Frequency:Float"
 
#define SISO_AUX_PORT_INT_PROPERTY_FREQUENCY   "Frequency:Int"
 
#define SISO_AUX_PORT_STRING_PROPERTY_NAME   "Name:Str"
 
#define SISO_AUX_PORT_STRING_PROPERTY_TYPE   "Type:Str"
 
#define SISO_JTAG_PORT_BINARY_PROPERTY_CHAIN   "JTAGChain:Bin"
 
#define SISO_JTAG_PORT_INT_PROPERTY_NUM_TAPS   "JTAGNumTaps:Int"
 
#define SISO_JTAG_PORT_INT_PROPERTY_STATE   "JTAGState:Int"
 
#define SISO_UIQ_PORT_INT_PROPERTY_NUM_WORDS_AVAILABLE   "UiqNumWords:Int"
 
#define SISO_UIQ_PORT_INT_PROPERTY_SPI_MODE   "UiqSpiMode:Int"
 
#define SISO_UIQ_PORT_INT_PROPERTY_TRANSMISSION_MODE   "UiqTransmissionMode:Int"
 
JTAG port state property values
#define SISO_JTAG_PORT_STATE_IDLE   1
 
#define SISO_JTAG_PORT_STATE_RESET   0
 
#define SISO_JTAG_PORT_STATE_SHIFT_DR   2
 
#define SISO_JTAG_PORT_STATE_SHIFT_IR   3
 
JTAG device id values
#define SISO_JTAG_PORT_DEVICE_ID_INVALID   (-1)
 
#define SISO_JTAG_PORT_DEVICE_ID_NONE   0
 
Function results

These values can be returned by functions.

#define SISO_AUX_PORT_ERROR   (-1)
 
#define SISO_AUX_PORT_ERROR_BUSY   (-8)
 
#define SISO_AUX_PORT_ERROR_FREQUENCY_TOO_HIGH   (-111)
 
#define SISO_AUX_PORT_ERROR_FREQUENCY_TOO_LOW   (-110)
 
#define SISO_AUX_PORT_ERROR_INVALID_BOARD_ID   (-4)
 
#define SISO_AUX_PORT_ERROR_INVALID_FLUSH_TYPE   (-54)
 
#define SISO_AUX_PORT_ERROR_INVALID_POINTER   (-2)
 
#define SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLE   (-7)
 
#define SISO_AUX_PORT_ERROR_INVALID_PORT_NUMBER   (-6)
 
#define SISO_AUX_PORT_ERROR_INVALID_PORT_TYPE   (-5)
 
#define SISO_AUX_PORT_ERROR_INVALID_PROPERTY   (-101)
 
#define SISO_AUX_PORT_ERROR_INVALID_PROPERTY_TYPE   (-102)
 
#define SISO_AUX_PORT_ERROR_INVALID_RWFLAGS   (-51)
 
#define SISO_AUX_PORT_ERROR_INVALID_SIZE   (-3)
 
#define SISO_AUX_PORT_ERROR_IO_FAILURE   (-52)
 
#define SISO_AUX_PORT_ERROR_NO_DATA   (-55)
 
#define SISO_AUX_PORT_ERROR_NOT_IMPLEMENTED   (-49)
 
#define SISO_AUX_PORT_ERROR_OUT_OF_MEMORY   (-9)
 
#define SISO_AUX_PORT_ERROR_OVERFLOW   (-11)
 
#define SISO_AUX_PORT_ERROR_PORT_NOT_OPEN   (-10)
 
#define SISO_AUX_PORT_ERROR_READ_ONLY_PROPERTY   (-103)
 
#define SISO_AUX_PORT_ERROR_TIMEOUT   (-53)
 
#define SISO_AUX_PORT_SUCCESS   0
 
#define SISO_I2C_PORT_ERROR_ACK_NAK_MISMATCH   (-302)
 
#define SISO_I2C_PORT_ERROR_ARBITRATION_LOST   (-301)
 
#define SISO_JTAG_PORT_ERROR   (-200)
 
#define SISO_JTAG_PORT_ERROR_CHAIN_LENGTH_MISMATCH   (-204)
 
#define SISO_JTAG_PORT_ERROR_DATA_LENGTH_MISMATCH   (-206)
 
#define SISO_JTAG_PORT_ERROR_INVALID_CHAIN   (-201)
 
#define SISO_JTAG_PORT_ERROR_INVALID_DEVICE_ID   (-203)
 
#define SISO_JTAG_PORT_ERROR_INVALID_IR_LENGTH   (-202)
 
#define SISO_JTAG_PORT_ERROR_NO_CHAIN_SET   (-205)
 
#define SISO_UIQ_PORT_ERROR_INVALID_SPI_MODE   (-402)
 
#define SISO_UIQ_PORT_ERROR_INVALID_TRANSMISSION_MODE   (-401)
 

Typedefs

typedef enum SisoAuxPortType_Enum SisoAuxPortType
 

Enumerations

enum  SisoAuxPortType_Enum {
  SISO_AUX_PORT_ANY, SISO_AUX_PORT_JTAG, SISO_AUX_PORT_I2C, SISO_AUX_PORT_UIQ,
  SISO_AUX_PORT_SPI
}
 

Functions

Port property interface

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)
 
Port communication interface

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)
 

Port enumeration

These functions can be used to enumerate the ports on a device.

typedef struct SisoAuxPort_Struct * SisoAuxPort
 
int SisoAuxPortGetFirstNumberOfType (unsigned int board_id, SisoAuxPortType port_type)
 
int SisoAuxPortGetNumberOfPorts (unsigned int board_id, SisoAuxPortType port_type)
 
int SisoAuxPortGetType (unsigned int board_id, unsigned int port_num, SisoAuxPortType *type_ptr)
 

Port initialization and release

These functions will initialize the ports on the requested device. They need to be called before any other operation on the port can be performed.

int SisoAuxPortClose (SisoAuxPort handle)
 
int SisoAuxPortFree (SisoAuxPort handle)
 
int SisoAuxPortInit (unsigned int board_id, unsigned int port_num, SisoAuxPortType type, SisoAuxPort *handle_ptr)
 
int SisoAuxPortOpen (SisoAuxPort handle)
 
typedef SisoAuxPortPropertyType_Enum SisoAuxPortPropertyType
 
enum  SisoAuxPortPropertyType_Enum { SISO_AUX_PORT_PROPERTY_TYPE_INT, SISO_AUX_PORT_PROPERTY_TYPE_FLOAT, SISO_AUX_PORT_PROPERTY_TYPE_STRING, SISO_AUX_PORT_PROPERTY_TYPE_BINARY }
 

Transmission flags

These flags control data transmission on a port.

#define SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BITS   (0x2)
 
#define SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BYTES   (0x1)
 
#define SISO_I2C_PORT_RWFLAGS_ACK_LAST_BYTE_READ   (0x4000)
 
#define SISO_I2C_PORT_RWFLAGS_ACK_POLLING   (0x8000)
 
#define SISO_I2C_PORT_RWFLAGS_DONT_SEND_START   (0x1000)
 
#define SISO_I2C_PORT_RWFLAGS_DONT_SEND_STOP   (0x2000)
 
#define SISO_I2C_PORT_RWFLAGS_NAK_LAST_BYTE_READ   0
 
#define SISO_I2C_PORT_RWFLAGS_SEND_START   0
 
#define SISO_I2C_PORT_RWFLAGS_SEND_STOP   0
 
#define SISO_JTAG_PORT_RWFLAGS_LSB_FIRST   (0x400)
 
#define SISO_JTAG_PORT_RWFLAGS_MSB_FIRST   0
 
#define SISO_JTAG_PORT_RWFLAGS_RAW_MODE   (0x80)
 
#define SISO_JTAG_PORT_RWFLAGS_RAW_SEND_ONES_ON_OTHER   SISO_JTAG_PORT_RWFLAGS_SEND_ONES_ON_READ
 
#define SISO_JTAG_PORT_RWFLAGS_RAW_SEND_ZEROES_ON_OTHER   SISO_JTAG_PORT_RWFLAGS_SEND_ZEROES_ON_READ
 
#define SISO_JTAG_PORT_RWFLAGS_RAW_WRITE_TDI_DATA   0
 
#define SISO_JTAG_PORT_RWFLAGS_RAW_WRITE_TMS_DATA   (0x800)
 
#define SISO_JTAG_PORT_RWFLAGS_READ_MODE_MASK   (0x60)
 
#define SISO_JTAG_PORT_RWFLAGS_SEND_ONES_ON_READ   (0x40)
 
#define SISO_JTAG_PORT_RWFLAGS_SEND_ZEROES_ON_READ   (0x20)
 
#define SISO_JTAG_PORT_RWFLAGS_STATE_IDLE   (0x100)
 
#define SISO_JTAG_PORT_RWFLAGS_STATE_MASK   (0x300)
 
#define SISO_JTAG_PORT_RWFLAGS_STATE_SHIFT_DR   (0x200)
 
#define SISO_JTAG_PORT_RWFLAGS_STATE_SHIFT_IR   (0x300)
 
#define SISO_JTAG_PORT_RWFLAGS_USE_DEVICE_ID   0
 
#define SISO_JTAG_PORT_RWFLAGS_USE_TAP_NUMBER   (0x10)
 
#define SISO_JTAG_PORT_RWFLAGS_WAIT_ON_READ   0
 
typedef enum SisoAuxPortFlushType_Enum SisoAuxPortFlushType
 
enum  SisoAuxPortFlushType_Enum { SISO_AUX_PORT_FLUSH_ALL, SISO_AUX_PORT_FLUSH_INPUT, SISO_AUX_PORT_FLUSH_OUTPUT }
 

Detailed Description

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

Macro Definition Documentation

◆ 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)

No data is available

◆ 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)

Not enough memory

◆ 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

#define 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"

The JTAG chain (supply a SisoJTAGChain_Struct of the proper size)

◆ 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)

No JTAG chain was set

◆ 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

#define SISO_JTAG_PORT_RWFLAGS_RAW_SEND_ONES_ON_OTHER   SISO_JTAG_PORT_RWFLAGS_SEND_ONES_ON_READ

Send 1 bits on raw write for shift register without data

◆ SISO_JTAG_PORT_RWFLAGS_RAW_SEND_ZEROES_ON_OTHER

#define SISO_JTAG_PORT_RWFLAGS_RAW_SEND_ZEROES_ON_OTHER   SISO_JTAG_PORT_RWFLAGS_SEND_ZEROES_ON_READ

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)

Read mode mask

◆ 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)

Transmit in IDLE state

◆ SISO_JTAG_PORT_RWFLAGS_STATE_MASK

#define SISO_JTAG_PORT_RWFLAGS_STATE_MASK   (0x300)

Transmit state mask

◆ 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

JTAG idle state

◆ 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)

Typedef Documentation

◆ SisoAuxPort

typedef struct SisoAuxPort_Struct* SisoAuxPort

Opaque handle for auxiliary port

◆ SisoAuxPortFlushType

◆ SisoAuxPortPropertyType

◆ SisoAuxPortType

Enumeration Type Documentation

◆ 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

Function Documentation

◆ 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.

Remarks
Possible error values: SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLE SISO_AUX_PORT_ERROR_PORT_NOT_OPEN SISO_AUX_PORT_ERROR_IO_FAILURE SISO_AUX_PORT_ERROR_TIMEOUT
Parameters
handlePort handle
timeoutTimeout in milliseconds (0 means return immediately, -1 means wait without timeout)
Return values
SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLEEither NULL was specified for the handle, or the handle was already released, or invalid
SISO_AUX_PORT_ERROR_PORT_NOT_OPENThe port has not been opened yet
SISO_AUX_PORT_ERROR_IO_FAILUREA general input/output error occurred
SISO_AUX_PORT_ERROR_TIMEOUTThe operation could not be completed within the time specified

◆ SisoAuxPortClose()

int SisoAuxPortClose ( SisoAuxPort  handle)

Close auxiliary port

Remarks
After finishing communication on a port, it should be closed using SisoAuxPortClose().
Parameters
handlePort handle
Returns
0 on success, negative value on error
Return values
SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLEEither NULL was specified for the handle, or the handle was already released, or invalid

◆ SisoAuxPortEndTransferBlock()

int SisoAuxPortEndTransferBlock ( SisoAuxPort  handle)

End transfer block

Remarks
Possible error values: SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLE SISO_AUX_PORT_ERROR_PORT_NOT_OPEN SISO_AUX_PORT_ERROR_IO_FAILURE
Parameters
handlePort handle
Return values
SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLEEither NULL was specified for the handle, or the handle was already released, or invalid
SISO_AUX_PORT_ERROR_PORT_NOT_OPENThe port has not been opened yet
SISO_AUX_PORT_ERROR_IO_FAILUREA general input/output error occurred

◆ SisoAuxPortFlush()

int SisoAuxPortFlush ( SisoAuxPort  handle,
SisoAuxPortFlushType  flush,
unsigned int  timeout 
)

Flush data on auxiliary port

Remarks
Possible error values: SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLE SISO_AUX_PORT_ERROR_IO_FAILURE SISO_AUX_PORT_ERROR_TIMEOUT SISO_AUX_PORT_ERROR_INVALID_FLUSH_TYPE
Parameters
handlePort handle
flushbuffers
timeoutTimeout in milliseconds (0 means return immediately, -1 means wait without timeout)
Returns
0 on success, negative value on error
Return values
SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLEEither NULL was specified for the handle, or the handle was already released, or invalid
SISO_AUX_PORT_ERROR_PORT_NOT_OPENThe port has not been opened yet
SISO_AUX_PORT_ERROR_IO_FAILUREA general input/output error occurred
SISO_AUX_PORT_ERROR_TIMEOUTThe operation could not be completed within the time specified
SISO_AUX_PORT_ERROR_INVALID_FLUSH_TYPEThe value for flush type was invalid

◆ SisoAuxPortFree()

int SisoAuxPortFree ( SisoAuxPort  handle)

Free auxiliary port handle

Remarks
All handles that were created by SisoAuxPortInit() must be released using SisoAuxPortFree() before the program terminates. After calling SisoAuxPortFree() on a handle, the handle becomes invalid and must not be used in any function calls.
Parameters
handlePort handle
Returns
0 on success, negative value on error
Return values
SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLEEither NULL was specified for the handle, or the handle was already released, or invalid

◆ SisoAuxPortGetFirstNumberOfType()

int SisoAuxPortGetFirstNumberOfType ( unsigned int  board_id,
SisoAuxPortType  port_type 
)

Get number of first port of given type

Remarks
Ports are grouped by type and numbered consecutively. Together with SisoAuxPortGetNumberOfPorts() the range of numbers for a given port type can be easily determined. For example, if for a given board and SISO_AUX_PORT_I2C SisoAuxPortGetFirstNumberOfType() returns 2, and SisoAuxPortGetNumberOfPorts() returns 3, then the available I2C ports will be 2, 3 and 4.
Parameters
board_idNumber of Siso board
port_typePort type
Returns
Number of first port on success, negative value on error
Return values
SISO_AUX_PORT_ERROR_INVALID_BOARD_IDNo Siso board found for the specified id
SISO_AUX_PORT_ERROR_INVALID_PORT_TYPEThe value for port type parameter is invalid

◆ SisoAuxPortGetNumberOfPorts()

int SisoAuxPortGetNumberOfPorts ( unsigned int  board_id,
SisoAuxPortType  port_type 
)

Get number of available ports of given type

Remarks
Use SISO_AUX_PORT_ANY to get the total number of auxiliary ports on a given board.
Parameters
board_idNumber of Siso board
port_typePort type
Returns
Number of ports on success, negative value on error
Return values
SISO_AUX_PORT_ERROR_INVALID_BOARD_IDNo Siso board found for the specified id
SISO_AUX_PORT_ERROR_INVALID_PORT_TYPEThe value for port type parameter is invalid

◆ SisoAuxPortGetProperty()

int SisoAuxPortGetProperty ( SisoAuxPort  handle,
const char *  property,
SisoAuxPortPropertyType  type,
void *  value,
unsigned int  size 
)

Get port property

Remarks
Several properties of a port can be retrieved, such as the frequency at which the port operates, a symbolic name for the port or the port type. Depending on the port type, port type specific properties may be available for retrieval.
Parameters
handlePort handle
propertyName of the property to get
typeType of the value pointer
valuePointer to value variable
sizeSize of the value variable
Returns
0 on success, negative value on error
Return values
SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLEEither NULL was specified for the handle, or the handle was already released, or invalid
SISO_AUX_PORT_ERROR_INVALID_PROPERTYThe 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_TYPEThe type of the value pointer does not match the property value
SISO_AUX_PORT_ERROR_INVALID_POINTEREither NULL was specified for the value pointer, or memory could not be accessed
SISO_AUX_PORT_ERROR_INVALID_SIZEThe size does not match the type of the value pointer

◆ SisoAuxPortGetType()

int SisoAuxPortGetType ( unsigned int  board_id,
unsigned int  port_num,
SisoAuxPortType type_ptr 
)

Get port type

Remarks
An alternative approach to opening ports of a given type is to enumerate all ports, get the type and open the port accordingly.
Parameters
board_idNumber of Siso board
port_numNumber of port
type_ptrPointer to port type variable
Returns
0 on success, negative value on error
Return values
SISO_AUX_PORT_ERROR_INVALID_BOARD_IDNo Siso board found for the specified id
SISO_AUX_PORT_ERROR_INVALID_PORT_NUMBERNo port found for the specified number
SISO_AUX_PORT_ERROR_INVALID_POINTEREither NULL was specified for the type pointer, or memory could not be accessed

◆ SisoAuxPortInit()

int SisoAuxPortInit ( unsigned int  board_id,
unsigned int  port_num,
SisoAuxPortType  type,
SisoAuxPort handle_ptr 
)

Initialise port handle

Remarks
Before a port can be opened and used, a handle needs to be created and initialised using SisoAuxPortInit(). After using the port, all handles must be released using SisoAuxPortFree() before the program terminates.
Parameters
board_idNumber of Siso board
port_numNumber of port
typePort type
handle_ptrPointer to port handle variable
Returns
0 on success, negative value on error
Return values
SISO_AUX_PORT_ERROR_INVALID_BOARD_IDNo Siso board found for the specified id
SISO_AUX_PORT_ERROR_INVALID_PORT_NUMBERNo port found for the specified number
SISO_AUX_PORT_ERROR_INVALID_PORT_TYPEThe value for port type parameter was invalid
SISO_AUX_PORT_ERROR_INVALID_POINTEREither NULL was specified for the type pointer, or memory could not be accessed
SISO_AUX_PORT_ERROR_OUT_OF_MEMORYNot enough memory to allocate handle

◆ SisoAuxPortOpen()

int SisoAuxPortOpen ( SisoAuxPort  handle)

Open port

Remarks
Before a port can be used for communication, it needs to be opened using SisoAuxPortOpen(). After using a port for communication, it should be closed using SisoAuxPortClose(). While any number of handles can be created for the same port by different threads or processes, only one handle should be used to open a port at any time. The Siso Runtime ensures that only one handle within a process can open the port. The user has to ensure that a handle is not used across threads. If a handle is shared by two or more threads, the user is responsible for proper synchronization. The same applies to opening and using ports from different processes.
Parameters
handlePort handle
Returns
0 on success, negative value on error
Return values
SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLEEither NULL was specified for the handle, or the handle was already released, or invalid
SISO_AUX_PORT_ERROR_BUSYThe port is already open by another thread or process

◆ 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

Remarks
The transfer length is either in bytes or bits, depending on whether SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BYTES or SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BITS is set (see flags). (At this stage of implementation, this is the only way to communicate on a JTAG port.)
Parameters
handlePort handle
dataData buffer
sizeSize of data buffer in bytes
length_ptrPointer to transfer length variable; requested length on input, actual transfer length on output
flagsRead flags
timeoutTimeout in milliseconds (0 means return immediately, -1 means wait without timeout)
Returns
0 on success, negative value on error
Return values
SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLEEither NULL was specified for the handle, or the handle was already released, or invalid
SISO_AUX_PORT_ERROR_PORT_NOT_OPENThe port has not been opened yet
SISO_AUX_PORT_ERROR_INVALID_POINTEREither NULL was specified for the data pointer, or memory could not be accessed
SISO_AUX_PORT_ERROR_INVALID_SIZEThe size was either zero or too big for the type of port the handle refers to
SISO_AUX_PORT_ERROR_IO_FAILUREA general input/output error occurred
SISO_AUX_PORT_ERROR_TIMEOUTThe operation could not be completed within the time specified
SISO_AUX_PORT_ERROR_INVALID_RWFLAGSThe flags passed were invalid for the type of port the handle refers to, or not allowed in the combination given, or plain invalid
SISO_I2C_PORT_ERROR_ARBITRATION_LOSTArbitration on a multi-master I2C bus was lost
SISO_I2C_PORT_ERROR_ACK_NAK_MISMATCHDevice did not answer or rejected the request

◆ 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

Remarks
The transfer length is either in bytes or bits, depending on whether SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BYTES or SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BITS is set (see flags). For JTAG port, JTAG chain must be set before calling. (At this stage of implementation, JTAG chains and thus high level JTAG communication is not available.)
Parameters
handlePort handle
device_idDevice id, or TAP number
dataData buffer
sizeSize of data buffer in bytes
length_ptrPointer to transfer length variable; requested length on input, actual transfer length on output
flagsRead flags
timeoutTimeout in milliseconds (0 means return immediately, -1 means wait without timeout)
Returns
0 on success, negative value on error
Return values
SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLEEither NULL was specified for the handle, or the handle was already released, or invalid
SISO_AUX_PORT_ERROR_PORT_NOT_OPENThe port has not been opened yet
SISO_AUX_PORT_ERROR_INVALID_POINTEREither NULL was specified for the data pointer, or memory could not be accessed
SISO_AUX_PORT_ERROR_INVALID_SIZEThe size was either zero or too big for the type of port the handle refers to
SISO_AUX_PORT_ERROR_IO_FAILUREA general input/output error occurred
SISO_AUX_PORT_ERROR_TIMEOUTThe operation could not be completed within the time specified
SISO_AUX_PORT_ERROR_INVALID_RWFLAGSThe flags passed were invalid for the type of port the handle refers to, or not allowed in the combination given, or plain invalid
SISO_JTAG_PORT_ERROR_NO_CHAIN_SETNo JTAG chain was set
SISO_I2C_PORT_ERROR_ARBITRATION_LOSTArbitration on a multi-master I2C bus was lost
SISO_I2C_PORT_ERROR_ACK_NAK_MISMATCHDevice did not answer or rejected the request

◆ 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

Remarks
The transfer length is either in bytes or bits, depending on whether SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BYTES or SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BITS is set (see flags). For JTAG port, JTAG chain must be set before calling. (At this stage of implementation, JTAG chains and thus high level JTAG communication is not available.)
Parameters
handlePort handle
device_idDevice id, or TAP number
dataData buffer
sizeSize of data buffer in bytes
length_ptrPointer to transfer length variable; requested length on input, actual transfer length on output
flagsWrite flags
timeoutTimeout in milliseconds (0 means return immediately, -1 means wait without timeout)
Returns
0 on success, negative value on error
Return values
SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLEEither NULL was specified for the handle, or the handle was already released, or invalid
SISO_AUX_PORT_ERROR_PORT_NOT_OPENThe port has not been opened yet
SISO_AUX_PORT_ERROR_INVALID_POINTEREither NULL was specified for the data pointer, or memory could not be accessed
SISO_AUX_PORT_ERROR_INVALID_SIZEThe size was either zero or too big for the type of port the handle refers to
SISO_AUX_PORT_ERROR_IO_FAILUREA general input/output error occurred
SISO_AUX_PORT_ERROR_TIMEOUTThe operation could not be completed within the time specified
SISO_AUX_PORT_ERROR_OUT_OF_MEMORYNot enough memory to allocate internal buffers
SISO_AUX_PORT_ERROR_INVALID_RWFLAGSThe flags passed were invalid for the type of port the handle refers to, or not allowed in the combination given, or plain invalid
SISO_JTAG_PORT_ERROR_NO_CHAIN_SETNo JTAG chain was set
SISO_I2C_PORT_ERROR_ARBITRATION_LOSTArbitration on a multi-master I2C bus was lost
SISO_I2C_PORT_ERROR_ACK_NAK_MISMATCHDevice did not answer or rejected the request

◆ SisoAuxPortSetProperty()

int SisoAuxPortSetProperty ( SisoAuxPort  handle,
const char *  property,
SisoAuxPortPropertyType  type,
void *  value,
unsigned int  size 
)

Set port property

Remarks
Several properties of a port can be set, such as the frequency at which the port operates. Depending on the port type, port type specific properties may be available for setting. Port properties can only be changed when the port is not open. When setting the frequency of a port, the actual frequency may not be the same as requested, but is guaranteed to be lower or equal the requested frequency.
Parameters
handlePort handle
propertyName of the property to set
typeType of the value pointer
valuePointer to value variable
sizeSize of the value variable
Returns
0 on success, negative value on error
Return values
SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLEEither NULL was specified for the handle, or the handle was already released, or invalid
SISO_AUX_PORT_ERROR_INVALID_PROPERTYThe 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_TYPEThe type of the value pointer does not match the property value
SISO_AUX_PORT_ERROR_INVALID_POINTEREither NULL was specified for the value pointer, or memory could not be accessed
SISO_AUX_PORT_ERROR_INVALID_SIZEThe size does not match the type of the value pointer
SISO_AUX_PORT_ERROR_READ_ONLY_PROPERTYThe property can only be retrieved, not set
SISO_AUX_PORT_ERROR_FREQUENCY_TOO_LOWThe requested frequency was too low

◆ 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

Remarks
The transfer length is either in bytes or bits, depending on whether SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BYTES or SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BITS is set (see flags). For JTAG port, JTAG chain must be set before calling. (At this stage of implementation, JTAG chains and thus high level JTAG communication is not available.)
Parameters
handlePort handle
device_idDevice id, or TAP number
data_outSend data buffer
size_outSize of send data buffer in bytes
length_out_ptrPointer to send transfer length variable; requested length on input, actual transfer length on output
data_inReceive data buffer
size_inSize of receive data buffer in bytes
length_in_ptrPointer to receive transfer length variable; requested length on input, actual transfer length on output
flagsRead/Write flags
timeoutTimeout in milliseconds (0 means return immediately, -1 means wait without timeout)
Returns
0 on success, negative value on error
Return values
SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLEEither NULL was specified for the handle, or the handle was already released, or invalid
SISO_AUX_PORT_ERROR_PORT_NOT_OPENThe port has not been opened yet
SISO_AUX_PORT_ERROR_INVALID_POINTEREither NULL was specified for the data pointer, or memory could not be accessed
SISO_AUX_PORT_ERROR_INVALID_SIZEThe size was either zero or too big for the type of port the handle refers to
SISO_AUX_PORT_ERROR_IO_FAILUREA general input/output error occurred
SISO_AUX_PORT_ERROR_TIMEOUTThe operation could not be completed within the time specified
SISO_AUX_PORT_ERROR_OUT_OF_MEMORYNot enough memory to allocate internal buffers
SISO_AUX_PORT_ERROR_INVALID_RWFLAGSThe flags passed were invalid for the type of port the handle refers to, or not allowed in the combination given, or plain invalid
SISO_JTAG_PORT_ERROR_NO_CHAIN_SETNo JTAG chain was set
SISO_I2C_PORT_ERROR_ARBITRATION_LOSTArbitration on a multi-master I2C bus was lost
SISO_I2C_PORT_ERROR_ACK_NAK_MISMATCHDevice did not answer or rejected the request

◆ 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

Remarks
Any device selection must be done by the user in data. The transfer length is either in bytes or bits, depending on whether SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BYTES or SISO_AUX_PORT_RWFLAGS_LENGTH_IN_BITS is set (see flags). (At this stage of implementation, this is the only way to communicate on a JTAG port.)
Parameters
handlePort handle
dataData buffer
sizeSize of data buffer in bytes
length_ptrPointer to transfer length variable; requested length on input, actual transfer length on output
flagsWrite flags
timeoutTimeout in milliseconds (0 means return immediately, -1 means wait without timeout)
Returns
0 on success, negative value on error
Return values
SISO_AUX_PORT_ERROR_INVALID_PORT_HANDLEEither NULL was specified for the handle, or the handle was already released, or invalid
SISO_AUX_PORT_ERROR_PORT_NOT_OPENThe port has not been opened yet
SISO_AUX_PORT_ERROR_INVALID_POINTEREither NULL was specified for the data pointer, or memory could not be accessed
SISO_AUX_PORT_ERROR_INVALID_SIZEThe size was either zero or too big for the type of port the handle refers to
SISO_AUX_PORT_ERROR_IO_FAILUREA general input/output error occurred
SISO_AUX_PORT_ERROR_TIMEOUTThe operation could not be completed within the time specified
SISO_AUX_PORT_ERROR_OUT_OF_MEMORYNot enough memory to allocate internal buffers
SISO_AUX_PORT_ERROR_INVALID_RWFLAGSThe flags passed were invalid for the type of port the handle refers to, or not allowed in the combination given, or plain invalid
SISO_I2C_PORT_ERROR_ARBITRATION_LOSTArbitration on a multi-master I2C bus was lost
SISO_I2C_PORT_ERROR_ACK_NAK_MISMATCHDevice did not answer or rejected the request