Merge pull request #11270 from haslinghuis/rename_attr
[betaflight.git] / lib / main / STM32H7 / Drivers / STM32H7xx_HAL_Driver / Inc / stm32h7xx_hal_swpmi.h
blobf41ac106b3e2c23eda8e65be8ed89c96c4921f63
1 /**
2 ******************************************************************************
3 * @file stm32h7xx_hal_swpmi.h
4 * @author MCD Application Team
5 * @brief Header file of SWPMI HAL module.
6 ******************************************************************************
7 * @attention
9 * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
10 * All rights reserved.</center></h2>
12 * This software component is licensed by ST under BSD 3-Clause license,
13 * the "License"; You may not use this file except in compliance with the
14 * License. You may obtain a copy of the License at:
15 * opensource.org/licenses/BSD-3-Clause
17 ******************************************************************************
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32H7xx_HAL_SWPMI_H
22 #define STM32H7xx_HAL_SWPMI_H
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32h7xx_hal_def.h"
31 /** @addtogroup STM32H7xx_HAL_Driver
32 * @{
36 /** @addtogroup SWPMI
37 * @{
40 /* Exported types ------------------------------------------------------------*/
41 /** @defgroup SWPMI_Exported_Types SWPMI Exported Types
42 * @{
45 /**
46 * @brief SWPMI Init Structure definition
48 typedef struct
50 uint32_t VoltageClass; /*!< Specifies the SWP Voltage Class.
51 This parameter can be a value of @ref SWPMI_Voltage_Class */
53 uint32_t BitRate; /*!< Specifies the SWPMI Bitrate.
54 This parameter must be a number between 0 and 255U.
55 The Bitrate is computed using the following formula:
56 SWPMI_freq = SWPMI_clk / (((BitRate) + 1) * 4)
59 uint32_t TxBufferingMode; /*!< Specifies the transmission buffering mode.
60 This parameter can be a value of @ref SWPMI_Tx_Buffering_Mode */
62 uint32_t RxBufferingMode; /*!< Specifies the reception buffering mode.
63 This parameter can be a value of @ref SWPMI_Rx_Buffering_Mode */
65 }SWPMI_InitTypeDef;
68 /**
69 * @brief HAL SWPMI State structures definition
71 typedef enum
73 HAL_SWPMI_STATE_RESET = 0x00, /*!< Peripheral Reset state */
74 HAL_SWPMI_STATE_READY = 0x01, /*!< Peripheral Initialized and ready for use */
75 HAL_SWPMI_STATE_BUSY = 0x02, /*!< an internal process is ongoing */
76 HAL_SWPMI_STATE_BUSY_TX = 0x12, /*!< Data Transmission process is ongoing */
77 HAL_SWPMI_STATE_BUSY_RX = 0x22, /*!< Data Reception process is ongoing */
78 HAL_SWPMI_STATE_BUSY_TX_RX = 0x32, /*!< Data Transmission and Reception process is ongoing */
79 HAL_SWPMI_STATE_TIMEOUT = 0x03, /*!< Timeout state */
80 HAL_SWPMI_STATE_ERROR = 0x04 /*!< Error */
81 }HAL_SWPMI_StateTypeDef;
83 /**
84 * @brief SWPMI handle Structure definition
86 #if (USE_HAL_SWPMI_REGISTER_CALLBACKS == 1)
87 typedef struct __SWPMI_HandleTypeDef
88 #else
89 typedef struct
90 #endif /* USE_HAL_SWPMI_REGISTER_CALLBACKS */
92 SWPMI_TypeDef *Instance; /*!< SWPMI registers base address */
94 SWPMI_InitTypeDef Init; /*!< SWPMI communication parameters */
96 uint32_t *pTxBuffPtr; /*!< Pointer to SWPMI Tx transfer Buffer */
98 uint32_t TxXferSize; /*!< SWPMI Tx Transfer size */
100 uint32_t TxXferCount; /*!< SWPMI Tx Transfer Counter */
102 uint32_t *pRxBuffPtr; /*!< Pointer to SWPMI Rx transfer Buffer */
104 uint32_t RxXferSize; /*!< SWPMI Rx Transfer size */
106 uint32_t RxXferCount; /*!< SWPMI Rx Transfer Counter */
108 DMA_HandleTypeDef *hdmatx; /*!< SWPMI Tx DMA Handle parameters */
110 DMA_HandleTypeDef *hdmarx; /*!< SWPMI Rx DMA Handle parameters */
112 HAL_LockTypeDef Lock; /*!< SWPMI object */
114 __IO HAL_SWPMI_StateTypeDef State; /*!< SWPMI communication state */
116 __IO uint32_t ErrorCode; /*!< SWPMI Error code */
118 #if (USE_HAL_SWPMI_REGISTER_CALLBACKS == 1)
119 void (*RxCpltCallback) (struct __SWPMI_HandleTypeDef *hswpmi); /*!< SWPMI receive complete callback */
120 void (*RxHalfCpltCallback) (struct __SWPMI_HandleTypeDef *hswpmi); /*!< SWPMI receive half complete callback */
121 void (*TxCpltCallback) (struct __SWPMI_HandleTypeDef *hswpmi); /*!< SWPMI transmit complete callback */
122 void (*TxHalfCpltCallback) (struct __SWPMI_HandleTypeDef *hswpmi); /*!< SWPMI transmit half complete callback */
123 void (*ErrorCallback) (struct __SWPMI_HandleTypeDef *hswpmi); /*!< SWPMI error callback */
124 void (*MspInitCallback) (struct __SWPMI_HandleTypeDef *hswpmi); /*!< SWPMI MSP init callback */
125 void (*MspDeInitCallback) (struct __SWPMI_HandleTypeDef *hswpmi); /*!< SWPMI MSP de-init callback */
126 #endif
128 }SWPMI_HandleTypeDef;
130 #if (USE_HAL_SWPMI_REGISTER_CALLBACKS == 1)
132 * @brief SWPMI callback ID enumeration definition
134 typedef enum
136 HAL_SWPMI_RX_COMPLETE_CB_ID = 0x00U, /*!< SWPMI receive complete callback ID */
137 HAL_SWPMI_RX_HALFCOMPLETE_CB_ID = 0x01U, /*!< SWPMI receive half complete callback ID */
138 HAL_SWPMI_TX_COMPLETE_CB_ID = 0x02U, /*!< SWPMI transmit complete callback ID */
139 HAL_SWPMI_TX_HALFCOMPLETE_CB_ID = 0x03U, /*!< SWPMI transmit half complete callback ID */
140 HAL_SWPMI_ERROR_CB_ID = 0x04U, /*!< SWPMI error callback ID */
141 HAL_SWPMI_MSPINIT_CB_ID = 0x05U, /*!< SWPMI MSP init callback ID */
142 HAL_SWPMI_MSPDEINIT_CB_ID = 0x06U /*!< SWPMI MSP de-init callback ID */
143 }HAL_SWPMI_CallbackIDTypeDef;
146 * @brief SWPMI callback pointer definition
148 typedef void (*pSWPMI_CallbackTypeDef)(SWPMI_HandleTypeDef *hswpmi);
149 #endif
152 * @}
155 /* Exported constants --------------------------------------------------------*/
156 /** @defgroup SWPMI_Exported_Constants SWPMI Exported Constants
157 * @{
161 * @defgroup SWPMI_Error_Code SWPMI Error Code Bitmap
162 * @{
164 #define HAL_SWPMI_ERROR_NONE ((uint32_t)0x00000000) /*!< No error */
165 #define HAL_SWPMI_ERROR_CRC ((uint32_t)0x00000004) /*!< frame error */
166 #define HAL_SWPMI_ERROR_OVR ((uint32_t)0x00000008) /*!< Overrun error */
167 #define HAL_SWPMI_ERROR_UDR ((uint32_t)0x0000000C) /*!< Underrun error */
168 #define HAL_SWPMI_ERROR_DMA ((uint32_t)0x00000010) /*!< DMA transfer error */
169 #define HAL_SWPMI_ERROR_TIMEOUT ((uint32_t)0x00000020) /*!< Transfer timeout */
170 #define HAL_SWPMI_ERROR_TXBEF_TIMEOUT ((uint32_t)0x00000040) /*!< End Tx buffer timeout */
171 #define HAL_SWPMI_ERROR_TRANSCEIVER_NOT_READY ((uint32_t)0x00000080) /*!< Transceiver not ready */
172 #if (USE_HAL_SWPMI_REGISTER_CALLBACKS == 1)
173 #define HAL_SWPMI_ERROR_INVALID_CALLBACK ((uint32_t)0x00000100) /*!< Invalid callback error */
174 #endif
176 * @}
179 /** @defgroup SWPMI_Voltage_Class SWPMI Voltage Class
180 * @{
182 #define SWPMI_VOLTAGE_CLASS_C ((uint32_t)0x00000000)
183 #define SWPMI_VOLTAGE_CLASS_B SWPMI_OR_CLASS
185 * @}
188 /** @defgroup SWPMI_Tx_Buffering_Mode SWPMI Tx Buffering Mode
189 * @{
191 #define SWPMI_TX_NO_SOFTWAREBUFFER ((uint32_t)0x00000000)
192 #define SWPMI_TX_SINGLE_SOFTWAREBUFFER ((uint32_t)0x00000000)
193 #define SWPMI_TX_MULTI_SOFTWAREBUFFER SWPMI_CR_TXMODE
195 * @}
198 /** @defgroup SWPMI_Rx_Buffering_Mode SWPMI Rx Buffering Mode
199 * @{
201 #define SWPMI_RX_NO_SOFTWAREBUFFER ((uint32_t)0x00000000)
202 #define SWPMI_RX_SINGLE_SOFTWAREBUFFER ((uint32_t)0x00000000)
203 #define SWPMI_RX_MULTI_SOFTWAREBUFFER SWPMI_CR_RXMODE
205 * @}
208 /** @defgroup SWPMI_Flags SWPMI Status Flags
209 * Elements values convention: 0xXXXXXXXX
210 * - 0xXXXXXXXX : Flag mask in the ISR register
211 * @{
213 #define SWPMI_FLAG_RXBFF SWPMI_ISR_RXBFF
214 #define SWPMI_FLAG_TXBEF SWPMI_ISR_TXBEF
215 #define SWPMI_FLAG_RXBERF SWPMI_ISR_RXBERF
216 #define SWPMI_FLAG_RXOVRF SWPMI_ISR_RXOVRF
217 #define SWPMI_FLAG_TXUNRF SWPMI_ISR_TXUNRF
218 #define SWPMI_FLAG_RXNE SWPMI_ISR_RXNE
219 #define SWPMI_FLAG_TXE SWPMI_ISR_TXE
220 #define SWPMI_FLAG_TCF SWPMI_ISR_TCF
221 #define SWPMI_FLAG_SRF SWPMI_ISR_SRF
222 #define SWPMI_FLAG_SUSP SWPMI_ISR_SUSP
223 #define SWPMI_FLAG_DEACTF SWPMI_ISR_DEACTF
224 #define SWPMI_FLAG_RDYF SWPMI_ISR_RDYF
226 * @}
229 /** @defgroup SWPMI_Interrupt_definition SWPMI Interrupts Definition
230 * Elements values convention: 0xXXXX
231 * - 0xXXXX : Flag mask in the IER register
232 * @{
234 #define SWPMI_IT_RDYIE SWPMI_IER_RDYIE
235 #define SWPMI_IT_SRIE SWPMI_IER_SRIE
236 #define SWPMI_IT_TCIE SWPMI_IER_TCIE
237 #define SWPMI_IT_TIE SWPMI_IER_TIE
238 #define SWPMI_IT_RIE SWPMI_IER_RIE
239 #define SWPMI_IT_TXUNRIE SWPMI_IER_TXUNRIE
240 #define SWPMI_IT_RXOVRIE SWPMI_IER_RXOVRIE
241 #define SWPMI_IT_RXBERIE SWPMI_IER_RXBERIE
242 #define SWPMI_IT_TXBEIE SWPMI_IER_TXBEIE
243 #define SWPMI_IT_RXBFIE SWPMI_IER_RXBFIE
245 * @}
249 * @}
252 /* Exported macros -----------------------------------------------------------*/
253 /** @defgroup SWPMI_Exported_Macros SWPMI Exported Macros
254 * @{
257 /** @brief Reset SWPMI handle state.
258 * @param __HANDLE__ specifies the SWPMI Handle.
259 * @retval None
261 #if (USE_HAL_SWPMI_REGISTER_CALLBACKS == 1)
262 #define __HAL_SWPMI_RESET_HANDLE_STATE(__HANDLE__) do{ \
263 (__HANDLE__)->State = HAL_SWPMI_STATE_RESET; \
264 (__HANDLE__)->MspInitCallback = NULL; \
265 (__HANDLE__)->MspDeInitCallback = NULL; \
266 } while(0)
267 #else
268 #define __HAL_SWPMI_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SWPMI_STATE_RESET)
269 #endif
272 * @brief Enable the SWPMI peripheral.
273 * @param __HANDLE__ SWPMI handle
274 * @retval None
276 #define __HAL_SWPMI_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, SWPMI_CR_SWPACT)
279 * @brief Disable the SWPMI peripheral.
280 * @param __HANDLE__ SWPMI handle
281 * @retval None
283 #define __HAL_SWPMI_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR, SWPMI_CR_SWPACT)
286 * @brief Enable the SWPMI transceiver.
287 * @param __HANDLE__ SWPMI handle
288 * @retval None
290 #define __HAL_SWPMI_TRANSCEIVER_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, SWPMI_CR_SWPEN)
293 * @brief Disable the SWPMI transceiver.
294 * @param __HANDLE__ SWPMI handle
295 * @retval None
297 #define __HAL_SWPMI_TRANSCEIVER_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR, SWPMI_CR_SWPEN)
299 /** @brief Check whether the specified SWPMI flag is set or not.
300 * @param __HANDLE__ specifies the SWPMI Handle.
301 * @param __FLAG__: specifies the flag to check.
302 * This parameter can be one of the following values:
303 * @arg SWPMI_FLAG_RXBFF Receive buffer full flag.
304 * @arg SWPMI_FLAG_TXBEF Transmit buffer empty flag.
305 * @arg SWPMI_FLAG_RXBERF Receive CRC error flag.
306 * @arg SWPMI_FLAG_RXOVRF Receive overrun error flag.
307 * @arg SWPMI_FLAG_TXUNRF Transmit underrun error flag.
308 * @arg SWPMI_FLAG_RXNE Receive data register not empty.
309 * @arg SWPMI_FLAG_TXE Transmit data register empty.
310 * @arg SWPMI_FLAG_TCF Transfer complete flag.
311 * @arg SWPMI_FLAG_SRF Slave resume flag.
312 * @arg SWPMI_FLAG_SUSP SUSPEND flag.
313 * @arg SWPMI_FLAG_DEACTF DEACTIVATED flag.
314 * @arg SWPMI_FLAG_RDYF Transceiver ready flag.
315 * @retval The new state of __FLAG__ (TRUE or FALSE).
317 #define __HAL_SWPMI_GET_FLAG(__HANDLE__, __FLAG__) (READ_BIT((__HANDLE__)->Instance->ISR, (__FLAG__)) == (__FLAG__))
319 /** @brief Clear the specified SWPMI ISR flag.
320 * @param __HANDLE__ specifies the SWPMI Handle.
321 * @param __FLAG__: specifies the flag to clear.
322 * This parameter can be one of the following values:
323 * @arg SWPMI_FLAG_RXBFF Receive buffer full flag.
324 * @arg SWPMI_FLAG_TXBEF Transmit buffer empty flag.
325 * @arg SWPMI_FLAG_RXBERF Receive CRC error flag.
326 * @arg SWPMI_FLAG_RXOVRF Receive overrun error flag.
327 * @arg SWPMI_FLAG_TXUNRF Transmit underrun error flag.
328 * @arg SWPMI_FLAG_TCF Transfer complete flag.
329 * @arg SWPMI_FLAG_SRF Slave resume flag.
330 * @arg SWPMI_FLAG_RDYF Transceiver ready flag.
331 * @retval None
333 #define __HAL_SWPMI_CLEAR_FLAG(__HANDLE__, __FLAG__) WRITE_REG((__HANDLE__)->Instance->ICR, (__FLAG__))
335 /** @brief Enable the specified SWPMI interrupt.
336 * @param __HANDLE__ specifies the SWPMI Handle.
337 * @param __INTERRUPT__ specifies the SWPMI interrupt source to enable.
338 * This parameter can be one of the following values:
339 * @arg SWPMI_IT_RDYIE Transceiver ready interrupt.
340 * @arg SWPMI_IT_SRIE Slave resume interrupt.
341 * @arg SWPMI_IT_TCIE Transmit complete interrupt.
342 * @arg SWPMI_IT_TIE Transmit interrupt.
343 * @arg SWPMI_IT_RIE Receive interrupt.
344 * @arg SWPMI_IT_TXUNRIE Transmit underrun error interrupt.
345 * @arg SWPMI_IT_RXOVRIE Receive overrun error interrupt.
346 * @arg SWPMI_IT_RXBEIE Receive CRC error interrupt.
347 * @arg SWPMI_IT_TXBEIE Transmit buffer empty interrupt.
348 * @arg SWPMI_IT_RXBFIE Receive buffer full interrupt.
349 * @retval None
351 #define __HAL_SWPMI_ENABLE_IT(__HANDLE__, __INTERRUPT__) SET_BIT((__HANDLE__)->Instance->IER, (__INTERRUPT__))
353 /** @brief Disable the specified SWPMI interrupt.
354 * @param __HANDLE__ specifies the SWPMI Handle.
355 * @param __INTERRUPT__ specifies the SWPMI interrupt source to disable.
356 * This parameter can be one of the following values:
357 * @arg SWPMI_IT_RDYIE Transceiver ready interrupt.
358 * @arg SWPMI_IT_SRIE Slave resume interrupt.
359 * @arg SWPMI_IT_TCIE Transmit complete interrupt.
360 * @arg SWPMI_IT_TIE Transmit interrupt.
361 * @arg SWPMI_IT_RIE Receive interrupt.
362 * @arg SWPMI_IT_TXUNRIE Transmit underrun error interrupt.
363 * @arg SWPMI_IT_RXOVRIE Receive overrun error interrupt.
364 * @arg SWPMI_IT_RXBEIE Receive CRC error interrupt.
365 * @arg SWPMI_IT_TXBEIE Transmit buffer empty interrupt.
366 * @arg SWPMI_IT_RXBFIE Receive buffer full interrupt.
367 * @retval None
369 #define __HAL_SWPMI_DISABLE_IT(__HANDLE__, __INTERRUPT__) CLEAR_BIT((__HANDLE__)->Instance->IER, (__INTERRUPT__))
371 /** @brief Check whether the specified SWPMI interrupt has occurred or not.
372 * @param __HANDLE__ specifies the SWPMI Handle.
373 * @param __IT__ specifies the SWPMI interrupt to check.
374 * This parameter can be one of the following values:
375 * @arg SWPMI_IT_RDYIE Transceiver ready interrupt.
376 * @arg SWPMI_IT_SRIE Slave resume interrupt.
377 * @arg SWPMI_IT_TCIE Transmit complete interrupt.
378 * @arg SWPMI_IT_TIE Transmit interrupt.
379 * @arg SWPMI_IT_RIE Receive interrupt.
380 * @arg SWPMI_IT_TXUNRIE Transmit underrun error interrupt.
381 * @arg SWPMI_IT_RXOVRIE Receive overrun error interrupt.
382 * @arg SWPMI_IT_RXBERIE Receive CRC error interrupt.
383 * @arg SWPMI_IT_TXBEIE Transmit buffer empty interrupt.
384 * @arg SWPMI_IT_RXBFIE Receive buffer full interrupt.
385 * @retval The new state of __IT__ (TRUE or FALSE).
387 #define __HAL_SWPMI_GET_IT(__HANDLE__, __IT__) (READ_BIT((__HANDLE__)->Instance->ISR,(__IT__)) == (__IT__))
389 /** @brief Check whether the specified SWPMI interrupt source is enabled or not.
390 * @param __HANDLE__ specifies the SWPMI Handle.
391 * @param __IT__ specifies the SWPMI interrupt source to check.
392 * This parameter can be one of the following values:
393 * @arg SWPMI_IT_RDYIE Transceiver ready interrupt.
394 * @arg SWPMI_IT_SRIE Slave resume interrupt.
395 * @arg SWPMI_IT_TCIE Transmit complete interrupt.
396 * @arg SWPMI_IT_TIE Transmit interrupt.
397 * @arg SWPMI_IT_RIE Receive interrupt.
398 * @arg SWPMI_IT_TXUNRIE Transmit underrun error interrupt.
399 * @arg SWPMI_IT_RXOVRIE Receive overrun error interrupt.
400 * @arg SWPMI_IT_RXBERIE Receive CRC error interrupt.
401 * @arg SWPMI_IT_TXBEIE Transmit buffer empty interrupt.
402 * @arg SWPMI_IT_RXBFIE Receive buffer full interrupt.
403 * @retval The new state of __IT__ (TRUE or FALSE).
405 #define __HAL_SWPMI_GET_IT_SOURCE(__HANDLE__, __IT__) ((READ_BIT((__HANDLE__)->Instance->IER, (__IT__)) == (__IT__)) ? SET : RESET)
408 * @}
411 /* Exported functions --------------------------------------------------------*/
412 /** @defgroup SWPMI_Exported_Functions SWPMI Exported Functions
413 * @{
415 /* Initialization/de-initialization functions ********************************/
416 HAL_StatusTypeDef HAL_SWPMI_Init(SWPMI_HandleTypeDef *hswpmi);
417 HAL_StatusTypeDef HAL_SWPMI_DeInit(SWPMI_HandleTypeDef *hswpmi);
418 void HAL_SWPMI_MspInit(SWPMI_HandleTypeDef *hswpmi);
419 void HAL_SWPMI_MspDeInit(SWPMI_HandleTypeDef *hswpmi);
421 #if (USE_HAL_SWPMI_REGISTER_CALLBACKS == 1)
422 /* SWPMI callbacks register/unregister functions ********************************/
423 HAL_StatusTypeDef HAL_SWPMI_RegisterCallback(SWPMI_HandleTypeDef *hswpmi,
424 HAL_SWPMI_CallbackIDTypeDef CallbackID,
425 pSWPMI_CallbackTypeDef pCallback);
426 HAL_StatusTypeDef HAL_SWPMI_UnRegisterCallback(SWPMI_HandleTypeDef *hswpmi,
427 HAL_SWPMI_CallbackIDTypeDef CallbackID);
428 #endif
430 /* IO operation functions *****************************************************/
431 HAL_StatusTypeDef HAL_SWPMI_Transmit(SWPMI_HandleTypeDef *hswpmi, uint32_t *pData, uint16_t Size, uint32_t Timeout);
432 HAL_StatusTypeDef HAL_SWPMI_Receive(SWPMI_HandleTypeDef *hswpmi, uint32_t *pData, uint16_t Size, uint32_t Timeout);
433 HAL_StatusTypeDef HAL_SWPMI_Transmit_IT(SWPMI_HandleTypeDef *hswpmi, uint32_t *pData, uint16_t Size);
434 HAL_StatusTypeDef HAL_SWPMI_Receive_IT(SWPMI_HandleTypeDef *hswpmi, uint32_t *pData, uint16_t Size);
435 HAL_StatusTypeDef HAL_SWPMI_Transmit_DMA(SWPMI_HandleTypeDef *hswpmi, uint32_t *pData, uint16_t Size);
436 HAL_StatusTypeDef HAL_SWPMI_Receive_DMA(SWPMI_HandleTypeDef *hswpmi, uint32_t *pData, uint16_t Size);
437 HAL_StatusTypeDef HAL_SWPMI_DMAStop(SWPMI_HandleTypeDef *hswpmi);
438 HAL_StatusTypeDef HAL_SWPMI_EnableLoopback(SWPMI_HandleTypeDef *hswpmi);
439 HAL_StatusTypeDef HAL_SWPMI_DisableLoopback(SWPMI_HandleTypeDef *hswpmi);
440 void HAL_SWPMI_IRQHandler(SWPMI_HandleTypeDef *hswpmi);
441 void HAL_SWPMI_TxCpltCallback(SWPMI_HandleTypeDef *hswpmi);
442 void HAL_SWPMI_TxHalfCpltCallback(SWPMI_HandleTypeDef *hswpmi);
443 void HAL_SWPMI_RxCpltCallback(SWPMI_HandleTypeDef *hswpmi);
444 void HAL_SWPMI_RxHalfCpltCallback(SWPMI_HandleTypeDef *hswpmi);
445 void HAL_SWPMI_ErrorCallback(SWPMI_HandleTypeDef *hswpmi);
447 /* Peripheral Control and State functions ************************************/
448 HAL_SWPMI_StateTypeDef HAL_SWPMI_GetState(SWPMI_HandleTypeDef *hswpmi);
449 uint32_t HAL_SWPMI_GetError(SWPMI_HandleTypeDef *hswpmi);
452 * @}
455 /* Private types -------------------------------------------------------------*/
456 /** @defgroup SWPMI_Private_Types SWPMI Private Types
457 * @{
461 * @}
464 /* Private variables ---------------------------------------------------------*/
465 /** @defgroup SWPMI_Private_Variables SWPMI Private Variables
466 * @{
470 * @}
473 /* Private constants ---------------------------------------------------------*/
474 /** @defgroup SWPMI_Private_Constants SWPMI Private Constants
475 * @{
479 * @}
482 /* Private macros ------------------------------------------------------------*/
483 /** @defgroup SWPMI_Private_Macros SWPMI Private Macros
484 * @{
488 #define IS_SWPMI_VOLTAGE_CLASS(__CLASS__) (((__CLASS__) == SWPMI_VOLTAGE_CLASS_C) || \
489 ((__CLASS__) == SWPMI_VOLTAGE_CLASS_B))
491 #define IS_SWPMI_BITRATE_VALUE(__VALUE__) (((__VALUE__) <= 255U))
494 #define IS_SWPMI_TX_BUFFERING_MODE(__MODE__) (((__MODE__) == SWPMI_TX_NO_SOFTWAREBUFFER) || \
495 ((__MODE__) == SWPMI_TX_MULTI_SOFTWAREBUFFER))
498 #define IS_SWPMI_RX_BUFFERING_MODE(__MODE__) (((__MODE__) == SWPMI_RX_NO_SOFTWAREBUFFER) || \
499 ((__MODE__) == SWPMI_RX_MULTI_SOFTWAREBUFFER))
502 * @}
506 * @}
511 * @}
514 #ifdef __cplusplus
516 #endif
518 #endif /* STM32H7xx_HAL_SWPMI_H */
520 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/