stm32f7xx_hal_spi.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32F7xx_HAL_SPI_H
22 #define STM32F7xx_HAL_SPI_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32f7xx_hal_def.h"
30 
39 /* Exported types ------------------------------------------------------------*/
47 typedef struct
48 {
49  uint32_t Mode;
52  uint32_t Direction;
55  uint32_t DataSize;
58  uint32_t CLKPolarity;
61  uint32_t CLKPhase;
64  uint32_t NSS;
68  uint32_t BaudRatePrescaler;
74  uint32_t FirstBit;
77  uint32_t TIMode;
80  uint32_t CRCCalculation;
83  uint32_t CRCPolynomial;
86  uint32_t CRCLength;
90  uint32_t NSSPMode;
97 
101 typedef enum
102 {
112 
116 typedef struct __SPI_HandleTypeDef
117 {
122  uint8_t *pTxBuffPtr;
124  uint16_t TxXferSize;
126  __IO uint16_t TxXferCount;
128  uint8_t *pRxBuffPtr;
130  uint16_t RxXferSize;
132  __IO uint16_t RxXferCount;
134  uint32_t CRCSize;
136  void (*RxISR)(struct __SPI_HandleTypeDef *hspi);
138  void (*TxISR)(struct __SPI_HandleTypeDef *hspi);
148  __IO uint32_t ErrorCode;
150 #if (USE_HAL_SPI_REGISTER_CALLBACKS == 1U)
151  void (* TxCpltCallback)(struct __SPI_HandleTypeDef *hspi);
152  void (* RxCpltCallback)(struct __SPI_HandleTypeDef *hspi);
153  void (* TxRxCpltCallback)(struct __SPI_HandleTypeDef *hspi);
154  void (* TxHalfCpltCallback)(struct __SPI_HandleTypeDef *hspi);
155  void (* RxHalfCpltCallback)(struct __SPI_HandleTypeDef *hspi);
156  void (* TxRxHalfCpltCallback)(struct __SPI_HandleTypeDef *hspi);
157  void (* ErrorCallback)(struct __SPI_HandleTypeDef *hspi);
158  void (* AbortCpltCallback)(struct __SPI_HandleTypeDef *hspi);
159  void (* MspInitCallback)(struct __SPI_HandleTypeDef *hspi);
160  void (* MspDeInitCallback)(struct __SPI_HandleTypeDef *hspi);
162 #endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
164 
165 #if (USE_HAL_SPI_REGISTER_CALLBACKS == 1U)
166 
169 typedef enum
170 {
171  HAL_SPI_TX_COMPLETE_CB_ID = 0x00U,
172  HAL_SPI_RX_COMPLETE_CB_ID = 0x01U,
173  HAL_SPI_TX_RX_COMPLETE_CB_ID = 0x02U,
174  HAL_SPI_TX_HALF_COMPLETE_CB_ID = 0x03U,
175  HAL_SPI_RX_HALF_COMPLETE_CB_ID = 0x04U,
176  HAL_SPI_TX_RX_HALF_COMPLETE_CB_ID = 0x05U,
177  HAL_SPI_ERROR_CB_ID = 0x06U,
178  HAL_SPI_ABORT_CB_ID = 0x07U,
179  HAL_SPI_MSPINIT_CB_ID = 0x08U,
180  HAL_SPI_MSPDEINIT_CB_ID = 0x09U
182 } HAL_SPI_CallbackIDTypeDef;
183 
187 typedef void (*pSPI_CallbackTypeDef)(SPI_HandleTypeDef *hspi);
189 #endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
190 
194 /* Exported constants --------------------------------------------------------*/
202 #define HAL_SPI_ERROR_NONE (0x00000000U)
203 #define HAL_SPI_ERROR_MODF (0x00000001U)
204 #define HAL_SPI_ERROR_CRC (0x00000002U)
205 #define HAL_SPI_ERROR_OVR (0x00000004U)
206 #define HAL_SPI_ERROR_FRE (0x00000008U)
207 #define HAL_SPI_ERROR_DMA (0x00000010U)
208 #define HAL_SPI_ERROR_FLAG (0x00000020U)
209 #define HAL_SPI_ERROR_ABORT (0x00000040U)
210 #if (USE_HAL_SPI_REGISTER_CALLBACKS == 1U)
211 #define HAL_SPI_ERROR_INVALID_CALLBACK (0x00000080U)
212 #endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
213 
220 #define SPI_MODE_SLAVE (0x00000000U)
221 #define SPI_MODE_MASTER (SPI_CR1_MSTR | SPI_CR1_SSI)
222 
229 #define SPI_DIRECTION_2LINES (0x00000000U)
230 #define SPI_DIRECTION_2LINES_RXONLY SPI_CR1_RXONLY
231 #define SPI_DIRECTION_1LINE SPI_CR1_BIDIMODE
232 
239 #define SPI_DATASIZE_4BIT (0x00000300U)
240 #define SPI_DATASIZE_5BIT (0x00000400U)
241 #define SPI_DATASIZE_6BIT (0x00000500U)
242 #define SPI_DATASIZE_7BIT (0x00000600U)
243 #define SPI_DATASIZE_8BIT (0x00000700U)
244 #define SPI_DATASIZE_9BIT (0x00000800U)
245 #define SPI_DATASIZE_10BIT (0x00000900U)
246 #define SPI_DATASIZE_11BIT (0x00000A00U)
247 #define SPI_DATASIZE_12BIT (0x00000B00U)
248 #define SPI_DATASIZE_13BIT (0x00000C00U)
249 #define SPI_DATASIZE_14BIT (0x00000D00U)
250 #define SPI_DATASIZE_15BIT (0x00000E00U)
251 #define SPI_DATASIZE_16BIT (0x00000F00U)
252 
259 #define SPI_POLARITY_LOW (0x00000000U)
260 #define SPI_POLARITY_HIGH SPI_CR1_CPOL
261 
268 #define SPI_PHASE_1EDGE (0x00000000U)
269 #define SPI_PHASE_2EDGE SPI_CR1_CPHA
270 
277 #define SPI_NSS_SOFT SPI_CR1_SSM
278 #define SPI_NSS_HARD_INPUT (0x00000000U)
279 #define SPI_NSS_HARD_OUTPUT (SPI_CR2_SSOE << 16U)
280 
287 #define SPI_NSS_PULSE_ENABLE SPI_CR2_NSSP
288 #define SPI_NSS_PULSE_DISABLE (0x00000000U)
289 
296 #define SPI_BAUDRATEPRESCALER_2 (0x00000000U)
297 #define SPI_BAUDRATEPRESCALER_4 (SPI_CR1_BR_0)
298 #define SPI_BAUDRATEPRESCALER_8 (SPI_CR1_BR_1)
299 #define SPI_BAUDRATEPRESCALER_16 (SPI_CR1_BR_1 | SPI_CR1_BR_0)
300 #define SPI_BAUDRATEPRESCALER_32 (SPI_CR1_BR_2)
301 #define SPI_BAUDRATEPRESCALER_64 (SPI_CR1_BR_2 | SPI_CR1_BR_0)
302 #define SPI_BAUDRATEPRESCALER_128 (SPI_CR1_BR_2 | SPI_CR1_BR_1)
303 #define SPI_BAUDRATEPRESCALER_256 (SPI_CR1_BR_2 | SPI_CR1_BR_1 | SPI_CR1_BR_0)
304 
311 #define SPI_FIRSTBIT_MSB (0x00000000U)
312 #define SPI_FIRSTBIT_LSB SPI_CR1_LSBFIRST
313 
320 #define SPI_TIMODE_DISABLE (0x00000000U)
321 #define SPI_TIMODE_ENABLE SPI_CR2_FRF
322 
329 #define SPI_CRCCALCULATION_DISABLE (0x00000000U)
330 #define SPI_CRCCALCULATION_ENABLE SPI_CR1_CRCEN
331 
342 #define SPI_CRC_LENGTH_DATASIZE (0x00000000U)
343 #define SPI_CRC_LENGTH_8BIT (0x00000001U)
344 #define SPI_CRC_LENGTH_16BIT (0x00000002U)
345 
357 #define SPI_RXFIFO_THRESHOLD SPI_CR2_FRXTH
358 #define SPI_RXFIFO_THRESHOLD_QF SPI_CR2_FRXTH
359 #define SPI_RXFIFO_THRESHOLD_HF (0x00000000U)
360 
367 #define SPI_IT_TXE SPI_CR2_TXEIE
368 #define SPI_IT_RXNE SPI_CR2_RXNEIE
369 #define SPI_IT_ERR SPI_CR2_ERRIE
370 
377 #define SPI_FLAG_RXNE SPI_SR_RXNE /* SPI status flag: Rx buffer not empty flag */
378 #define SPI_FLAG_TXE SPI_SR_TXE /* SPI status flag: Tx buffer empty flag */
379 #define SPI_FLAG_BSY SPI_SR_BSY /* SPI status flag: Busy flag */
380 #define SPI_FLAG_CRCERR SPI_SR_CRCERR /* SPI Error flag: CRC error flag */
381 #define SPI_FLAG_MODF SPI_SR_MODF /* SPI Error flag: Mode fault flag */
382 #define SPI_FLAG_OVR SPI_SR_OVR /* SPI Error flag: Overrun flag */
383 #define SPI_FLAG_FRE SPI_SR_FRE /* SPI Error flag: TI mode frame format error flag */
384 #define SPI_FLAG_FTLVL SPI_SR_FTLVL /* SPI fifo transmission level */
385 #define SPI_FLAG_FRLVL SPI_SR_FRLVL /* SPI fifo reception level */
386 #define SPI_FLAG_MASK (SPI_SR_RXNE | SPI_SR_TXE | SPI_SR_BSY | SPI_SR_CRCERR | SPI_SR_MODF | SPI_SR_OVR | SPI_SR_FRE | SPI_SR_FTLVL | SPI_SR_FRLVL)
387 
394 #define SPI_FTLVL_EMPTY (0x00000000U)
395 #define SPI_FTLVL_QUARTER_FULL (0x00000800U)
396 #define SPI_FTLVL_HALF_FULL (0x00001000U)
397 #define SPI_FTLVL_FULL (0x00001800U)
398 
406 #define SPI_FRLVL_EMPTY (0x00000000U)
407 #define SPI_FRLVL_QUARTER_FULL (0x00000200U)
408 #define SPI_FRLVL_HALF_FULL (0x00000400U)
409 #define SPI_FRLVL_FULL (0x00000600U)
410 
418 /* Exported macros -----------------------------------------------------------*/
428 #if (USE_HAL_SPI_REGISTER_CALLBACKS == 1U)
429 #define __HAL_SPI_RESET_HANDLE_STATE(__HANDLE__) do{ \
430  (__HANDLE__)->State = HAL_SPI_STATE_RESET; \
431  (__HANDLE__)->MspInitCallback = NULL; \
432  (__HANDLE__)->MspDeInitCallback = NULL; \
433  } while(0)
434 #else
435 #define __HAL_SPI_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SPI_STATE_RESET)
436 #endif
437 
448 #define __HAL_SPI_ENABLE_IT(__HANDLE__, __INTERRUPT__) SET_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))
449 
460 #define __HAL_SPI_DISABLE_IT(__HANDLE__, __INTERRUPT__) CLEAR_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))
461 
472 #define __HAL_SPI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CR2 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
473 
490 #define __HAL_SPI_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
491 
497 #define __HAL_SPI_CLEAR_CRCERRFLAG(__HANDLE__) ((__HANDLE__)->Instance->SR = (uint16_t)(~SPI_FLAG_CRCERR))
498 
504 #define __HAL_SPI_CLEAR_MODFFLAG(__HANDLE__) \
505  do{ \
506  __IO uint32_t tmpreg_modf = 0x00U; \
507  tmpreg_modf = (__HANDLE__)->Instance->SR; \
508  CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE); \
509  UNUSED(tmpreg_modf); \
510  } while(0U)
511 
517 #define __HAL_SPI_CLEAR_OVRFLAG(__HANDLE__) \
518  do{ \
519  __IO uint32_t tmpreg_ovr = 0x00U; \
520  tmpreg_ovr = (__HANDLE__)->Instance->DR; \
521  tmpreg_ovr = (__HANDLE__)->Instance->SR; \
522  UNUSED(tmpreg_ovr); \
523  } while(0U)
524 
530 #define __HAL_SPI_CLEAR_FREFLAG(__HANDLE__) \
531  do{ \
532  __IO uint32_t tmpreg_fre = 0x00U; \
533  tmpreg_fre = (__HANDLE__)->Instance->SR; \
534  UNUSED(tmpreg_fre); \
535  }while(0U)
536 
542 #define __HAL_SPI_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)
543 
549 #define __HAL_SPI_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)
550 
555 /* Private macros ------------------------------------------------------------*/
565 #define SPI_1LINE_TX(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_BIDIOE)
566 
572 #define SPI_1LINE_RX(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_BIDIOE)
573 
579 #define SPI_RESET_CRC(__HANDLE__) do{CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_CRCEN);\
580  SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_CRCEN);}while(0U)
581 
597 #define SPI_CHECK_FLAG(__SR__, __FLAG__) ((((__SR__) & ((__FLAG__) & SPI_FLAG_MASK)) == ((__FLAG__) & SPI_FLAG_MASK)) ? SET : RESET)
598 
608 #define SPI_CHECK_IT_SOURCE(__CR2__, __INTERRUPT__) ((((__CR2__) & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
609 
615 #define IS_SPI_MODE(__MODE__) (((__MODE__) == SPI_MODE_SLAVE) || \
616  ((__MODE__) == SPI_MODE_MASTER))
617 
623 #define IS_SPI_DIRECTION(__MODE__) (((__MODE__) == SPI_DIRECTION_2LINES) || \
624  ((__MODE__) == SPI_DIRECTION_2LINES_RXONLY) || \
625  ((__MODE__) == SPI_DIRECTION_1LINE))
626 
631 #define IS_SPI_DIRECTION_2LINES(__MODE__) ((__MODE__) == SPI_DIRECTION_2LINES)
632 
637 #define IS_SPI_DIRECTION_2LINES_OR_1LINE(__MODE__) (((__MODE__) == SPI_DIRECTION_2LINES) || \
638  ((__MODE__) == SPI_DIRECTION_1LINE))
639 
645 #define IS_SPI_DATASIZE(__DATASIZE__) (((__DATASIZE__) == SPI_DATASIZE_16BIT) || \
646  ((__DATASIZE__) == SPI_DATASIZE_15BIT) || \
647  ((__DATASIZE__) == SPI_DATASIZE_14BIT) || \
648  ((__DATASIZE__) == SPI_DATASIZE_13BIT) || \
649  ((__DATASIZE__) == SPI_DATASIZE_12BIT) || \
650  ((__DATASIZE__) == SPI_DATASIZE_11BIT) || \
651  ((__DATASIZE__) == SPI_DATASIZE_10BIT) || \
652  ((__DATASIZE__) == SPI_DATASIZE_9BIT) || \
653  ((__DATASIZE__) == SPI_DATASIZE_8BIT) || \
654  ((__DATASIZE__) == SPI_DATASIZE_7BIT) || \
655  ((__DATASIZE__) == SPI_DATASIZE_6BIT) || \
656  ((__DATASIZE__) == SPI_DATASIZE_5BIT) || \
657  ((__DATASIZE__) == SPI_DATASIZE_4BIT))
658 
664 #define IS_SPI_CPOL(__CPOL__) (((__CPOL__) == SPI_POLARITY_LOW) || \
665  ((__CPOL__) == SPI_POLARITY_HIGH))
666 
672 #define IS_SPI_CPHA(__CPHA__) (((__CPHA__) == SPI_PHASE_1EDGE) || \
673  ((__CPHA__) == SPI_PHASE_2EDGE))
674 
680 #define IS_SPI_NSS(__NSS__) (((__NSS__) == SPI_NSS_SOFT) || \
681  ((__NSS__) == SPI_NSS_HARD_INPUT) || \
682  ((__NSS__) == SPI_NSS_HARD_OUTPUT))
683 
689 #define IS_SPI_NSSP(__NSSP__) (((__NSSP__) == SPI_NSS_PULSE_ENABLE) || \
690  ((__NSSP__) == SPI_NSS_PULSE_DISABLE))
691 
697 #define IS_SPI_BAUDRATE_PRESCALER(__PRESCALER__) (((__PRESCALER__) == SPI_BAUDRATEPRESCALER_2) || \
698  ((__PRESCALER__) == SPI_BAUDRATEPRESCALER_4) || \
699  ((__PRESCALER__) == SPI_BAUDRATEPRESCALER_8) || \
700  ((__PRESCALER__) == SPI_BAUDRATEPRESCALER_16) || \
701  ((__PRESCALER__) == SPI_BAUDRATEPRESCALER_32) || \
702  ((__PRESCALER__) == SPI_BAUDRATEPRESCALER_64) || \
703  ((__PRESCALER__) == SPI_BAUDRATEPRESCALER_128) || \
704  ((__PRESCALER__) == SPI_BAUDRATEPRESCALER_256))
705 
711 #define IS_SPI_FIRST_BIT(__BIT__) (((__BIT__) == SPI_FIRSTBIT_MSB) || \
712  ((__BIT__) == SPI_FIRSTBIT_LSB))
713 
719 #define IS_SPI_TIMODE(__MODE__) (((__MODE__) == SPI_TIMODE_DISABLE) || \
720  ((__MODE__) == SPI_TIMODE_ENABLE))
721 
727 #define IS_SPI_CRC_CALCULATION(__CALCULATION__) (((__CALCULATION__) == SPI_CRCCALCULATION_DISABLE) || \
728  ((__CALCULATION__) == SPI_CRCCALCULATION_ENABLE))
729 
735 #define IS_SPI_CRC_LENGTH(__LENGTH__) (((__LENGTH__) == SPI_CRC_LENGTH_DATASIZE) ||\
736  ((__LENGTH__) == SPI_CRC_LENGTH_8BIT) || \
737  ((__LENGTH__) == SPI_CRC_LENGTH_16BIT))
738 
744 #define IS_SPI_CRC_POLYNOMIAL(__POLYNOMIAL__) (((__POLYNOMIAL__) >= 0x1U) && ((__POLYNOMIAL__) <= 0xFFFFU) && (((__POLYNOMIAL__)&0x1U) != 0U))
745 
750 #define IS_SPI_DMA_HANDLE(__HANDLE__) ((__HANDLE__) != NULL)
751 
756 /* Include SPI HAL Extended module */
757 #include "stm32f7xx_hal_spi_ex.h"
758 
759 /* Exported functions --------------------------------------------------------*/
767 /* Initialization/de-initialization functions ********************************/
772 
773 /* Callbacks Register/UnRegister functions ***********************************/
774 #if (USE_HAL_SPI_REGISTER_CALLBACKS == 1U)
775 HAL_StatusTypeDef HAL_SPI_RegisterCallback(SPI_HandleTypeDef *hspi, HAL_SPI_CallbackIDTypeDef CallbackID, pSPI_CallbackTypeDef pCallback);
776 HAL_StatusTypeDef HAL_SPI_UnRegisterCallback(SPI_HandleTypeDef *hspi, HAL_SPI_CallbackIDTypeDef CallbackID);
777 #endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
778 
785 /* I/O operation functions ***************************************************/
786 HAL_StatusTypeDef HAL_SPI_Transmit(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout);
787 HAL_StatusTypeDef HAL_SPI_Receive(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout);
788 HAL_StatusTypeDef HAL_SPI_TransmitReceive(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size,
789  uint32_t Timeout);
790 HAL_StatusTypeDef HAL_SPI_Transmit_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size);
791 HAL_StatusTypeDef HAL_SPI_Receive_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size);
792 HAL_StatusTypeDef HAL_SPI_TransmitReceive_IT(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData,
793  uint16_t Size);
794 HAL_StatusTypeDef HAL_SPI_Transmit_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size);
795 HAL_StatusTypeDef HAL_SPI_Receive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size);
796 HAL_StatusTypeDef HAL_SPI_TransmitReceive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData,
797  uint16_t Size);
801 /* Transfer Abort functions */
804 
821 /* Peripheral State and Error functions ***************************************/
823 uint32_t HAL_SPI_GetError(SPI_HandleTypeDef *hspi);
840 #ifdef __cplusplus
841 }
842 #endif
843 
844 #endif /* STM32F7xx_HAL_SPI_H */
845 
846 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
HAL_SPI_AbortCpltCallback
void HAL_SPI_AbortCpltCallback(SPI_HandleTypeDef *hspi)
HAL_SPI_DMAResume
HAL_StatusTypeDef HAL_SPI_DMAResume(SPI_HandleTypeDef *hspi)
HAL_SPI_STATE_ERROR
@ HAL_SPI_STATE_ERROR
Definition: stm32f7xx_hal_spi.h:109
SPI_TypeDef
Serial Peripheral Interface.
Definition: stm32f407xx.h:711
__SPI_HandleTypeDef::Init
SPI_InitTypeDef Init
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:109
__IO
#define __IO
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:237
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:40
HAL_SPI_Receive_IT
HAL_StatusTypeDef HAL_SPI_Receive_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size)
HAL_SPI_Transmit_IT
HAL_StatusTypeDef HAL_SPI_Transmit_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size)
__DMA_HandleTypeDef
DMA handle Structure definition.
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:139
HAL_SPI_RxCpltCallback
void HAL_SPI_RxCpltCallback(SPI_HandleTypeDef *hspi)
HAL_SPI_MspDeInit
void HAL_SPI_MspDeInit(SPI_HandleTypeDef *hspi)
SPI_HandleTypeDef
struct __SPI_HandleTypeDef SPI_HandleTypeDef
SPI handle Structure definition.
HAL_SPI_Transmit
HAL_StatusTypeDef HAL_SPI_Transmit(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout)
__SPI_HandleTypeDef::TxISR
void(* TxISR)(struct __SPI_HandleTypeDef *hspi)
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:125
__SPI_HandleTypeDef
SPI handle Structure definition.
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:105
__SPI_HandleTypeDef::pTxBuffPtr
uint8_t * pTxBuffPtr
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:111
HAL_SPI_DMAStop
HAL_StatusTypeDef HAL_SPI_DMAStop(SPI_HandleTypeDef *hspi)
HAL_SPI_STATE_BUSY_RX
@ HAL_SPI_STATE_BUSY_RX
Definition: stm32f7xx_hal_spi.h:107
stm32f7xx_hal_spi_ex.h
Header file of SPI HAL Extended module.
HAL_SPI_IRQHandler
void HAL_SPI_IRQHandler(SPI_HandleTypeDef *hspi)
HAL_LockTypeDef
HAL_LockTypeDef
HAL Lock structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:51
__SPI_HandleTypeDef::RxXferSize
uint16_t RxXferSize
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:119
__SPI_HandleTypeDef::Instance
SPI_TypeDef * Instance
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:107
SPI_InitTypeDef::NSSPMode
uint32_t NSSPMode
Definition: stm32f7xx_hal_spi.h:90
HAL_SPI_Abort
HAL_StatusTypeDef HAL_SPI_Abort(SPI_HandleTypeDef *hspi)
SPI_InitTypeDef
SPI Configuration Structure definition.
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:47
__SPI_HandleTypeDef::hdmatx
DMA_HandleTypeDef * hdmatx
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:127
HAL_SPI_STATE_ABORT
@ HAL_SPI_STATE_ABORT
Definition: stm32f7xx_hal_spi.h:110
HAL_SPI_TransmitReceive_DMA
HAL_StatusTypeDef HAL_SPI_TransmitReceive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size)
__SPI_HandleTypeDef::RxXferCount
__IO uint16_t RxXferCount
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:121
HAL_SPI_TxCpltCallback
void HAL_SPI_TxCpltCallback(SPI_HandleTypeDef *hspi)
HAL_SPI_STATE_BUSY
@ HAL_SPI_STATE_BUSY
Definition: stm32f7xx_hal_spi.h:105
HAL_SPI_ErrorCallback
void HAL_SPI_ErrorCallback(SPI_HandleTypeDef *hspi)
HAL_SPI_TxRxCpltCallback
void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi)
__SPI_HandleTypeDef::RxISR
void(* RxISR)(struct __SPI_HandleTypeDef *hspi)
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:123
__SPI_HandleTypeDef::TxXferSize
uint16_t TxXferSize
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:113
HAL_SPI_TxRxHalfCpltCallback
void HAL_SPI_TxRxHalfCpltCallback(SPI_HandleTypeDef *hspi)
HAL_SPI_STATE_RESET
@ HAL_SPI_STATE_RESET
Definition: stm32f7xx_hal_spi.h:103
__SPI_HandleTypeDef::ErrorCode
__IO uint32_t ErrorCode
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:135
HAL_SPI_STATE_BUSY_TX_RX
@ HAL_SPI_STATE_BUSY_TX_RX
Definition: stm32f7xx_hal_spi.h:108
__SPI_HandleTypeDef::Lock
HAL_LockTypeDef Lock
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:131
__SPI_HandleTypeDef::TxXferCount
__IO uint16_t TxXferCount
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:115
HAL_SPI_Transmit_DMA
HAL_StatusTypeDef HAL_SPI_Transmit_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size)
HAL_SPI_GetState
HAL_SPI_StateTypeDef HAL_SPI_GetState(SPI_HandleTypeDef *hspi)
HAL_SPI_GetError
uint32_t HAL_SPI_GetError(SPI_HandleTypeDef *hspi)
__SPI_HandleTypeDef::pRxBuffPtr
uint8_t * pRxBuffPtr
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:117
__SPI_HandleTypeDef::State
__IO HAL_SPI_StateTypeDef State
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:133
HAL_SPI_Receive_DMA
HAL_StatusTypeDef HAL_SPI_Receive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size)
HAL_SPI_RxHalfCpltCallback
void HAL_SPI_RxHalfCpltCallback(SPI_HandleTypeDef *hspi)
HAL_SPI_STATE_READY
@ HAL_SPI_STATE_READY
Definition: stm32f7xx_hal_spi.h:104
stm32f7xx_hal_def.h
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_SPI_DMAPause
HAL_StatusTypeDef HAL_SPI_DMAPause(SPI_HandleTypeDef *hspi)
SPI_InitTypeDef::CRCLength
uint32_t CRCLength
Definition: stm32f7xx_hal_spi.h:86
HAL_SPI_StateTypeDef
HAL_SPI_StateTypeDef
HAL SPI State structure definition.
Definition: stm32f7xx_hal_spi.h:101
HAL_SPI_Abort_IT
HAL_StatusTypeDef HAL_SPI_Abort_IT(SPI_HandleTypeDef *hspi)
HAL_SPI_TxHalfCpltCallback
void HAL_SPI_TxHalfCpltCallback(SPI_HandleTypeDef *hspi)
__SPI_HandleTypeDef::hdmarx
DMA_HandleTypeDef * hdmarx
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:129
HAL_SPI_TransmitReceive_IT
HAL_StatusTypeDef HAL_SPI_TransmitReceive_IT(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size)
HAL_SPI_STATE_BUSY_TX
@ HAL_SPI_STATE_BUSY_TX
Definition: stm32f7xx_hal_spi.h:106
Mode
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/stb_vorbis.c:745
HAL_SPI_DeInit
HAL_StatusTypeDef HAL_SPI_DeInit(SPI_HandleTypeDef *hspi)
__SPI_HandleTypeDef::CRCSize
uint32_t CRCSize
Definition: stm32f7xx_hal_spi.h:134
HAL_SPI_TransmitReceive
HAL_StatusTypeDef HAL_SPI_TransmitReceive(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size, uint32_t Timeout)
HAL_SPI_Receive
HAL_StatusTypeDef HAL_SPI_Receive(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout)
HAL_SPI_MspInit
void HAL_SPI_MspInit(SPI_HandleTypeDef *hspi)
HAL_SPI_Init
HAL_StatusTypeDef HAL_SPI_Init(SPI_HandleTypeDef *hspi)


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:53