STM8S/A Standard Peripherals Drivers: SPI_Exported_Types

STM8S/A

STM8S/A Standard Peripherals Drivers

Enumerations

enum  SPI_BaudRatePrescaler_TypeDef {
  SPI_BAUDRATEPRESCALER_2 = (uint8_t)0x00, SPI_BAUDRATEPRESCALER_4 = (uint8_t)0x08, SPI_BAUDRATEPRESCALER_8 = (uint8_t)0x10, SPI_BAUDRATEPRESCALER_16 = (uint8_t)0x18,
  SPI_BAUDRATEPRESCALER_32 = (uint8_t)0x20, SPI_BAUDRATEPRESCALER_64 = (uint8_t)0x28, SPI_BAUDRATEPRESCALER_128 = (uint8_t)0x30, SPI_BAUDRATEPRESCALER_256 = (uint8_t)0x38
}
 SPI BaudRate Prescaler Warning: element values correspond to BR bits position. More...
enum  SPI_ClockPhase_TypeDef { SPI_CLOCKPHASE_1EDGE = (uint8_t)0x00, SPI_CLOCKPHASE_2EDGE = (uint8_t)0x01 }
 SPI Clock Phase Warning: element values correspond to CPHA bit position. More...
enum  SPI_ClockPolarity_TypeDef { SPI_CLOCKPOLARITY_LOW = (uint8_t)0x00, SPI_CLOCKPOLARITY_HIGH = (uint8_t)0x02 }
 SPI Clock Polarity Warning: element values correspond to CPOL bit position. More...
enum  SPI_CRC_TypeDef { SPI_CRC_RX = (uint8_t)0x00, SPI_CRC_TX = (uint8_t)0x01 }
 SPI CRC Transmit/Receive. More...
enum  SPI_DataDirection_TypeDef { SPI_DATADIRECTION_2LINES_FULLDUPLEX = (uint8_t)0x00, SPI_DATADIRECTION_2LINES_RXONLY = (uint8_t)0x04, SPI_DATADIRECTION_1LINE_RX = (uint8_t)0x80, SPI_DATADIRECTION_1LINE_TX = (uint8_t)0xC0 }
 SPI data direction mode Warning: element values correspond to BDM, BDOE, RXONLY bits position. More...
enum  SPI_Direction_TypeDef { SPI_DIRECTION_RX = (uint8_t)0x00, SPI_DIRECTION_TX = (uint8_t)0x01 }
 SPI direction transmit/receive. More...
enum  SPI_FirstBit_TypeDef { SPI_FIRSTBIT_MSB = (uint8_t)0x00, SPI_FIRSTBIT_LSB = (uint8_t)0x80 }
 SPI Frame Format: MSB or LSB transmitted first Warning: element values correspond to LSBFIRST bit position. More...
enum  SPI_Flag_TypeDef {
  SPI_FLAG_BSY = (uint8_t)0x80, SPI_FLAG_OVR = (uint8_t)0x40, SPI_FLAG_MODF = (uint8_t)0x20, SPI_FLAG_CRCERR = (uint8_t)0x10,
  SPI_FLAG_WKUP = (uint8_t)0x08, SPI_FLAG_TXE = (uint8_t)0x02, SPI_FLAG_RXNE = (uint8_t)0x01
}
 SPI flags definition - Warning : FLAG value = mapping position register. More...
enum  SPI_IT_TypeDef {
  SPI_IT_WKUP = (uint8_t)0x34, SPI_IT_OVR = (uint8_t)0x65, SPI_IT_MODF = (uint8_t)0x55, SPI_IT_CRCERR = (uint8_t)0x45,
  SPI_IT_TXE = (uint8_t)0x17, SPI_IT_RXNE = (uint8_t)0x06, SPI_IT_ERR = (uint8_t)0x05
}
 SPI_IT possible values Elements values convention: 0xYX X: Position of the corresponding Interrupt Y: ITPENDINGBIT position. More...
enum  SPI_Mode_TypeDef { SPI_MODE_MASTER = (uint8_t)0x04, SPI_MODE_SLAVE = (uint8_t)0x00 }
 SPI master/slave mode Warning: element values correspond to MSTR bit position. More...
enum  SPI_NSS_TypeDef { SPI_NSS_SOFT = (uint8_t)0x02, SPI_NSS_HARD = (uint8_t)0x00 }
 SPI Slave Select management Warning: element values correspond to LSBFIRST bit position. More...

Enumeration Type Documentation

SPI BaudRate Prescaler Warning: element values correspond to BR bits position.

Enumerator:
SPI_BAUDRATEPRESCALER_2 

SPI frequency = frequency(CPU)/2

SPI_BAUDRATEPRESCALER_4 

SPI frequency = frequency(CPU)/4

SPI_BAUDRATEPRESCALER_8 

SPI frequency = frequency(CPU)/8

SPI_BAUDRATEPRESCALER_16 

SPI frequency = frequency(CPU)/16

SPI_BAUDRATEPRESCALER_32 

SPI frequency = frequency(CPU)/32

SPI_BAUDRATEPRESCALER_64 

SPI frequency = frequency(CPU)/64

SPI_BAUDRATEPRESCALER_128 

SPI frequency = frequency(CPU)/128

SPI_BAUDRATEPRESCALER_256 

SPI frequency = frequency(CPU)/256

Definition at line 87 of file stm8s_spi.h.

SPI Clock Phase Warning: element values correspond to CPHA bit position.

Enumerator:
SPI_CLOCKPHASE_1EDGE 

The first clock transition is the first data capture edge

SPI_CLOCKPHASE_2EDGE 

The second clock transition is the first data capture edge

Definition at line 111 of file stm8s_spi.h.

SPI Clock Polarity Warning: element values correspond to CPOL bit position.

Enumerator:
SPI_CLOCKPOLARITY_LOW 

Clock to 0 when idle

SPI_CLOCKPOLARITY_HIGH 

Clock to 1 when idle

Definition at line 102 of file stm8s_spi.h.

SPI CRC Transmit/Receive.

Enumerator:
SPI_CRC_RX 

Select Tx CRC register

SPI_CRC_TX 

Select Rx CRC register

Definition at line 128 of file stm8s_spi.h.

SPI data direction mode Warning: element values correspond to BDM, BDOE, RXONLY bits position.

Enumerator:
SPI_DATADIRECTION_2LINES_FULLDUPLEX 

2-line uni-directional data mode enable

SPI_DATADIRECTION_2LINES_RXONLY 

Receiver only in 2 line uni-directional data mode

SPI_DATADIRECTION_1LINE_RX 

Receiver only in 1 line bi-directional data mode

SPI_DATADIRECTION_1LINE_TX 

Transmit only in 1 line bi-directional data mode

Definition at line 47 of file stm8s_spi.h.

SPI direction transmit/receive.

Enumerator:
SPI_DIRECTION_RX 

Selects Rx receive direction in bi-directional mode

SPI_DIRECTION_TX 

Selects Tx transmission direction in bi-directional mode

Definition at line 69 of file stm8s_spi.h.

SPI Frame Format: MSB or LSB transmitted first Warning: element values correspond to LSBFIRST bit position.

Enumerator:
SPI_FIRSTBIT_MSB 

MSB bit will be transmitted first

SPI_FIRSTBIT_LSB 

LSB bit will be transmitted first

Definition at line 120 of file stm8s_spi.h.

SPI flags definition - Warning : FLAG value = mapping position register.

Enumerator:
SPI_FLAG_BSY 

Busy flag

SPI_FLAG_OVR 

Overrun flag

SPI_FLAG_MODF 

Mode fault

SPI_FLAG_CRCERR 

CRC error flag

SPI_FLAG_WKUP 

Wake-up flag

SPI_FLAG_TXE 

Transmit buffer empty

SPI_FLAG_RXNE 

Receive buffer empty

Definition at line 136 of file stm8s_spi.h.

SPI_IT possible values Elements values convention: 0xYX X: Position of the corresponding Interrupt Y: ITPENDINGBIT position.

Enumerator:
SPI_IT_WKUP 

Wake-up interrupt

SPI_IT_OVR 

Overrun interrupt

SPI_IT_MODF 

Mode fault interrupt

SPI_IT_CRCERR 

CRC error interrupt

SPI_IT_TXE 

Transmit buffer empty interrupt

SPI_IT_RXNE 

Receive buffer not empty interrupt

SPI_IT_ERR 

Error interrupt

Definition at line 152 of file stm8s_spi.h.

SPI master/slave mode Warning: element values correspond to MSTR bit position.

Enumerator:
SPI_MODE_MASTER 

SPI Master configuration

SPI_MODE_SLAVE 

SPI Slave configuration

Definition at line 78 of file stm8s_spi.h.

SPI Slave Select management Warning: element values correspond to LSBFIRST bit position.

Enumerator:
SPI_NSS_SOFT 

Software slave management disabled

SPI_NSS_HARD 

Software slave management enabled

Definition at line 58 of file stm8s_spi.h.

STM8 Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM8 8-bit Microcontrollers platform visit www.st.com