2 ******************************************************************************
3 * @file stm32h7xx_hal_swpmi.h
4 * @author MCD Application Team
5 * @brief Header file of SWPMI HAL module.
6 ******************************************************************************
9 * Copyright (c) 2017 STMicroelectronics.
10 * All rights reserved.
12 * This software is licensed under terms that can be found in the LICENSE file
13 * in the root directory of this software component.
14 * If no LICENSE file comes with this software, it is provided AS-IS.
16 ******************************************************************************
19 /* Define to prevent recursive inclusion -------------------------------------*/
20 #ifndef STM32H7xx_HAL_SWPMI_H
21 #define STM32H7xx_HAL_SWPMI_H
27 /* Includes ------------------------------------------------------------------*/
28 #include "stm32h7xx_hal_def.h"
30 /** @addtogroup STM32H7xx_HAL_Driver
39 /* Exported types ------------------------------------------------------------*/
40 /** @defgroup SWPMI_Exported_Types SWPMI Exported Types
45 * @brief SWPMI Init Structure definition
49 uint32_t VoltageClass
; /*!< Specifies the SWP Voltage Class.
50 This parameter can be a value of @ref SWPMI_Voltage_Class */
52 uint32_t BitRate
; /*!< Specifies the SWPMI Bitrate.
53 This parameter must be a number between 0 and 255U.
54 The Bitrate is computed using the following formula:
55 SWPMI_freq = SWPMI_clk / (((BitRate) + 1) * 4)
58 uint32_t TxBufferingMode
; /*!< Specifies the transmission buffering mode.
59 This parameter can be a value of @ref SWPMI_Tx_Buffering_Mode */
61 uint32_t RxBufferingMode
; /*!< Specifies the reception buffering mode.
62 This parameter can be a value of @ref SWPMI_Rx_Buffering_Mode */
68 * @brief HAL SWPMI State structures definition
72 HAL_SWPMI_STATE_RESET
= 0x00, /*!< Peripheral Reset state */
73 HAL_SWPMI_STATE_READY
= 0x01, /*!< Peripheral Initialized and ready for use */
74 HAL_SWPMI_STATE_BUSY
= 0x02, /*!< an internal process is ongoing */
75 HAL_SWPMI_STATE_BUSY_TX
= 0x12, /*!< Data Transmission process is ongoing */
76 HAL_SWPMI_STATE_BUSY_RX
= 0x22, /*!< Data Reception process is ongoing */
77 HAL_SWPMI_STATE_BUSY_TX_RX
= 0x32, /*!< Data Transmission and Reception process is ongoing */
78 HAL_SWPMI_STATE_TIMEOUT
= 0x03, /*!< Timeout state */
79 HAL_SWPMI_STATE_ERROR
= 0x04 /*!< Error */
80 } HAL_SWPMI_StateTypeDef
;
83 * @brief SWPMI handle Structure definition
85 #if (USE_HAL_SWPMI_REGISTER_CALLBACKS == 1)
86 typedef struct __SWPMI_HandleTypeDef
89 #endif /* USE_HAL_SWPMI_REGISTER_CALLBACKS */
91 SWPMI_TypeDef
*Instance
; /*!< SWPMI registers base address */
93 SWPMI_InitTypeDef Init
; /*!< SWPMI communication parameters */
95 const uint32_t *pTxBuffPtr
; /*!< Pointer to SWPMI Tx transfer Buffer */
97 uint32_t TxXferSize
; /*!< SWPMI Tx Transfer size */
99 uint32_t TxXferCount
; /*!< SWPMI Tx Transfer Counter */
101 uint32_t *pRxBuffPtr
; /*!< Pointer to SWPMI Rx transfer Buffer */
103 uint32_t RxXferSize
; /*!< SWPMI Rx Transfer size */
105 uint32_t RxXferCount
; /*!< SWPMI Rx Transfer Counter */
107 DMA_HandleTypeDef
*hdmatx
; /*!< SWPMI Tx DMA Handle parameters */
109 DMA_HandleTypeDef
*hdmarx
; /*!< SWPMI Rx DMA Handle parameters */
111 HAL_LockTypeDef Lock
; /*!< SWPMI object */
113 __IO HAL_SWPMI_StateTypeDef State
; /*!< SWPMI communication state */
115 __IO
uint32_t ErrorCode
; /*!< SWPMI Error code */
117 #if (USE_HAL_SWPMI_REGISTER_CALLBACKS == 1)
118 void (*RxCpltCallback
)(struct __SWPMI_HandleTypeDef
*hswpmi
); /*!< SWPMI receive complete callback */
119 void (*RxHalfCpltCallback
)(struct __SWPMI_HandleTypeDef
*hswpmi
); /*!< SWPMI receive half complete callback */
120 void (*TxCpltCallback
)(struct __SWPMI_HandleTypeDef
*hswpmi
); /*!< SWPMI transmit complete callback */
121 void (*TxHalfCpltCallback
)(struct __SWPMI_HandleTypeDef
*hswpmi
); /*!< SWPMI transmit half complete callback */
122 void (*ErrorCallback
)(struct __SWPMI_HandleTypeDef
*hswpmi
); /*!< SWPMI error callback */
123 void (*MspInitCallback
)(struct __SWPMI_HandleTypeDef
*hswpmi
); /*!< SWPMI MSP init callback */
124 void (*MspDeInitCallback
)(struct __SWPMI_HandleTypeDef
*hswpmi
); /*!< SWPMI MSP de-init callback */
125 #endif /* USE_HAL_SWPMI_REGISTER_CALLBACKS */
127 } SWPMI_HandleTypeDef
;
129 #if (USE_HAL_SWPMI_REGISTER_CALLBACKS == 1)
131 * @brief SWPMI callback ID enumeration definition
135 HAL_SWPMI_RX_COMPLETE_CB_ID
= 0x00U
, /*!< SWPMI receive complete callback ID */
136 HAL_SWPMI_RX_HALFCOMPLETE_CB_ID
= 0x01U
, /*!< SWPMI receive half complete callback ID */
137 HAL_SWPMI_TX_COMPLETE_CB_ID
= 0x02U
, /*!< SWPMI transmit complete callback ID */
138 HAL_SWPMI_TX_HALFCOMPLETE_CB_ID
= 0x03U
, /*!< SWPMI transmit half complete callback ID */
139 HAL_SWPMI_ERROR_CB_ID
= 0x04U
, /*!< SWPMI error callback ID */
140 HAL_SWPMI_MSPINIT_CB_ID
= 0x05U
, /*!< SWPMI MSP init callback ID */
141 HAL_SWPMI_MSPDEINIT_CB_ID
= 0x06U
/*!< SWPMI MSP de-init callback ID */
142 } HAL_SWPMI_CallbackIDTypeDef
;
145 * @brief SWPMI callback pointer definition
147 typedef void (*pSWPMI_CallbackTypeDef
)(SWPMI_HandleTypeDef
*hswpmi
);
148 #endif /* USE_HAL_SWPMI_REGISTER_CALLBACKS */
154 /* Exported constants --------------------------------------------------------*/
155 /** @defgroup SWPMI_Exported_Constants SWPMI Exported Constants
160 * @defgroup SWPMI_Error_Code SWPMI Error Code Bitmap
163 #define HAL_SWPMI_ERROR_NONE ((uint32_t)0x00000000) /*!< No error */
164 #define HAL_SWPMI_ERROR_CRC ((uint32_t)0x00000004) /*!< frame error */
165 #define HAL_SWPMI_ERROR_OVR ((uint32_t)0x00000008) /*!< Overrun error */
166 #define HAL_SWPMI_ERROR_UDR ((uint32_t)0x0000000C) /*!< Underrun error */
167 #define HAL_SWPMI_ERROR_DMA ((uint32_t)0x00000010) /*!< DMA transfer error */
168 #define HAL_SWPMI_ERROR_TIMEOUT ((uint32_t)0x00000020) /*!< Transfer timeout */
169 #define HAL_SWPMI_ERROR_TXBEF_TIMEOUT ((uint32_t)0x00000040) /*!< End Tx buffer timeout */
170 #define HAL_SWPMI_ERROR_TRANSCEIVER_NOT_READY ((uint32_t)0x00000080) /*!< Transceiver not ready */
171 #if (USE_HAL_SWPMI_REGISTER_CALLBACKS == 1)
172 #define HAL_SWPMI_ERROR_INVALID_CALLBACK ((uint32_t)0x00000100) /*!< Invalid callback error */
173 #endif /* USE_HAL_SWPMI_REGISTER_CALLBACKS */
178 /** @defgroup SWPMI_Voltage_Class SWPMI Voltage Class
181 #define SWPMI_VOLTAGE_CLASS_C ((uint32_t)0x00000000)
182 #define SWPMI_VOLTAGE_CLASS_B SWPMI_OR_CLASS
187 /** @defgroup SWPMI_Tx_Buffering_Mode SWPMI Tx Buffering Mode
190 #define SWPMI_TX_NO_SOFTWAREBUFFER ((uint32_t)0x00000000)
191 #define SWPMI_TX_SINGLE_SOFTWAREBUFFER ((uint32_t)0x00000000)
192 #define SWPMI_TX_MULTI_SOFTWAREBUFFER SWPMI_CR_TXMODE
197 /** @defgroup SWPMI_Rx_Buffering_Mode SWPMI Rx Buffering Mode
200 #define SWPMI_RX_NO_SOFTWAREBUFFER ((uint32_t)0x00000000)
201 #define SWPMI_RX_SINGLE_SOFTWAREBUFFER ((uint32_t)0x00000000)
202 #define SWPMI_RX_MULTI_SOFTWAREBUFFER SWPMI_CR_RXMODE
207 /** @defgroup SWPMI_Flags SWPMI Status Flags
208 * Elements values convention: 0xXXXXXXXX
209 * - 0xXXXXXXXX : Flag mask in the ISR register
212 #define SWPMI_FLAG_RXBFF SWPMI_ISR_RXBFF
213 #define SWPMI_FLAG_TXBEF SWPMI_ISR_TXBEF
214 #define SWPMI_FLAG_RXBERF SWPMI_ISR_RXBERF
215 #define SWPMI_FLAG_RXOVRF SWPMI_ISR_RXOVRF
216 #define SWPMI_FLAG_TXUNRF SWPMI_ISR_TXUNRF
217 #define SWPMI_FLAG_RXNE SWPMI_ISR_RXNE
218 #define SWPMI_FLAG_TXE SWPMI_ISR_TXE
219 #define SWPMI_FLAG_TCF SWPMI_ISR_TCF
220 #define SWPMI_FLAG_SRF SWPMI_ISR_SRF
221 #define SWPMI_FLAG_SUSP SWPMI_ISR_SUSP
222 #define SWPMI_FLAG_DEACTF SWPMI_ISR_DEACTF
223 #define SWPMI_FLAG_RDYF SWPMI_ISR_RDYF
228 /** @defgroup SWPMI_Interrupt_definition SWPMI Interrupts Definition
229 * Elements values convention: 0xXXXX
230 * - 0xXXXX : Flag mask in the IER register
233 #define SWPMI_IT_RDYIE SWPMI_IER_RDYIE
234 #define SWPMI_IT_SRIE SWPMI_IER_SRIE
235 #define SWPMI_IT_TCIE SWPMI_IER_TCIE
236 #define SWPMI_IT_TIE SWPMI_IER_TIE
237 #define SWPMI_IT_RIE SWPMI_IER_RIE
238 #define SWPMI_IT_TXUNRIE SWPMI_IER_TXUNRIE
239 #define SWPMI_IT_RXOVRIE SWPMI_IER_RXOVRIE
240 #define SWPMI_IT_RXBERIE SWPMI_IER_RXBERIE
241 #define SWPMI_IT_TXBEIE SWPMI_IER_TXBEIE
242 #define SWPMI_IT_RXBFIE SWPMI_IER_RXBFIE
251 /* Exported macros -----------------------------------------------------------*/
252 /** @defgroup SWPMI_Exported_Macros SWPMI Exported Macros
256 /** @brief Reset SWPMI handle state.
257 * @param __HANDLE__ specifies the SWPMI Handle.
260 #if (USE_HAL_SWPMI_REGISTER_CALLBACKS == 1)
261 #define __HAL_SWPMI_RESET_HANDLE_STATE(__HANDLE__) do{ \
262 (__HANDLE__)->State = HAL_SWPMI_STATE_RESET; \
263 (__HANDLE__)->MspInitCallback = NULL; \
264 (__HANDLE__)->MspDeInitCallback = NULL; \
267 #define __HAL_SWPMI_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SWPMI_STATE_RESET)
268 #endif /* USE_HAL_SWPMI_REGISTER_CALLBACKS */
271 * @brief Enable the SWPMI peripheral.
272 * @param __HANDLE__ SWPMI handle
275 #define __HAL_SWPMI_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, SWPMI_CR_SWPACT)
278 * @brief Disable the SWPMI peripheral.
279 * @param __HANDLE__ SWPMI handle
282 #define __HAL_SWPMI_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR, SWPMI_CR_SWPACT)
285 * @brief Enable the SWPMI transceiver.
286 * @param __HANDLE__ SWPMI handle
289 #define __HAL_SWPMI_TRANSCEIVER_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, SWPMI_CR_SWPEN)
292 * @brief Disable the SWPMI transceiver.
293 * @param __HANDLE__ SWPMI handle
296 #define __HAL_SWPMI_TRANSCEIVER_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR, SWPMI_CR_SWPEN)
298 /** @brief Check whether the specified SWPMI flag is set or not.
299 * @param __HANDLE__ specifies the SWPMI Handle.
300 * @param __FLAG__ specifies the flag to check.
301 * This parameter can be one of the following values:
302 * @arg SWPMI_FLAG_RXBFF Receive buffer full flag.
303 * @arg SWPMI_FLAG_TXBEF Transmit buffer empty flag.
304 * @arg SWPMI_FLAG_RXBERF Receive CRC error flag.
305 * @arg SWPMI_FLAG_RXOVRF Receive overrun error flag.
306 * @arg SWPMI_FLAG_TXUNRF Transmit underrun error flag.
307 * @arg SWPMI_FLAG_RXNE Receive data register not empty.
308 * @arg SWPMI_FLAG_TXE Transmit data register empty.
309 * @arg SWPMI_FLAG_TCF Transfer complete flag.
310 * @arg SWPMI_FLAG_SRF Slave resume flag.
311 * @arg SWPMI_FLAG_SUSP SUSPEND flag.
312 * @arg SWPMI_FLAG_DEACTF DEACTIVATED flag.
313 * @arg SWPMI_FLAG_RDYF Transceiver ready flag.
314 * @retval The new state of __FLAG__ (TRUE or FALSE).
316 #define __HAL_SWPMI_GET_FLAG(__HANDLE__, __FLAG__) (READ_BIT((__HANDLE__)->Instance->ISR, (__FLAG__)) == (__FLAG__))
318 /** @brief Clear the specified SWPMI ISR flag.
319 * @param __HANDLE__ specifies the SWPMI Handle.
320 * @param __FLAG__ specifies the flag to clear.
321 * This parameter can be one of the following values:
322 * @arg SWPMI_FLAG_RXBFF Receive buffer full flag.
323 * @arg SWPMI_FLAG_TXBEF Transmit buffer empty flag.
324 * @arg SWPMI_FLAG_RXBERF Receive CRC error flag.
325 * @arg SWPMI_FLAG_RXOVRF Receive overrun error flag.
326 * @arg SWPMI_FLAG_TXUNRF Transmit underrun error flag.
327 * @arg SWPMI_FLAG_TCF Transfer complete flag.
328 * @arg SWPMI_FLAG_SRF Slave resume flag.
329 * @arg SWPMI_FLAG_RDYF Transceiver ready flag.
332 #define __HAL_SWPMI_CLEAR_FLAG(__HANDLE__, __FLAG__) WRITE_REG((__HANDLE__)->Instance->ICR, (__FLAG__))
334 /** @brief Enable the specified SWPMI interrupt.
335 * @param __HANDLE__ specifies the SWPMI Handle.
336 * @param __INTERRUPT__ specifies the SWPMI interrupt source to enable.
337 * This parameter can be one of the following values:
338 * @arg SWPMI_IT_RDYIE Transceiver ready interrupt.
339 * @arg SWPMI_IT_SRIE Slave resume interrupt.
340 * @arg SWPMI_IT_TCIE Transmit complete interrupt.
341 * @arg SWPMI_IT_TIE Transmit interrupt.
342 * @arg SWPMI_IT_RIE Receive interrupt.
343 * @arg SWPMI_IT_TXUNRIE Transmit underrun error interrupt.
344 * @arg SWPMI_IT_RXOVRIE Receive overrun error interrupt.
345 * @arg SWPMI_IT_RXBEIE Receive CRC error interrupt.
346 * @arg SWPMI_IT_TXBEIE Transmit buffer empty interrupt.
347 * @arg SWPMI_IT_RXBFIE Receive buffer full interrupt.
350 #define __HAL_SWPMI_ENABLE_IT(__HANDLE__, __INTERRUPT__) SET_BIT((__HANDLE__)->Instance->IER, (__INTERRUPT__))
352 /** @brief Disable the specified SWPMI interrupt.
353 * @param __HANDLE__ specifies the SWPMI Handle.
354 * @param __INTERRUPT__ specifies the SWPMI interrupt source to disable.
355 * This parameter can be one of the following values:
356 * @arg SWPMI_IT_RDYIE Transceiver ready interrupt.
357 * @arg SWPMI_IT_SRIE Slave resume interrupt.
358 * @arg SWPMI_IT_TCIE Transmit complete interrupt.
359 * @arg SWPMI_IT_TIE Transmit interrupt.
360 * @arg SWPMI_IT_RIE Receive interrupt.
361 * @arg SWPMI_IT_TXUNRIE Transmit underrun error interrupt.
362 * @arg SWPMI_IT_RXOVRIE Receive overrun error interrupt.
363 * @arg SWPMI_IT_RXBEIE Receive CRC error interrupt.
364 * @arg SWPMI_IT_TXBEIE Transmit buffer empty interrupt.
365 * @arg SWPMI_IT_RXBFIE Receive buffer full interrupt.
368 #define __HAL_SWPMI_DISABLE_IT(__HANDLE__, __INTERRUPT__) CLEAR_BIT((__HANDLE__)->Instance->IER, (__INTERRUPT__))
370 /** @brief Check whether the specified SWPMI interrupt has occurred or not.
371 * @param __HANDLE__ specifies the SWPMI Handle.
372 * @param __IT__ specifies the SWPMI interrupt to check.
373 * This parameter can be one of the following values:
374 * @arg SWPMI_IT_RDYIE Transceiver ready interrupt.
375 * @arg SWPMI_IT_SRIE Slave resume interrupt.
376 * @arg SWPMI_IT_TCIE Transmit complete interrupt.
377 * @arg SWPMI_IT_TIE Transmit interrupt.
378 * @arg SWPMI_IT_RIE Receive interrupt.
379 * @arg SWPMI_IT_TXUNRIE Transmit underrun error interrupt.
380 * @arg SWPMI_IT_RXOVRIE Receive overrun error interrupt.
381 * @arg SWPMI_IT_RXBERIE Receive CRC error interrupt.
382 * @arg SWPMI_IT_TXBEIE Transmit buffer empty interrupt.
383 * @arg SWPMI_IT_RXBFIE Receive buffer full interrupt.
384 * @retval The new state of __IT__ (TRUE or FALSE).
386 #define __HAL_SWPMI_GET_IT(__HANDLE__, __IT__) (READ_BIT((__HANDLE__)->Instance->ISR,(__IT__)) == (__IT__))
388 /** @brief Check whether the specified SWPMI interrupt source is enabled or not.
389 * @param __HANDLE__ specifies the SWPMI Handle.
390 * @param __IT__ specifies the SWPMI interrupt source to check.
391 * This parameter can be one of the following values:
392 * @arg SWPMI_IT_RDYIE Transceiver ready interrupt.
393 * @arg SWPMI_IT_SRIE Slave resume interrupt.
394 * @arg SWPMI_IT_TCIE Transmit complete interrupt.
395 * @arg SWPMI_IT_TIE Transmit interrupt.
396 * @arg SWPMI_IT_RIE Receive interrupt.
397 * @arg SWPMI_IT_TXUNRIE Transmit underrun error interrupt.
398 * @arg SWPMI_IT_RXOVRIE Receive overrun error interrupt.
399 * @arg SWPMI_IT_RXBERIE Receive CRC error interrupt.
400 * @arg SWPMI_IT_TXBEIE Transmit buffer empty interrupt.
401 * @arg SWPMI_IT_RXBFIE Receive buffer full interrupt.
402 * @retval The new state of __IT__ (TRUE or FALSE).
404 #define __HAL_SWPMI_GET_IT_SOURCE(__HANDLE__, __IT__) ((READ_BIT((__HANDLE__)->Instance->IER, (__IT__))\
405 == (__IT__)) ? SET : RESET)
411 /* Exported functions --------------------------------------------------------*/
412 /** @defgroup SWPMI_Exported_Functions SWPMI Exported Functions
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 /* USE_HAL_SWPMI_REGISTER_CALLBACKS */
430 /* IO operation functions *****************************************************/
431 HAL_StatusTypeDef
HAL_SWPMI_Transmit(SWPMI_HandleTypeDef
*hswpmi
, const uint32_t *pData
, uint16_t Size
,
433 HAL_StatusTypeDef
HAL_SWPMI_Receive(SWPMI_HandleTypeDef
*hswpmi
, uint32_t *pData
, uint16_t Size
, uint32_t Timeout
);
434 HAL_StatusTypeDef
HAL_SWPMI_Transmit_IT(SWPMI_HandleTypeDef
*hswpmi
, const uint32_t *pData
, uint16_t Size
);
435 HAL_StatusTypeDef
HAL_SWPMI_Receive_IT(SWPMI_HandleTypeDef
*hswpmi
, uint32_t *pData
, uint16_t Size
);
436 HAL_StatusTypeDef
HAL_SWPMI_Transmit_DMA(SWPMI_HandleTypeDef
*hswpmi
, const uint32_t *pData
, uint16_t Size
);
437 HAL_StatusTypeDef
HAL_SWPMI_Receive_DMA(SWPMI_HandleTypeDef
*hswpmi
, uint32_t *pData
, uint16_t Size
);
438 HAL_StatusTypeDef
HAL_SWPMI_DMAStop(SWPMI_HandleTypeDef
*hswpmi
);
439 HAL_StatusTypeDef
HAL_SWPMI_EnableLoopback(SWPMI_HandleTypeDef
*hswpmi
);
440 HAL_StatusTypeDef
HAL_SWPMI_DisableLoopback(SWPMI_HandleTypeDef
*hswpmi
);
441 void HAL_SWPMI_IRQHandler(SWPMI_HandleTypeDef
*hswpmi
);
442 void HAL_SWPMI_TxCpltCallback(SWPMI_HandleTypeDef
*hswpmi
);
443 void HAL_SWPMI_TxHalfCpltCallback(SWPMI_HandleTypeDef
*hswpmi
);
444 void HAL_SWPMI_RxCpltCallback(SWPMI_HandleTypeDef
*hswpmi
);
445 void HAL_SWPMI_RxHalfCpltCallback(SWPMI_HandleTypeDef
*hswpmi
);
446 void HAL_SWPMI_ErrorCallback(SWPMI_HandleTypeDef
*hswpmi
);
448 /* Peripheral Control and State functions ************************************/
449 HAL_SWPMI_StateTypeDef
HAL_SWPMI_GetState(const SWPMI_HandleTypeDef
*hswpmi
);
450 uint32_t HAL_SWPMI_GetError(const SWPMI_HandleTypeDef
*hswpmi
);
456 /* Private types -------------------------------------------------------------*/
457 /** @defgroup SWPMI_Private_Types SWPMI Private Types
465 /* Private variables ---------------------------------------------------------*/
466 /** @defgroup SWPMI_Private_Variables SWPMI Private Variables
474 /* Private constants ---------------------------------------------------------*/
475 /** @defgroup SWPMI_Private_Constants SWPMI Private Constants
483 /* Private macros ------------------------------------------------------------*/
484 /** @defgroup SWPMI_Private_Macros SWPMI Private Macros
489 #define IS_SWPMI_VOLTAGE_CLASS(__CLASS__) (((__CLASS__) == SWPMI_VOLTAGE_CLASS_C) || \
490 ((__CLASS__) == SWPMI_VOLTAGE_CLASS_B))
492 #define IS_SWPMI_BITRATE_VALUE(__VALUE__) (((__VALUE__) <= 255U))
495 #define IS_SWPMI_TX_BUFFERING_MODE(__MODE__) (((__MODE__) == SWPMI_TX_NO_SOFTWAREBUFFER) || \
496 ((__MODE__) == SWPMI_TX_MULTI_SOFTWAREBUFFER))
499 #define IS_SWPMI_RX_BUFFERING_MODE(__MODE__) (((__MODE__) == SWPMI_RX_NO_SOFTWAREBUFFER) || \
500 ((__MODE__) == SWPMI_RX_MULTI_SOFTWAREBUFFER))
519 #endif /* STM32H7xx_HAL_SWPMI_H */