API  2.3.0
TSmarT Software Library
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
tsmart_spi_config_t Struct Reference

Configuration for SPI. More...

#include <tsmart_spi.h>

Data Fields

uint8_t mode
 
uint8_t clk_mode
 

Detailed Description

Configuration for SPI.

Examples:
spi.c.

Field Documentation

uint8_t clk_mode

Specifies the SPI clock speed. This parameter can be one of the followings values:

  • TS_SPI_CLK_MODE_SLOW
  • TS_SPI_CLK_MODE_FAST
  • TS_SPI_CLK_MODE_ULTRA_FAST
Examples:
spi.c.
uint8_t mode

Specifies the SPI operating mode.This parameter can be one of the followings values:

  • TS_SPI_MODE_0 - This means:
    • Serial clock steady state Low
    • Clock active edge for the bit capture set 1 edge
  • TS_SPI_MODE_1 - This means:
    • Serial clock steady state Low
    • Clock active edge for the bit capture set 2 edge
  • TS_SPI_MODE_2 - This means:
    • Serial clock steady state High
    • Clock active edge for the bit capture set 1 edge
  • TS_SPI_MODE_3 - This means:
    • Serial clock steady state High
    • Clock active edge for the bit capture set 2 edge
Examples:
spi.c.