Functions
Data_Management
Peripheral Driver » LL Driver » SPI » Functions

## Functions
__STATIC_INLINE void | ll_spi_transmit_data8 (ssi_regs_t *SPIx, uint8_t tx_data)
| Write 8-Bits in the data register. More...
__STATIC_INLINE void | ll_spi_transmit_data16 (ssi_regs_t *SPIx, uint16_t tx_data)
| Write 16-Bits in the data register. More...
__STATIC_INLINE void | ll_spi_transmit_data32 (ssi_regs_t *SPIx, uint32_t tx_data)
| Write 32-Bits in the data register. More...
__STATIC_INLINE uint8_t | ll_spi_receive_data8 (ssi_regs_t *SPIx)
| Read 8-Bits in the data register. More...
__STATIC_INLINE uint16_t | ll_spi_receive_data16 (ssi_regs_t *SPIx)
| Read 16-Bits in the data register. More...
__STATIC_INLINE uint32_t | ll_spi_receive_data32 (ssi_regs_t *SPIx)
| Read 32-Bits in the data register. More...
__STATIC_INLINE void | ll_spi_set_rx_sample_delay (ssi_regs_t *SPIx, uint32_t delay)
| Set Rx sample delay. More...
__STATIC_INLINE uint32_t | ll_spi_get_rx_sample_delay (ssi_regs_t *SPIx)
| Get Rx sample delay. More...
__STATIC_INLINE void | ll_spi_set_wait_cycles (ssi_regs_t *SPIx, uint32_t wait_cycles)
| Set number of wait cycles in Dual/Quad SPI mode. More...
__STATIC_INLINE uint32_t | ll_spi_get_wait_cycles (ssi_regs_t *SPIx)
| Get number of wait cycles in Dual/Quad SPI mode. More...
__STATIC_INLINE void | ll_spi_set_instruction_size (ssi_regs_t *SPIx, uint32_t size)
| Set Dual/Quad SPI mode instruction length in bits. More...
__STATIC_INLINE uint32_t | ll_spi_get_instruction_size (ssi_regs_t *SPIx)
| Get Dual/Quad SPI mode instruction length in bits. More...
__STATIC_INLINE void | ll_spi_set_address_size (ssi_regs_t *SPIx, uint32_t size)
| Set Dual/Quad SPI mode address length in bits. More...
__STATIC_INLINE uint32_t | ll_spi_get_address_size (ssi_regs_t *SPIx)
| Get Dual/Quad SPI mode address length in bits. More...
__STATIC_INLINE void | ll_spi_set_add_inst_transfer_format (ssi_regs_t *SPIx, uint32_t format)
| Set Dual/Quad SPI mode address and instruction transfer format. More...
__STATIC_INLINE uint32_t | ll_spi_get_addr_inst_transfer_format (ssi_regs_t *SPIx)
| Get Dual/Quad SPI mode address and instruction transfer format. More...

## Detailed Description

## Function Documentation

## ◆ ll_spi_get_addr_inst_transfer_format()

__STATIC_INLINE uint32_t ll_spi_get_addr_inst_transfer_format | ( | ssi_regs_t * | SPIx | ) |

Get Dual/Quad SPI mode address and instruction transfer format.

Note
  This bit should not be changed when communication is ongoing.

Register | BitsName
--- | ---
SCTRL0 | TRANSTYPE

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: LL_SSI_INST_ADDR_ALL_IN_SPI LL_SSI_INST_IN_SPI_ADDR_IN_SPIFRF LL_SSI_INST_ADDR_ALL_IN_SPIFRF

## ◆ ll_spi_get_address_size()

__STATIC_INLINE uint32_t ll_spi_get_address_size | ( | ssi_regs_t * | SPIx | ) |

Get Dual/Quad SPI mode address length in bits.

Note
  This bit should not be changed when communication is ongoing.

