18#ifndef __ST_HAL_SPI_H__
19#define __ST_HAL_SPI_H__
31#define HAL_SPI_ERROR_NONE (0x00000000U)
32#define HAL_SPI_ERROR_MODF (0x00000001U)
33#define HAL_SPI_ERROR_CRC (0x00000002U)
34#define HAL_SPI_ERROR_OVR (0x00000004U)
35#define HAL_SPI_ERROR_FRE (0x00000008U)
36#define HAL_SPI_ERROR_DMA (0x00000010U)
37#define HAL_SPI_ERROR_FLAG (0x00000020U)
38#define HAL_SPI_ERROR_ABORT (0x00000040U)
39#if (USE_HAL_SPI_REGISTER_CALLBACKS == 1U)
40# define HAL_SPI_ERROR_INVALID_CALLBACK (0x00000080U)
89#if (USE_HAL_SPI_REGISTER_CALLBACKS == 1U)
104#if (USE_HAL_SPI_REGISTER_CALLBACKS == 1U)
107 HAL_SPI_TX_COMPLETE_CB_ID = 0x00U,
108 HAL_SPI_RX_COMPLETE_CB_ID = 0x01U,
109 HAL_SPI_TX_RX_COMPLETE_CB_ID = 0x02U,
110 HAL_SPI_TX_HALF_COMPLETE_CB_ID = 0x03U,
111 HAL_SPI_RX_HALF_COMPLETE_CB_ID = 0x04U,
112 HAL_SPI_TX_RX_HALF_COMPLETE_CB_ID = 0x05U,
113 HAL_SPI_ERROR_CB_ID = 0x06U,
114 HAL_SPI_ABORT_CB_ID = 0x07U,
115 HAL_SPI_MSPINIT_CB_ID = 0x08U,
116 HAL_SPI_MSPDEINIT_CB_ID = 0x09U
118} HAL_SPI_CallbackIDTypeDef;
132#if (USE_HAL_SPI_REGISTER_CALLBACKS == 1U)
134 HAL_SPI_CallbackIDTypeDef CallbackID,
135 pSPI_CallbackTypeDef pCallback);
unsigned short uint16_t
Definition lvgl.h:41
unsigned int uint32_t
Definition lvgl.h:43
unsigned char uint8_t
Definition lvgl.h:40
HAL_StatusTypeDef
Definition sthal_def.h:65
HAL_LockTypeDef
Definition sthal_def.h:72
HAL_StatusTypeDef HAL_SPI_Transmit(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout)
Definition sthal_spi.c:228
void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:325
void HAL_SPI_TxCpltCallback(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:313
HAL_StatusTypeDef HAL_SPI_Abort(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:285
void HAL_SPI_MspInit(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:79
HAL_StatusTypeDef HAL_SPI_TransmitReceive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size)
Definition sthal_spi.c:278
void HAL_SPI_ErrorCallback(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:349
void HAL_SPI_RxCpltCallback(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:319
void HAL_SPI_AbortCpltCallback(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:355
HAL_SPI_StateTypeDef HAL_SPI_GetState(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:360
HAL_StatusTypeDef HAL_SPI_TransmitReceive_IT(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size)
Definition sthal_spi.c:259
HAL_StatusTypeDef HAL_SPI_DMAPause(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:295
HAL_StatusTypeDef HAL_SPI_Receive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size)
Definition sthal_spi.c:272
HAL_StatusTypeDef HAL_SPI_Transmit_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size)
Definition sthal_spi.c:266
HAL_StatusTypeDef HAL_SPI_Abort_IT(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:290
HAL_StatusTypeDef HAL_SPI_TransmitReceive(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size, uint32_t Timeout)
Definition sthal_spi.c:240
HAL_StatusTypeDef HAL_SPI_DMAStop(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:305
uint32_t HAL_SPI_GetError(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:365
HAL_StatusTypeDef HAL_SPI_DMAResume(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:300
HAL_SPI_StateTypeDef
Definition sthal_spi.h:62
@ HAL_SPI_STATE_BUSY
Definition sthal_spi.h:65
@ HAL_SPI_STATE_ABORT
Definition sthal_spi.h:70
@ HAL_SPI_STATE_ERROR
Definition sthal_spi.h:69
@ HAL_SPI_STATE_BUSY_TX
Definition sthal_spi.h:66
@ HAL_SPI_STATE_BUSY_TX_RX
Definition sthal_spi.h:68
@ HAL_SPI_STATE_READY
Definition sthal_spi.h:64
@ HAL_SPI_STATE_RESET
Definition sthal_spi.h:63
@ HAL_SPI_STATE_BUSY_RX
Definition sthal_spi.h:67
void HAL_SPI_TxHalfCpltCallback(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:331
HAL_StatusTypeDef HAL_SPI_Receive_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size)
Definition sthal_spi.c:253
HAL_StatusTypeDef HAL_SPI_Init(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:34
vsf_spi_t SPI_TypeDef
Definition sthal_spi.h:46
void HAL_SPI_TxRxHalfCpltCallback(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:343
struct __SPI_HandleTypeDef SPI_HandleTypeDef
void HAL_SPI_MspDeInit(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:85
HAL_StatusTypeDef HAL_SPI_DeInit(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:65
void HAL_SPI_RxHalfCpltCallback(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:337
void HAL_SPI_IRQHandler(SPI_HandleTypeDef *hspi)
Definition sthal_spi.c:310
HAL_StatusTypeDef HAL_SPI_Transmit_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size)
Definition sthal_spi.c:247
HAL_StatusTypeDef HAL_SPI_Receive(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout)
Definition sthal_spi.c:234
Definition sthal_dma.h:103
Definition sthal_spi.h:73
DMA_HandleTypeDef * hdmarx
Definition sthal_spi.h:85
volatile HAL_SPI_StateTypeDef State
Definition sthal_spi.h:87
volatile uint32_t ErrorCode
Definition sthal_spi.h:88
void(* TxISR)(struct __SPI_HandleTypeDef *hspi)
Definition sthal_spi.h:83
SPI_InitTypeDef Init
Definition sthal_spi.h:75
volatile uint16_t TxXferCount
Definition sthal_spi.h:78
uint16_t TxXferSize
Definition sthal_spi.h:77
void(* RxISR)(struct __SPI_HandleTypeDef *hspi)
Definition sthal_spi.h:82
volatile uint16_t RxXferCount
Definition sthal_spi.h:81
SPI_TypeDef * Instance
Definition sthal_spi.h:74
HAL_LockTypeDef Lock
Definition sthal_spi.h:86
DMA_HandleTypeDef * hdmatx
Definition sthal_spi.h:84
uint8_t * pRxBuffPtr
Definition sthal_spi.h:79
uint16_t RxXferSize
Definition sthal_spi.h:80
uint8_t * pTxBuffPtr
Definition sthal_spi.h:76
Definition sthal_spi.h:48
uint32_t BaudRatePrescaler
Definition sthal_spi.h:55
uint32_t DataSize
Definition sthal_spi.h:51
uint32_t CRCCalculation
Definition sthal_spi.h:58
uint32_t Mode
Definition sthal_spi.h:49
uint32_t TIMode
Definition sthal_spi.h:57
uint32_t FirstBit
Definition sthal_spi.h:56
uint32_t CLKPolarity
Definition sthal_spi.h:52
uint32_t CLKPhase
Definition sthal_spi.h:53
uint32_t CRCPolynomial
Definition sthal_spi.h:59
uint32_t Direction
Definition sthal_spi.h:50
uint32_t NSS
Definition sthal_spi.h:54
Definition vsf_template_spi.h:541