Provides APIs for SPI (Serial Peripheral Interface)
More...
Provides APIs for SPI (Serial Peripheral Interface)
Pointer definition to the internal struct _iotbus_spi_wrapper_s.
Definition at line 68 of file iotbus_spi.h.
Enumeration of SPI mode.
Enumeration Details:
IOTBUS_SPI_MODE0
IOTBUS_SPI_MODE1
IOTBUS_SPI_MODE2
IOTBUS_SPI_MODE3
Definition at line 46 of file iotbus_spi.h.
closes spi_context.
#include <iotbus/iotbus_spi.h>
- Parameters
-
[in] | hnd | handle of spi_context |
- Returns
- On success, 0 is returned. On failure, a negative value is returned.
- Since
- TizenRT v1.0
initializes spi_context.
#include <iotbus/iotbus_spi.h>
- Parameters
-
[in] | bus | spi bus number |
[in] | config | spi config
- config->bits_per_word : bits per word
- config->chip_select : chip select number
- config->frequency : frequency in Hz
- config->mode : spi mode
|
- Returns
- On success, handle of spi_context is returned. On failure, NULL is returned.
- Since
- TizenRT v1.0
reads data over spi bus.
#include <iotbus/iotbus_spi.h>
- Parameters
-
[in] | hnd | handle of spi_context |
[in] | rxbuf | the pointer of rx data buffer |
[in] | length | size to read |
- Returns
- On success, 0 is returned. On failure, a negative value is returned.
- Since
- TizenRT v1.0
writes data over spi bus.
#include <iotbus/iotbus_spi.h>
- Parameters
-
[in] | hnd | handle of spi_context |
[in] | txbuf | the pointer of tx data buffer |
[in] | length | size to write |
- Returns
- On success, 0 is returned. On failure, a negative value is returned.
- Since
- TizenRT v1.0