PHiLIP
spi_mode_t Struct Reference

SPI mode settings. More...

#include <PHiLIP_typedef.h>

Data Fields

uint8_t init: 1
 
uint8_t disable: 1
 
uint8_t cpha: 1
 
uint8_t cpol: 1
 
uint8_t if_type: 2
 
uint8_t reg_16_bit: 1
 
uint8_t reg_16_big_endian: 1
 

Detailed Description

SPI mode settings.

Field Documentation

uint8_t spi_mode_t::cpha

0:CK to 0 when idle - 1:CK to 1 when idle

uint8_t spi_mode_t::cpol

0:the first clock transition is the first data capture edge - 1:the second clock transition is the first data capture edge

uint8_t spi_mode_t::disable

0:periph is enabled - 1:periph is disabled

uint8_t spi_mode_t::if_type

Sets spi modes since slave cannot repsond immediately - 0:access registers with spi - 1:preloads reg address to 0 for high speed tests - 2:echos SPI bytes - 3:always output user reg 0 (use for timing)

uint8_t spi_mode_t::init

0:periph will initialize on execute - 1:periph initialized

uint8_t spi_mode_t::reg_16_big_endian

0:little endian for 16 bit mode - 1:big endian for 16 bit mode

uint8_t spi_mode_t::reg_16_bit

0:8 bit register access - 1:16 bit register access mode


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