Ultibo API
C/C++ API for Ultibo Core
Loading...
Searching...
No Matches
_SPI_DEVICE Struct Reference

#include <spi.h>

Data Fields

DEVICE device
 The Device entry for this SPI.
uint32_t spiid
 Unique Id of this SPI in the SPI table.
uint32_t spistate
 SPI state (eg SPI_STATE_ENABLED).
uint32_t spimode
 SPI mode (eg SPI_MODE_4WIRE).
spi_device_start_proc devicestart
 A Device specific DeviceStart method implementing the standard SPI device interface (Mandatory).
spi_device_stop_proc devicestop
 A Device specific DeviceStop method implementing the standard SPI device interface (Mandatory).
spi_device_read_proc deviceread
 A Device specific DeviceRead method implementing the standard SPI device interface (Or nil if the default method is suitable).
spi_device_write_proc devicewrite
 A Device specific DeviceWrite method implementing the standard SPI device interface (Or nil if the default method is suitable).
spi_device_write_read_proc devicewriteread
 A Device specific DeviceWriteRead method implementing the standard SPI device interface (Mandatory).
spi_device_get_mode_proc devicegetmode
 A Device specific DeviceGetMode method implementing the standard SPI device interface (Or nil if the default method is suitable).
spi_device_set_mode_proc devicesetmode
 A Device specific DeviceSetMode method implementing the standard SPI device interface (Or nil if the default method is suitable).
spi_device_get_clock_rate_proc devicegetclockrate
 A Device specific DeviceGetClockRate method implementing the standard SPI device interface (Or nil if the default method is suitable).
spi_device_set_clock_rate_proc devicesetclockrate
 A Device specific DeviceSetClockRate method implementing the standard SPI device interface (Or nil if the default method is suitable).
spi_device_get_clock_phase_proc devicegetclockphase
 A Device specific DeviceGetClockPhase method implementing the standard SPI device interface (Or nil if the default method is suitable).
spi_device_set_clock_phase_proc devicesetclockphase
 A Device specific DeviceSetClockPhase method implementing the standard SPI device interface (Or nil if the default method is suitable).
spi_device_get_clock_polarity_proc devicegetclockpolarity
 A Device specific DeviceGetClockPolarity method implementing the standard SPI device interface (Or nil if the default method is suitable).
spi_device_set_clock_polarity_proc devicesetclockpolarity
 A Device specific DeviceSetClockPolarity method implementing the standard SPI device interface (Or nil if the default method is suitable).
spi_device_get_select_polarity_proc devicegetselectpolarity
 A Device specific DeviceGetSelectPolarity method implementing the standard SPI device interface (Or nil if the default method is suitable).
spi_device_set_select_polarity_proc devicesetselectpolarity
 A Device specific DeviceSetSelectPolarity method implementing the standard SPI device interface (Or nil if the default method is suitable).
spi_device_get_byte_delay_proc devicegetbytedelay
 A Device specific DeviceGetByteDelay method implementing the standard SPI device interface (Or nil if the default method is suitable).
spi_device_set_byte_delay_proc devicesetbytedelay
 A Device specific DeviceSetByteDelay method implementing the standard SPI device interface (Or nil if the default method is suitable).
spi_device_get_properties_proc devicegetproperties
 A Device specific DeviceGetProperties method implementing the standard SPI device interface (Or nil if the default method is suitable).
uint32_t transfercount
uint32_t transfererrors
MUTEX_HANDLE lock
 Device lock.
SEMAPHORE_HANDLE wait
 Write/Read wait event.
uint32_t divider
 Clock divider (Used internally by drivers).
uint32_t clockrate
 Clock rate (Hz).
uint32_t clockphase
 Clock Phase (eg SPI_CLOCK_PHASE_LOW).
uint32_t clockpolarity
 Clock Polarity (eg SPI_CLOCK_POLARITY_LOW).
uint32_t selectpolarity
 Default Chip Select Polarity (eg SPI_CS_POLARITY_LOW).
uint32_t bytedelay
 Delay between bytes written (Microseconds).
SPI_PROPERTIES properties
 Device properties.
SPI_CHIP_SELECT chipselects [SPI_CS_MAX+1]
 Chip selects.
SPI_DEVICEprev
 Previous entry in SPI table.
SPI_DEVICEnext
 Next entry in SPI table.

Field Documentation

◆ device

DEVICE device

The Device entry for this SPI.

◆ spiid

uint32_t spiid

Unique Id of this SPI in the SPI table.

◆ spistate

uint32_t spistate

SPI state (eg SPI_STATE_ENABLED).

