Go to the source code of this file.
|
enum | vsf_spi_mode_t {
SPI_EN = 0x0040
,
SPI_NSS_SET = 0x0100
,
SPI_MODE_SLAVE = 0x0000
,
SPI_MODE_MASTER = 0x0004
,
SPI_DIRECTION_2LINES = 0x0000
,
SPI_DIRECTION_2LINES_RXONLY = 0x0400
,
SPI_DIRECTION_1LINE = 0x8000
,
SPI_POLARITY_LOW = 0x0000
,
SPI_POLARITY_HIGH = 0x0002
,
SPI_PHASE_1EDGE = 0x0000
,
SPI_PHASE_2EDGE = 0x0001
,
SPI_NSS_SOFT = 0x0200
,
SPI_NSS_HARD_INPUT = 0x0000
,
SPI_NSS_HARD_OUTPUT = 0x0004
,
SPI_FIRSTBIT_MSB = 0x0000
,
SPI_FIRSTBIT_LSB = 0x0008
,
SPI_CRCCALCULATION_DISABLE = 0x0000
,
SPI_CRCCALCULATION_ENABLE = 0x2000
} |
|
enum | em_spi_data_size_t {
VSF_SPI_DATASIZE_8BIT = 0x0000
,
VSF_SPI_DATASIZE_16BIT = 0x0800
} |
|
enum | em_spi_clock_div_t {
SPI_BAUDRATEPRESCALER_2 = 0x0000
,
SPI_BAUDRATEPRESCALER_4 = 0x0008
,
SPI_BAUDRATEPRESCALER_8 = 0x0010
,
SPI_BAUDRATEPRESCALER_16 = 0x0018
,
SPI_BAUDRATEPRESCALER_32 = 0x0020
,
SPI_BAUDRATEPRESCALER_64 = 0x0028
,
SPI_BAUDRATEPRESCALER_128 = 0x0030
,
SPI_BAUDRATEPRESCALER_256 = 0x0038
} |
|
enum | em_spi_it_t {
SPI_IT_TXE = 0x0080
,
SPI_IT_RXNE = 0x0040
,
SPI_IT_ERR = 0x0020
} |
|
enum | em_spi_sr_t {
SPI_SR_TXE_IS_TRUE = 0x0002
,
SPI_SR_RXNE_IS_TRUE = 0x0001
} |
|
enum | en_spi_clk_gpio_t {
SPI1_CLK_EN = 0x1000
,
SPI1_GPIO_CLK_EN = 0x0004
,
SPI2_CLK_EN = 0x4000
,
SPI2_GPIO_CLK_EN = 0x0008
,
SPI1_GPIO_CLEAR = 0x000FFFFFU
,
SPI1_GPIO_MODE = 0xB4B00000U
,
SPI2_GPIO_CLEAR = 0x000FFFFFU
,
SPI2_GPIO_MODE = 0x4B400000U
} |
|
◆ vsf_spi_mode_t
Enumerator |
---|
SPI_EN | |
SPI_NSS_SET | |
SPI_MODE_SLAVE | |
SPI_MODE_MASTER | |
SPI_DIRECTION_2LINES | |
SPI_DIRECTION_2LINES_RXONLY | |
SPI_DIRECTION_1LINE | |
SPI_POLARITY_LOW | |
SPI_POLARITY_HIGH | |
SPI_PHASE_1EDGE | |
SPI_PHASE_2EDGE | |
SPI_NSS_SOFT | |
SPI_NSS_HARD_INPUT | |
SPI_NSS_HARD_OUTPUT | |
SPI_FIRSTBIT_MSB | |
SPI_FIRSTBIT_LSB | |
SPI_CRCCALCULATION_DISABLE | |
SPI_CRCCALCULATION_ENABLE | |
◆ em_spi_data_size_t
Enumerator |
---|
VSF_SPI_DATASIZE_8BIT | |
VSF_SPI_DATASIZE_16BIT | |
◆ em_spi_clock_div_t
Enumerator |
---|
SPI_BAUDRATEPRESCALER_2 | |
SPI_BAUDRATEPRESCALER_4 | |
SPI_BAUDRATEPRESCALER_8 | |
SPI_BAUDRATEPRESCALER_16 | |
SPI_BAUDRATEPRESCALER_32 | |
SPI_BAUDRATEPRESCALER_64 | |
SPI_BAUDRATEPRESCALER_128 | |
SPI_BAUDRATEPRESCALER_256 | |
◆ em_spi_it_t
Enumerator |
---|
SPI_IT_TXE | |
SPI_IT_RXNE | |
SPI_IT_ERR | |
◆ em_spi_sr_t
Enumerator |
---|
SPI_SR_TXE_IS_TRUE | |
SPI_SR_RXNE_IS_TRUE | |
◆ en_spi_clk_gpio_t
Enumerator |
---|
SPI1_CLK_EN | |
SPI1_GPIO_CLK_EN | |
SPI2_CLK_EN | |
SPI2_GPIO_CLK_EN | |
SPI1_GPIO_CLEAR | |
SPI1_GPIO_MODE | |
SPI2_GPIO_CLEAR | |
SPI2_GPIO_MODE | |
◆ vsf_spi_get_status()
◆ vsf_spi_get_capability()
◆ vsf_spi_init()
initialize a spi instance.
- Parameters
-
- Returns
- vsf_err_t: VSF_ERR_NONE if spi was initialized, or a negative error code
◆ vsf_spi_polarity_set()
◆ vsf_spi_polarity_get()
◆ vsf_spi_exchange()
◆ vsf_spi_request_exchange()
◆ vsf_spi