Register | BitsName
--- | ---
SCTRL0 | ADDRL

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: LL_SSI_ADDRSIZE_0BIT LL_SSI_ADDRSIZE_4BIT LL_SSI_ADDRSIZE_8BIT LL_SSI_ADDRSIZE_12BIT LL_SSI_ADDRSIZE_16BIT LL_SSI_ADDRSIZE_20BIT LL_SSI_ADDRSIZE_24BIT LL_SSI_ADDRSIZE_28BIT LL_SSI_ADDRSIZE_32BIT LL_SSI_ADDRSIZE_36BIT LL_SSI_ADDRSIZE_40BIT LL_SSI_ADDRSIZE_44BIT LL_SSI_ADDRSIZE_48BIT LL_SSI_ADDRSIZE_52BIT LL_SSI_ADDRSIZE_56BIT LL_SSI_ADDRSIZE_60BIT

## ◆ ll_spi_get_instruction_size()

__STATIC_INLINE uint32_t ll_spi_get_instruction_size | ( | ssi_regs_t * | SPIx | ) |

Get Dual/Quad SPI mode instruction length in bits.

Note
  This bit should not be changed when communication is ongoing.

Register | BitsName
--- | ---
SCTRL0 | INSTL

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: LL_SSI_INSTSIZE_0BIT LL_SSI_INSTSIZE_4BIT LL_SSI_INSTSIZE_8BIT LL_SSI_INSTSIZE_16BIT

## ◆ ll_spi_get_rx_sample_delay()

__STATIC_INLINE uint32_t ll_spi_get_rx_sample_delay | ( | ssi_regs_t * | SPIx | ) |

Get Rx sample delay.

Note
  This bit should not be changed when communication is ongoing.

Register | BitsName
--- | ---
RX_SAMPLEDLY | RX_SAMPLEDLY

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: 0 ~ 256

## ◆ ll_spi_get_wait_cycles()

__STATIC_INLINE uint32_t ll_spi_get_wait_cycles | ( | ssi_regs_t * | SPIx | ) |

Get number of wait cycles in Dual/Quad SPI mode.

Note
  This bit should not be changed when communication is ongoing.

Register | BitsName
--- | ---
SCTRL0 | WAITCYCLES

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: 0 ~ 31

## ◆ ll_spi_receive_data16()

__STATIC_INLINE uint16_t ll_spi_receive_data16 | ( | ssi_regs_t * | SPIx | ) |

Read 16-Bits in the data register.

Register | BitsName
--- | ---
DATA | DATA

Parameters

  SPIx | SPI instance

Return values

  Returned | Value between Min_Data=0x0000 and Max_Data=0xFFFF

## ◆ ll_spi_receive_data32()

__STATIC_INLINE uint32_t ll_spi_receive_data32 | ( | ssi_regs_t * | SPIx | ) |

Read 32-Bits in the data register.

Register | BitsName
--- | ---
DATA | DATA

Parameters

  SPIx | SPI instance

Return values

  Returned | Value between Min_Data=0x00000000 and Max_Data=0xFFFFFFFF

## ◆ ll_spi_receive_data8()

__STATIC_INLINE uint8_t ll_spi_receive_data8 | ( | ssi_regs_t * | SPIx | ) |

Read 8-Bits in the data register.

Register | BitsName
--- | ---
DATA | DATA

Parameters

  SPIx | SPI instance

Return values

  Rerturned | Value between Min_Data=0x00 and Max_Data=0xFF

## ◆ ll_spi_set_add_inst_transfer_format()

__STATIC_INLINE void ll_spi_set_add_inst_transfer_format | ( | ssi_regs_t * | SPIx,
|  | uint32_t | format
| ) |  |

Set Dual/Quad SPI mode address and instruction transfer format.

Note
  This bit should not be changed when communication is ongoing.

Register | BitsName
--- | ---
SCTRL0 | TRANSTYPE

Parameters

  SPIx | SPI instance
  format | This parameter can be one of the following values: LL_SSI_INST_ADDR_ALL_IN_SPI LL_SSI_INST_IN_SPI_ADDR_IN_SPIFRF LL_SSI_INST_ADDR_ALL_IN_SPIFRF

Return values

  None |

## ◆ ll_spi_set_address_size()

__STATIC_INLINE void ll_spi_set_address_size | ( | ssi_regs_t * | SPIx,
|  | uint32_t | size
| ) |  |

Set Dual/Quad SPI mode address length in bits.

Note
  This bit should not be changed when communication is ongoing.

Register | BitsName
--- | ---
SCTRL0 | ADDRL

Parameters

  SPIx | SPI instance
  size | This parameter can be one of the following values: LL_SSI_ADDRSIZE_0BIT LL_SSI_ADDRSIZE_4BIT LL_SSI_ADDRSIZE_8BIT LL_SSI_ADDRSIZE_12BIT LL_SSI_ADDRSIZE_16BIT LL_SSI_ADDRSIZE_20BIT LL_SSI_ADDRSIZE_24BIT LL_SSI_ADDRSIZE_28BIT LL_SSI_ADDRSIZE_32BIT LL_SSI_ADDRSIZE_36BIT LL_SSI_ADDRSIZE_40BIT LL_SSI_ADDRSIZE_44BIT LL_SSI_ADDRSIZE_48BIT LL_SSI_ADDRSIZE_52BIT LL_SSI_ADDRSIZE_56BIT LL_SSI_ADDRSIZE_60BIT

Return values

  None |

## ◆ ll_spi_set_instruction_size()

__STATIC_INLINE void ll_spi_set_instruction_size | ( | ssi_regs_t * | SPIx,
|  | uint32_t | size
| ) |  |

Set Dual/Quad SPI mode instruction length in bits.

Note
  This bit should not be changed when communication is ongoing.

Register | BitsName
--- | ---
SCTRL0 | INSTL

Parameters

  SPIx | SPI instance
  size | This parameter can be one of the following values: LL_SSI_INSTSIZE_0BIT LL_SSI_INSTSIZE_4BIT LL_SSI_INSTSIZE_8BIT LL_SSI_INSTSIZE_16BIT

Return values

  None |

## ◆ ll_spi_set_rx_sample_delay()

__STATIC_INLINE void ll_spi_set_rx_sample_delay | ( | ssi_regs_t * | SPIx,
|  | uint32_t | delay
| ) |  |

Set Rx sample delay.

Note
  This bit should not be changed when communication is ongoing.

Register | BitsName
--- | ---
RX_SAMPLEDLY | RX_SAMPLEDLY

Parameters

  SPIx | SPI instance
  delay | This parameter can be one of the following values: 0 ~ 256

Return values

  None |

## ◆ ll_spi_set_wait_cycles()

__STATIC_INLINE void ll_spi_set_wait_cycles | ( | ssi_regs_t * | SPIx,
|  | uint32_t | wait_cycles
| ) |  |

Set number of wait cycles in Dual/Quad SPI mode.

Note
  This bit should not be changed when communication is ongoing.

Register | BitsName
--- | ---
SCTRL0 | WAITCYCLES

Parameters

  SPIx | SPI instance
  wait_cycles | This parameter can be one of the following values: 0 ~ 31

Return values

  None |

## ◆ ll_spi_transmit_data16()

__STATIC_INLINE void ll_spi_transmit_data16 | ( | ssi_regs_t * | SPIx,
|  | uint16_t | tx_data
| ) |  |

Write 16-Bits in the data register.

Register | BitsName
--- | ---
DATA | DATA

Parameters

  SPIx | SPI instance
  tx_data | Value between Min_Data=0x0000 and Max_Data=0xFFFF

Return values

  None |

## ◆ ll_spi_transmit_data32()

__STATIC_INLINE void ll_spi_transmit_data32 | ( | ssi_regs_t * | SPIx,
|  | uint32_t | tx_data
| ) |  |

Write 32-Bits in the data register.

Register | BitsName
--- | ---
DATA | DATA

Parameters

  SPIx | SPI instance
  tx_data | Value between Min_Data=0x00000000 and Max_Data=0xFFFFFFFF

Return values

  None |

## ◆ ll_spi_transmit_data8()

__STATIC_INLINE void ll_spi_transmit_data8 | ( | ssi_regs_t * | SPIx,
|  | uint8_t | tx_data
| ) |  |

Write 8-Bits in the data register.

Register | BitsName
--- | ---
DATA | DATA

Parameters

  SPIx | SPI instance
  tx_data | Value between Min_Data=0x00 and Max_Data=0xFF

Return values

  None |