# include/mios32/mios32_spi.h File Reference

## Enumerations
enum | mios32_spi_pin_driver_t { MIOS32_SPI_PIN_DRIVER_STRONG = 0, MIOS32_SPI_PIN_DRIVER_STRONG_OD = 1, MIOS32_SPI_PIN_DRIVER_WEAK = 2, MIOS32_SPI_PIN_DRIVER_WEAK_OD = 3, MIOS32_SPI_PIN_SLAVE_DRIVER_STRONG = 4, MIOS32_SPI_PIN_SLAVE_DRIVER_STRONG_OD = 5, MIOS32_SPI_PIN_SLAVE_DRIVER_WEAK = 6, MIOS32_SPI_PIN_SLAVE_DRIVER_WEAK_OD = 7 }
enum | mios32_spi_mode_t { MIOS32_SPI_MODE_CLK0_PHASE0 = 0, MIOS32_SPI_MODE_CLK0_PHASE1 = 1, MIOS32_SPI_MODE_CLK1_PHASE0 = 2, MIOS32_SPI_MODE_CLK1_PHASE1 = 3, MIOS32_SPI_MODE_SLAVE_CLK0_PHASE0 = 4, MIOS32_SPI_MODE_SLAVE_CLK0_PHASE1 = 5, MIOS32_SPI_MODE_SLAVE_CLK1_PHASE0 = 6, MIOS32_SPI_MODE_SLAVE_CLK1_PHASE1 = 7 }
enum | mios32_spi_prescaler_t { MIOS32_SPI_PRESCALER_2 = 0, MIOS32_SPI_PRESCALER_4 = 1, MIOS32_SPI_PRESCALER_8 = 2, MIOS32_SPI_PRESCALER_16 = 3, MIOS32_SPI_PRESCALER_32 = 4, MIOS32_SPI_PRESCALER_64 = 5, MIOS32_SPI_PRESCALER_128 = 6, MIOS32_SPI_PRESCALER_256 = 7 }
## Functions
s32 | MIOS32_SPI_Init (u32 mode)
s32 | MIOS32_SPI_IO_Init (u8 spi, mios32_spi_pin_driver_t spi_pin_driver)
s32 | MIOS32_SPI_TransferModeInit (u8 spi, mios32_spi_mode_t spi_mode, mios32_spi_prescaler_t spi_prescaler)
s32 | MIOS32_SPI_RC_PinSet (u8 spi, u8 rc_pin, u8 pin_value)
s32 | MIOS32_SPI_TransferByte (u8 spi, u8 b)
s32 | MIOS32_SPI_TransferBlock (u8 spi, u8 *send_buffer, u8 *receive_buffer, u16 len, void *callback)

## Enumeration Type Documentation

enum mios32_spi_mode_t

Enumerator:

  MIOS32_SPI_MODE_CLK0_PHASE0 |
  MIOS32_SPI_MODE_CLK0_PHASE1 |
  MIOS32_SPI_MODE_CLK1_PHASE0 |
  MIOS32_SPI_MODE_CLK1_PHASE1 |
  MIOS32_SPI_MODE_SLAVE_CLK0_PHASE0 |
  MIOS32_SPI_MODE_SLAVE_CLK0_PHASE1 |
  MIOS32_SPI_MODE_SLAVE_CLK1_PHASE0 |
  MIOS32_SPI_MODE_SLAVE_CLK1_PHASE1 |

enum mios32_spi_pin_driver_t

Enumerator:

  MIOS32_SPI_PIN_DRIVER_STRONG |
  MIOS32_SPI_PIN_DRIVER_STRONG_OD |
  MIOS32_SPI_PIN_DRIVER_WEAK |
  MIOS32_SPI_PIN_DRIVER_WEAK_OD |
  MIOS32_SPI_PIN_SLAVE_DRIVER_STRONG |
  MIOS32_SPI_PIN_SLAVE_DRIVER_STRONG_OD |
  MIOS32_SPI_PIN_SLAVE_DRIVER_WEAK |
  MIOS32_SPI_PIN_SLAVE_DRIVER_WEAK_OD |

enum mios32_spi_prescaler_t

Enumerator:

  MIOS32_SPI_PRESCALER_2 |
  MIOS32_SPI_PRESCALER_4 |
  MIOS32_SPI_PRESCALER_8 |
  MIOS32_SPI_PRESCALER_16 |
  MIOS32_SPI_PRESCALER_32 |
  MIOS32_SPI_PRESCALER_64 |
  MIOS32_SPI_PRESCALER_128 |
  MIOS32_SPI_PRESCALER_256 |