SESTILIO  3.0.2
C Library for SESTILIO a smart A/D and D/A interface on USB 2.0
SPI expansion port

Functions

CTYPE int DLL SE_WriteSPI (int address, int slaveAddress, int num, const char *buffer, int usbDevice)
 Write a stream of data on SPI expansion bus. More...
 
CTYPE const char DLL_P SE_ReadSPI (int address, int slaveAddress, int num, int usbDevice)
 Read a stream of data from the SPI expansion bus. More...
 
CTYPE const char DLL_P SE_ReadWriteSPI (int address, int slaveAddress, int num, const char *buffer, int usbDevice)
 Write and at the same time read a stream of data from the SPI expansion bus. More...
 
CTYPE int DLL SE_SetClockSPI (int speed, int mode, int usbDevice)
 Set the SPI clock. More...
 
CTYPE int DLL SE_CheckSPI (int address, int slaveAddress, int usbDevice)
 Return the logic level of the MISO line. More...
 

Detailed Description

Basic functions used to read or write on SPI expansion port.

Function Documentation

◆ SE_CheckSPI()

int SE_CheckSPI ( int  address,
int  slaveAddress,
int  usbDevice 
)

Return the logic level of the MISO line.

Parameters
addressPeripheral address on SPI expansion bus (0-7).
slaveAddressSlave address (0-1).
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_ReadSPI, SE_ReadWriteSPI, SE_SetClockSPI.
Returns
Level (0/1) of the MISO line.

Definition at line 508 of file sestilio.cpp.

◆ SE_ReadSPI()

const char * SE_ReadSPI ( int  address,
int  slaveAddress,
int  num,
int  usbDevice 
)

Read a stream of data from the SPI expansion bus.

Parameters
addressPeripheral address on SPI expansion bus (0-7).
slaveAddressSlave address (0-1).
numNumber of data to be read.
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_WriteSPI, SE_ReadWriteSPI, SE_SetClockSPI.
Returns
Buffer of data.

Definition at line 484 of file sestilio.cpp.

◆ SE_ReadWriteSPI()

const char * SE_ReadWriteSPI ( int  address,
int  slaveAddress,
int  num,
const char *  buffer,
int  usbDevice 
)

Write and at the same time read a stream of data from the SPI expansion bus.

Parameters
addressPeripheral address on SPI expansion bus (0-7).
slaveAddressSlave address (0-1).
numNumber of data to be sent and read.
bufferBuffer of data (out/in).
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_ReadSPI, SE_ReadWriteSPI, SE_SetClockSPI.
Returns
Operation status. Operation Status

Definition at line 491 of file sestilio.cpp.

◆ SE_SetClockSPI()

int SE_SetClockSPI ( int  speed,
int  mode,
int  usbDevice 
)

Set the SPI clock.

Parameters
speedClock selection: 0 = 12.5 MHz, 1 = 6.25 MHz, 2 = 4.08 MHz, 3 = 3.06 MHz, 4 = 2.45 MHz, 5 = 2.04 MHz, 6 = 1.75 MHz, 7 = 1.53 MHz, 8 = 1.36 MHz, 9 = 1.22 MHz. SPI clock
modeSet the clock standby level and the edge used for sampling. SPI clock configuration
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_ReadSPI, SE_ReadWriteSPI, SE_WriteSPI.
Returns
Operation status. Operation Status

Definition at line 518 of file sestilio.cpp.

◆ SE_WriteSPI()

int SE_WriteSPI ( int  address,
int  slaveAddress,
int  num,
const char *  buffer,
int  usbDevice 
)

Write a stream of data on SPI expansion bus.

Parameters
addressPeripheral address on SPI expansion bus (0-7).
slaveAddressSlave address (0-1).
numNumber of data to be sent.
bufferBuffer of data to be sent.
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_ReadSPI, SE_ReadWriteSPI, SE_SetClockSPI.
Returns
Operation status. Operation Status

Definition at line 477 of file sestilio.cpp.