◆ spimode

uint32_t spimode

SPI mode (eg SPI_MODE_4WIRE).

◆ devicestart

spi_device_start_proc devicestart

A Device specific DeviceStart method implementing the standard SPI device interface (Mandatory).

◆ devicestop

A Device specific DeviceStop method implementing the standard SPI device interface (Mandatory).

◆ deviceread

A Device specific DeviceRead method implementing the standard SPI device interface (Or nil if the default method is suitable).

◆ devicewrite

spi_device_write_proc devicewrite

A Device specific DeviceWrite method implementing the standard SPI device interface (Or nil if the default method is suitable).

◆ devicewriteread

spi_device_write_read_proc devicewriteread

A Device specific DeviceWriteRead method implementing the standard SPI device interface (Mandatory).

◆ devicegetmode

spi_device_get_mode_proc devicegetmode

A Device specific DeviceGetMode method implementing the standard SPI device interface (Or nil if the default method is suitable).

◆ devicesetmode

spi_device_set_mode_proc devicesetmode

A Device specific DeviceSetMode method implementing the standard SPI device interface (Or nil if the default method is suitable).

◆ devicegetclockrate

spi_device_get_clock_rate_proc devicegetclockrate

A Device specific DeviceGetClockRate method implementing the standard SPI device interface (Or nil if the default method is suitable).

◆ devicesetclockrate

spi_device_set_clock_rate_proc devicesetclockrate

A Device specific DeviceSetClockRate method implementing the standard SPI device interface (Or nil if the default method is suitable).

◆ devicegetclockphase

spi_device_get_clock_phase_proc devicegetclockphase

A Device specific DeviceGetClockPhase method implementing the standard SPI device interface (Or nil if the default method is suitable).

◆ devicesetclockphase

spi_device_set_clock_phase_proc devicesetclockphase

A Device specific DeviceSetClockPhase method implementing the standard SPI device interface (Or nil if the default method is suitable).

◆ devicegetclockpolarity

spi_device_get_clock_polarity_proc devicegetclockpolarity

A Device specific DeviceGetClockPolarity method implementing the standard SPI device interface (Or nil if the default method is suitable).

◆ devicesetclockpolarity

spi_device_set_clock_polarity_proc devicesetclockpolarity

A Device specific DeviceSetClockPolarity method implementing the standard SPI device interface (Or nil if the default method is suitable).

◆ devicegetselectpolarity

spi_device_get_select_polarity_proc devicegetselectpolarity

A Device specific DeviceGetSelectPolarity method implementing the standard SPI device interface (Or nil if the default method is suitable).

◆ devicesetselectpolarity

spi_device_set_select_polarity_proc devicesetselectpolarity

A Device specific DeviceSetSelectPolarity method implementing the standard SPI device interface (Or nil if the default method is suitable).

◆ devicegetbytedelay

spi_device_get_byte_delay_proc devicegetbytedelay

A Device specific DeviceGetByteDelay method implementing the standard SPI device interface (Or nil if the default method is suitable).

◆ devicesetbytedelay

spi_device_set_byte_delay_proc devicesetbytedelay

A Device specific DeviceSetByteDelay method implementing the standard SPI device interface (Or nil if the default method is suitable).

◆ devicegetproperties

spi_device_get_properties_proc devicegetproperties

A Device specific DeviceGetProperties method implementing the standard SPI device interface (Or nil if the default method is suitable).

◆ transfercount

uint32_t transfercount

◆ transfererrors

uint32_t transfererrors

◆ lock

Device lock.

◆ wait

Write/Read wait event.

◆ divider

uint32_t divider

Clock divider (Used internally by drivers).

◆ clockrate

uint32_t clockrate

Clock rate (Hz).

◆ clockphase

uint32_t clockphase

Clock Phase (eg SPI_CLOCK_PHASE_LOW).

◆ clockpolarity

uint32_t clockpolarity

Clock Polarity (eg SPI_CLOCK_POLARITY_LOW).

◆ selectpolarity

uint32_t selectpolarity

Default Chip Select Polarity (eg SPI_CS_POLARITY_LOW).

◆ bytedelay

uint32_t bytedelay

Delay between bytes written (Microseconds).

◆ properties

SPI_PROPERTIES properties

Device properties.

◆ chipselects

SPI_CHIP_SELECT chipselects[SPI_CS_MAX+1]

Chip selects.

◆ prev

SPI_DEVICE* prev

Previous entry in SPI table.

◆ next

SPI_DEVICE* next

Next entry in SPI table.


The documentation for this struct was generated from the following file: