![]() |
Ultibo API
C/C++ API for Ultibo Core
|
#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_DEVICE * | prev |
| Previous entry in SPI table. | |
| SPI_DEVICE * | next |
| Next entry in SPI table. | |
| 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_DEVICE* prev |
Previous entry in SPI table.
| SPI_DEVICE* next |
Next entry in SPI table.