Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:36

0001 /**
0002   ******************************************************************************
0003   * @file    stm32h7xx_hal_pssi.h
0004   * @author  MCD Application Team
0005   * @brief   Header file of PSSI HAL module.
0006   ******************************************************************************
0007   * @attention
0008   *
0009   * Copyright (c) 2019 STMicroelectronics.
0010   * All rights reserved.
0011   *
0012   * This software is licensed under terms that can be found in the LICENSE file
0013   * in the root directory of this software component.
0014   * If no LICENSE file comes with this software, it is provided AS-IS.
0015   *
0016   ******************************************************************************
0017   */
0018 
0019 /* Define to prevent recursive inclusion -------------------------------------*/
0020 #ifndef STM32H7xx_HAL_PSSI_H
0021 #define STM32H7xx_HAL_PSSI_H
0022 
0023 #ifdef __cplusplus
0024 extern "C" {
0025 #endif
0026 
0027 /* Includes ------------------------------------------------------------------*/
0028 #include "stm32h7xx_hal_def.h"
0029 
0030 /** @addtogroup STM32H7xx_HAL_Driver
0031   * @{
0032   */
0033 #if defined(PSSI)
0034 
0035 #ifndef USE_HAL_PSSI_REGISTER_CALLBACKS
0036 /* For backward compatibility, if USE_HAL_PSSI_REGISTER_CALLBACKS not defined, define it to 1*/
0037 #define USE_HAL_PSSI_REGISTER_CALLBACKS 0U
0038 #endif /* USE_HAL_PSSI_REGISTER_CALLBACKS */
0039 
0040 /** @addtogroup PSSI PSSI
0041   * @brief PSSI HAL module driver
0042   * @{
0043   */
0044 
0045 /* Exported types ------------------------------------------------------------*/
0046 /** @defgroup PSSI_Exported_Types PSSI Exported Types
0047   * @ingroup RTEMSBSPsARMSTM32H7
0048   * @{
0049   */
0050 
0051 
0052 /**
0053   * @brief PSSI Init structure definition
0054   */
0055 typedef struct
0056 {
0057   uint32_t  DataWidth;          /* !< Configures the data width.
0058                                       This parameter can be a value of @ref PSSI_DATA_WIDTH. */
0059   uint32_t  BusWidth;           /* !< Configures the parallel bus width.
0060                                       This parameter can be a value of @ref PSSI_BUS_WIDTH. */
0061   uint32_t  ControlSignal;      /* !< Configures Data enable and Data ready.
0062                                       This parameter can be a value of @ref ControlSignal_Configuration. */
0063   uint32_t  ClockPolarity;      /* !< Configures the PSSI Input Clock polarity.
0064                                       This parameter can be a value of @ref Clock_Polarity. */
0065   uint32_t  DataEnablePolarity; /* !< Configures the PSSI Data Enable polarity.
0066                                       This parameter can be a value of @ref Data_Enable_Polarity. */
0067   uint32_t  ReadyPolarity;      /* !< Configures the PSSI Ready polarity.
0068                                       This parameter can be a value of @ref Ready_Polarity. */
0069 
0070 } PSSI_InitTypeDef;
0071 
0072 
0073 /**
0074   * @brief  HAL PSSI State structures definition
0075   */
0076 typedef enum
0077 {
0078   HAL_PSSI_STATE_RESET   = 0x00U, /* !< PSSI not yet initialized or disabled     */
0079   HAL_PSSI_STATE_READY   = 0x01U, /* !< Peripheral initialized and ready for use */
0080   HAL_PSSI_STATE_BUSY    = 0x02U, /* !< An internal process is ongoing           */
0081   HAL_PSSI_STATE_BUSY_TX = 0x03U, /* !< Transmit process is ongoing              */
0082   HAL_PSSI_STATE_BUSY_RX = 0x04U, /* !< Receive process is ongoing               */
0083   HAL_PSSI_STATE_TIMEOUT = 0x05U, /* !< Timeout state                            */
0084   HAL_PSSI_STATE_ERROR   = 0x06U, /* !< PSSI state error                         */
0085   HAL_PSSI_STATE_ABORT   = 0x07U, /* !< PSSI process is aborted                  */
0086 
0087 } HAL_PSSI_StateTypeDef;
0088 
0089 /**
0090   * @brief  PSSI handle Structure definition
0091   */
0092 #if (USE_HAL_PSSI_REGISTER_CALLBACKS == 1)
0093 typedef struct __PSSI_HandleTypeDef
0094 #else
0095 typedef struct
0096 #endif /* USE_HAL_PSSI_REGISTER_CALLBACKS */
0097 {
0098   PSSI_TypeDef         *Instance;    /*!< PSSI register base address.    */
0099   PSSI_InitTypeDef      Init;        /*!< PSSI Initialization Structure. */
0100   uint32_t             *pBuffPtr;    /*!< PSSI Data buffer.              */
0101   uint32_t              XferCount;   /*!< PSSI transfer count            */
0102   uint32_t              XferSize;    /*!< PSSI  transfer size            */
0103 #if defined(HAL_DMA_MODULE_ENABLED)
0104   DMA_HandleTypeDef    *hdmatx;      /*!< PSSI Tx DMA Handle parameters  */
0105   DMA_HandleTypeDef    *hdmarx;      /*!< PSSI Rx DMA Handle parameters  */
0106 #endif /*HAL_DMA_MODULE_ENABLED*/
0107 
0108 #if (USE_HAL_PSSI_REGISTER_CALLBACKS == 1)
0109   void (* TxCpltCallback)(struct __PSSI_HandleTypeDef *hpssi);    /*!< PSSI transfer complete callback. */
0110   void (* RxCpltCallback)(struct __PSSI_HandleTypeDef *hpssi);    /*!< PSSI transfer complete callback. */
0111   void (* ErrorCallback)(struct __PSSI_HandleTypeDef *hpssi);     /*!< PSSI transfer complete callback. */
0112   void (* AbortCpltCallback)(struct __PSSI_HandleTypeDef *hpssi); /*!< PSSI transfer error callback.    */
0113 
0114   void (* MspInitCallback)(struct __PSSI_HandleTypeDef *hpssi);   /*!< PSSI Msp Init callback.          */
0115   void (* MspDeInitCallback)(struct __PSSI_HandleTypeDef *hpssi); /*!< PSSI Msp DeInit callback.        */
0116 #endif /* USE_HAL_PSSI_REGISTER_CALLBACKS */
0117 
0118   HAL_LockTypeDef             Lock;                               /*!< PSSI lock.                       */
0119   __IO HAL_PSSI_StateTypeDef State;                               /*!< PSSI transfer state.             */
0120   __IO uint32_t               ErrorCode;                          /*!< PSSI error code.                 */
0121 
0122 } PSSI_HandleTypeDef;
0123 
0124 #if (USE_HAL_PSSI_REGISTER_CALLBACKS == 1)
0125 /**
0126   * @brief  HAL PSSI Callback pointer definition
0127   */
0128 typedef  void (*pPSSI_CallbackTypeDef)(PSSI_HandleTypeDef *hpssi);  /*!< Pointer to a PSSI common callback function */
0129 
0130 /**
0131   * @brief  HAL PSSI Callback ID enumeration definition
0132   */
0133 typedef enum
0134 {
0135   HAL_PSSI_TX_COMPLETE_CB_ID = 0x00U, /*!< PSSI Tx Transfer completed callback ID  */
0136   HAL_PSSI_RX_COMPLETE_CB_ID = 0x01U, /*!< PSSI Rx Transfer completed callback ID  */
0137   HAL_PSSI_ERROR_CB_ID       = 0x03U, /*!< PSSI Error callback ID                  */
0138   HAL_PSSI_ABORT_CB_ID       = 0x04U, /*!< PSSI Abort callback ID                  */
0139 
0140   HAL_PSSI_MSPINIT_CB_ID     = 0x05U, /*!< PSSI Msp Init callback ID               */
0141   HAL_PSSI_MSPDEINIT_CB_ID   = 0x06U  /*!< PSSI Msp DeInit callback ID             */
0142 
0143 } HAL_PSSI_CallbackIDTypeDef;
0144 #endif /* USE_HAL_PSSI_REGISTER_CALLBACKS */
0145 
0146 /**
0147   * @}
0148   */
0149 
0150 /* Exported constants --------------------------------------------------------*/
0151 /** @defgroup PSSI_Exported_Constants PSSI Exported Constants
0152   * @ingroup RTEMSBSPsARMSTM32H7
0153   * @{
0154   */
0155 
0156 /** @defgroup PSSI_Error_Code PSSI Error Code
0157   * @ingroup RTEMSBSPsARMSTM32H7
0158   * @{
0159   */
0160 #define HAL_PSSI_ERROR_NONE             0x00000000U /*!< No error                */
0161 #define HAL_PSSI_ERROR_NOT_SUPPORTED    0x00000001U /*!< Not supported operation */
0162 #define HAL_PSSI_ERROR_UNDER_RUN        0x00000002U /*!< FIFO Under-run error    */
0163 #define HAL_PSSI_ERROR_OVER_RUN         0x00000004U /*!< FIFO Over-run  error    */
0164 #define HAL_PSSI_ERROR_DMA              0x00000008U /*!< Dma     error           */
0165 #define HAL_PSSI_ERROR_TIMEOUT          0x00000010U /*!< Timeout error           */
0166 #if (USE_HAL_PSSI_REGISTER_CALLBACKS == 1)
0167 #define HAL_PSSI_ERROR_INVALID_CALLBACK 0x00000020U /*!< Invalid callback error  */
0168 #endif /* USE_HAL_PSSI_REGISTER_CALLBACKS */
0169 
0170 /**
0171   * @}
0172   */
0173 
0174 /** @defgroup PSSI_DATA_WIDTH PSSI Data Width
0175   * @ingroup RTEMSBSPsARMSTM32H7
0176   * @{
0177   */
0178 
0179 #define HAL_PSSI_8BITS                  0x00000000U   /*!<  8 Bits  */
0180 #define HAL_PSSI_16BITS                 0x00000001U   /*!< 16 Bits  */
0181 #define HAL_PSSI_32BITS                 0x00000002U   /*!< 32 Bits  */
0182 /**
0183   * @}
0184   */
0185 
0186 /** @defgroup PSSI_BUS_WIDTH PSSI Bus Width
0187   * @ingroup RTEMSBSPsARMSTM32H7
0188   * @{
0189   */
0190 
0191 #define HAL_PSSI_8LINES                 0x00000000U   /*!< 8 data lines  */
0192 #define HAL_PSSI_16LINES                PSSI_CR_EDM   /*!< 16 data lines */
0193 /**
0194   * @}
0195   */
0196 /** @defgroup PSSI_MODE PSSI mode
0197   * @ingroup RTEMSBSPsARMSTM32H7
0198   * @{
0199   */
0200 #define HAL_PSSI_UNIDIRECTIONAL         0x00000000U /*!< Uni-directional mode */
0201 #define HAL_PSSI_BIDIRECTIONAL          0x00000001U /*!< Bi-directional mode  */
0202 /**
0203   * @}
0204   */
0205 
0206 /** @defgroup ControlSignal_Configuration ControlSignal Configuration
0207   * @ingroup RTEMSBSPsARMSTM32H7
0208   * @{
0209   */
0210 #define HAL_PSSI_DE_RDY_DISABLE           (0x0U << PSSI_CR_DERDYCFG_Pos) /*!< Neither DE nor RDY are enabled */
0211 #define HAL_PSSI_RDY_ENABLE               (0x1U << PSSI_CR_DERDYCFG_Pos) /*!< Only RDY enabled */
0212 #define HAL_PSSI_DE_ENABLE                (0x2U << PSSI_CR_DERDYCFG_Pos) /*!< Only DE enabled */
0213 #define HAL_PSSI_DE_RDY_ALT_ENABLE        (0x3U << PSSI_CR_DERDYCFG_Pos) /*!< Both RDY and DE alternate functions enabled */
0214 #define HAL_PSSI_MAP_RDY_BIDIR_ENABLE     (0x4U << PSSI_CR_DERDYCFG_Pos) /*!< Bi-directional on RDY pin */
0215 #define HAL_PSSI_RDY_MAP_ENABLE           (0x5U << PSSI_CR_DERDYCFG_Pos) /*!< Only RDY enabled, mapped to DE pin */
0216 #define HAL_PSSI_DE_MAP_ENABLE            (0x6U << PSSI_CR_DERDYCFG_Pos) /*!< Only DE enabled, mapped to RDY pin */
0217 #define HAL_PSSI_MAP_DE_BIDIR_ENABLE      (0x7U << PSSI_CR_DERDYCFG_Pos) /*!< Bi-directional on DE pin */
0218 
0219 /**
0220   * @}
0221   */
0222 
0223 
0224 /** @defgroup Data_Enable_Polarity Data Enable Polarity
0225   * @ingroup RTEMSBSPsARMSTM32H7
0226   * @{
0227   */
0228 #define HAL_PSSI_DEPOL_ACTIVE_LOW         0x0U            /*!< Active Low */
0229 #define HAL_PSSI_DEPOL_ACTIVE_HIGH        PSSI_CR_DEPOL   /*!< Active High */
0230 /**
0231   * @}
0232   */
0233 /** @defgroup Ready_Polarity Ready Polarity
0234   * @ingroup RTEMSBSPsARMSTM32H7
0235   * @{
0236   */
0237 #define HAL_PSSI_RDYPOL_ACTIVE_LOW        0x0U            /*!< Active Low */
0238 #define HAL_PSSI_RDYPOL_ACTIVE_HIGH       PSSI_CR_RDYPOL  /*!< Active High */
0239 /**
0240   * @}
0241   */
0242 
0243 /** @defgroup Clock_Polarity Clock Polarity
0244   * @ingroup RTEMSBSPsARMSTM32H7
0245   * @{
0246   */
0247 #define HAL_PSSI_FALLING_EDGE             0x0U            /*!< Fallling Edge */
0248 #define HAL_PSSI_RISING_EDGE              0x1U            /*!< Rising Edge */
0249 /**
0250   * @}
0251   */
0252 
0253 
0254 /** @defgroup PSSI_DEFINITION PSSI definitions
0255   * @ingroup RTEMSBSPsARMSTM32H7
0256   * @{
0257   */
0258 
0259 #define PSSI_MAX_NBYTE_SIZE         0x10000U         /* 64 KB */
0260 #define PSSI_TIMEOUT_TRANSMIT       0x0000FFFFU      /*!< Timeout Value   */
0261 
0262 #define PSSI_CR_OUTEN_INPUT         0x00000000U      /*!< Input Mode      */
0263 #define PSSI_CR_OUTEN_OUTPUT        PSSI_CR_OUTEN    /*!< Output Mode     */
0264 
0265 #define PSSI_CR_DMA_ENABLE          PSSI_CR_DMAEN    /*!< DMA Mode Enable */
0266 #define PSSI_CR_DMA_DISABLE         (~PSSI_CR_DMAEN) /*!< DMA Mode Disable*/
0267 
0268 #define PSSI_CR_16BITS              PSSI_CR_EDM      /*!< 16 Lines Mode   */
0269 #define PSSI_CR_8BITS               (~PSSI_CR_EDM)   /*!< 8 Lines Mode    */
0270 
0271 #define PSSI_FLAG_RTT1B             PSSI_SR_RTT1B    /*!< 1 Byte Fifo Flag */
0272 #define PSSI_FLAG_RTT4B             PSSI_SR_RTT4B    /*!< 4 Bytes Fifo Flag*/
0273 
0274 
0275 
0276 /**
0277   * @}
0278   */
0279 
0280 /** @defgroup PSSI_Interrupts PSSI Interrupts
0281   * @ingroup RTEMSBSPsARMSTM32H7
0282   * @{
0283   */
0284 
0285 #define PSSI_FLAG_OVR_RIS            PSSI_RIS_OVR_RIS     /*!< Overrun, Underrun errors flag */
0286 #define PSSI_FLAG_MASK               PSSI_RIS_OVR_RIS_Msk /*!< Overrun, Underrun errors Mask */
0287 #define PSSI_FLAG_OVR_MIS            PSSI_MIS_OVR_MIS     /*!< Overrun, Underrun masked errors flag */
0288 /**
0289   * @}
0290   */
0291 
0292 
0293 
0294 /**
0295   * @}
0296   */
0297 /* Exported macros ------------------------------------------------------------*/
0298 /** @defgroup PSSI_Exported_Macros PSSI Exported Macros
0299   * @ingroup RTEMSBSPsARMSTM32H7
0300   * @{
0301   */
0302 
0303 /** @brief Reset PSSI handle state
0304   * @param  __HANDLE__ specifies the PSSI handle.
0305   * @retval None
0306   */
0307 #if (USE_HAL_PSSI_REGISTER_CALLBACKS == 1)
0308 #define HAL_PSSI_RESET_HANDLE_STATE(__HANDLE__) do{                                            \
0309                                                       (__HANDLE__)->State = HAL_PSSI_STATE_RESET;\
0310                                                       (__HANDLE__)->MspInitCallback = NULL;       \
0311                                                       (__HANDLE__)->MspDeInitCallback = NULL;     \
0312                                                      }while(0)
0313 #else
0314 #define HAL_PSSI_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_PSSI_STATE_RESET)
0315 #endif /* USE_HAL_PSSI_REGISTER_CALLBACKS */
0316 
0317 
0318 /**
0319   * @brief  Enable the PSSI.
0320   * @param  __HANDLE__ PSSI handle
0321   * @retval None.
0322   */
0323 #define HAL_PSSI_ENABLE(__HANDLE__)        ((__HANDLE__)->Instance->CR |= PSSI_CR_ENABLE)
0324 /**
0325   * @brief  Disable the PSSI.
0326   * @param  __HANDLE__ PSSI handle
0327   * @retval None.
0328   */
0329 #define HAL_PSSI_DISABLE(__HANDLE__)        ((__HANDLE__)->Instance->CR &= (~PSSI_CR_ENABLE))
0330 
0331 /* PSSI pripheral STATUS */
0332 /**
0333   * @brief  Get the PSSI pending flags.
0334   * @param  __HANDLE__ PSSI handle
0335   * @param  __FLAG__ flag to check.
0336   *          This parameter can be any combination of the following values:
0337   *            @arg PSSI_FLAG_RTT1B:  FIFO is ready to transfer one byte
0338   *            @arg PSSI_FLAG_RTT4B: FIFO is ready to transfer four bytes
0339   * @retval The state of FLAG.
0340   */
0341 
0342 #define HAL_PSSI_GET_STATUS(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR & (__FLAG__))
0343 
0344 
0345 
0346 /* Interrupt & Flag management */
0347 /**
0348   * @brief  Get the PSSI pending flags.
0349   * @param  __HANDLE__ PSSI handle
0350   * @param  __FLAG__ flag to check.
0351   *          This parameter can be any combination of the following values:
0352   *            @arg PSSI_FLAG_OVR_RIS: Data Buffer overrun/underrun error flag
0353   * @retval The state of FLAG.
0354   */
0355 #define HAL_PSSI_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->RIS & (__FLAG__))
0356 
0357 /**
0358   * @brief  Clear the PSSI pending flags.
0359   * @param  __HANDLE__ PSSI handle
0360   * @param  __FLAG__ specifies the flag to clear.
0361   *          This parameter can be any combination of the following values:
0362   *            @arg PSSI_FLAG_OVR_RIS: Data Buffer overrun/underrun error flag
0363   * @retval None
0364   */
0365 #define HAL_PSSI_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))
0366 
0367 /**
0368   * @brief  Enable the specified PSSI interrupts.
0369   * @param  __HANDLE__ PSSI handle
0370   * @param __INTERRUPT__ specifies the PSSI interrupt sources to be enabled.
0371   *          This parameter can be any combination of the following values:
0372   *            @arg PSSI_FLAG_OVR_RIS: Configuration error mask
0373   * @retval None
0374   */
0375 #define HAL_PSSI_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER |= (__INTERRUPT__))
0376 
0377 /**
0378   * @brief  Disable the specified PSSI interrupts.
0379   * @param  __HANDLE__ PSSI handle
0380   * @param __INTERRUPT__ specifies the PSSI interrupt sources to be disabled.
0381   *          This parameter can be any combination of the following values:
0382   *            @arg PSSI_IT_OVR_IE: Configuration error mask
0383   * @retval None
0384   */
0385 #define HAL_PSSI_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER &= ~(__INTERRUPT__))
0386 
0387 /**
0388   * @brief  Check whether the specified PSSI interrupt source is enabled or not.
0389   * @param  __HANDLE__ PSSI handle
0390   * @param  __INTERRUPT__ specifies the PSSI interrupt source to check.
0391   *          This parameter can be one of the following values:
0392   *            @arg PSSI_IT_OVR_IE: Data Buffer overrun/underrun error interrupt mask
0393   * @retval The state of INTERRUPT source.
0394   */
0395 #define HAL_PSSI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER & (__INTERRUPT__))
0396 
0397 
0398 /**
0399   * @brief  Check whether the PSSI Control signal is valid.
0400   * @param  __CONTROL__ Control signals configuration
0401   * @retval Valid or not.
0402   */
0403 
0404 #define IS_PSSI_CONTROL_SIGNAL(__CONTROL__) (((__CONTROL__) == HAL_PSSI_DE_RDY_DISABLE        ) || \
0405                                              ((__CONTROL__) == HAL_PSSI_RDY_ENABLE            ) || \
0406                                              ((__CONTROL__) == HAL_PSSI_DE_ENABLE             ) || \
0407                                              ((__CONTROL__) == HAL_PSSI_DE_RDY_ALT_ENABLE     ) || \
0408                                              ((__CONTROL__) == HAL_PSSI_MAP_RDY_BIDIR_ENABLE  ) || \
0409                                              ((__CONTROL__) == HAL_PSSI_RDY_MAP_ENABLE        ) || \
0410                                              ((__CONTROL__) == HAL_PSSI_DE_MAP_ENABLE         ) || \
0411                                              ((__CONTROL__) == HAL_PSSI_MAP_DE_BIDIR_ENABLE   ))
0412 
0413 
0414 
0415 /**
0416   * @brief  Check whether the PSSI Bus Width is valid.
0417   * @param  __BUSWIDTH__ PSSI Bush width
0418   * @retval Valid or not.
0419   */
0420 
0421 #define IS_PSSI_BUSWIDTH(__BUSWIDTH__) (((__BUSWIDTH__) == HAL_PSSI_8LINES    ) || \
0422                                         ((__BUSWIDTH__) == HAL_PSSI_16LINES   ))
0423 
0424 /**
0425 
0426   * @brief  Check whether the PSSI Clock Polarity is valid.
0427   * @param  __CLOCKPOL__ PSSI Clock Polarity
0428   * @retval Valid or not.
0429   */
0430 
0431 #define IS_PSSI_CLOCK_POLARITY(__CLOCKPOL__) (((__CLOCKPOL__) == HAL_PSSI_FALLING_EDGE   ) || \
0432                                               ((__CLOCKPOL__) == HAL_PSSI_RISING_EDGE    ))
0433 
0434 
0435 /**
0436   * @brief  Check whether the PSSI Data Enable Polarity is valid.
0437   * @param  __DEPOL__ PSSI DE Polarity
0438   * @retval Valid or not.
0439   */
0440 
0441 #define IS_PSSI_DE_POLARITY(__DEPOL__) (((__DEPOL__) == HAL_PSSI_DEPOL_ACTIVE_LOW    ) || \
0442                                         ((__DEPOL__) == HAL_PSSI_DEPOL_ACTIVE_HIGH   ))
0443 
0444 /**
0445   * @brief  Check whether the PSSI Ready Polarity is valid.
0446   * @param  __RDYPOL__ PSSI RDY Polarity
0447   * @retval Valid or not.
0448   */
0449 
0450 #define IS_PSSI_RDY_POLARITY(__RDYPOL__) (((__RDYPOL__) == HAL_PSSI_RDYPOL_ACTIVE_LOW   ) || \
0451                                           ((__RDYPOL__) == HAL_PSSI_RDYPOL_ACTIVE_HIGH   ))
0452 
0453 /**
0454   * @}
0455   */
0456 
0457 
0458 /* Exported functions --------------------------------------------------------*/
0459 /** @addtogroup PSSI_Exported_Functions PSSI Exported Functions
0460   * @{
0461   */
0462 
0463 /** @addtogroup PSSI_Exported_Functions_Group1 Initialization and de-initialization functions
0464   * @{
0465   */
0466 
0467 /* Initialization and de-initialization functions *******************************/
0468 HAL_StatusTypeDef HAL_PSSI_Init(PSSI_HandleTypeDef *hpssi);
0469 HAL_StatusTypeDef HAL_PSSI_DeInit(PSSI_HandleTypeDef *hpssi);
0470 void              HAL_PSSI_MspInit(PSSI_HandleTypeDef *hpssi);
0471 void              HAL_PSSI_MspDeInit(PSSI_HandleTypeDef *hpssi);
0472 /* Callbacks Register/UnRegister functions  ***********************************/
0473 #if (USE_HAL_PSSI_REGISTER_CALLBACKS == 1)
0474 HAL_StatusTypeDef HAL_PSSI_RegisterCallback(PSSI_HandleTypeDef *hpssi, HAL_PSSI_CallbackIDTypeDef CallbackID,
0475                                             pPSSI_CallbackTypeDef pCallback);
0476 HAL_StatusTypeDef HAL_PSSI_UnRegisterCallback(PSSI_HandleTypeDef *hpssi, HAL_PSSI_CallbackIDTypeDef CallbackID);
0477 #endif /* USE_HAL_PSSI_REGISTER_CALLBACKS */
0478 
0479 /**
0480   * @}
0481   */
0482 
0483 
0484 /** @addtogroup PSSI_Exported_Functions_Group2 Input and Output operation functions
0485   * @{
0486   */
0487 
0488 /* IO operation functions *******************************************************/
0489 HAL_StatusTypeDef HAL_PSSI_Transmit(PSSI_HandleTypeDef *hpssi, uint8_t *pData, uint32_t Size, uint32_t Timeout);
0490 HAL_StatusTypeDef HAL_PSSI_Receive(PSSI_HandleTypeDef *hpssi, uint8_t *pData, uint32_t Size, uint32_t Timeout);
0491 #if defined(HAL_DMA_MODULE_ENABLED)
0492 HAL_StatusTypeDef HAL_PSSI_Transmit_DMA(PSSI_HandleTypeDef *hpssi, uint32_t *pData, uint32_t Size);
0493 HAL_StatusTypeDef HAL_PSSI_Receive_DMA(PSSI_HandleTypeDef *hpssi, uint32_t *pData, uint32_t Size);
0494 HAL_StatusTypeDef HAL_PSSI_Abort_DMA(PSSI_HandleTypeDef *hpssi);
0495 #endif /*HAL_DMA_MODULE_ENABLED*/
0496 
0497 /**
0498   * @}
0499   */
0500 
0501 /** @addtogroup PSSI_Exported_Functions_Group3 Peripheral State and Error functions
0502   * @{
0503   */
0504 
0505 /* Peripheral State functions ***************************************************/
0506 HAL_PSSI_StateTypeDef HAL_PSSI_GetState(const PSSI_HandleTypeDef *hpssi);
0507 uint32_t              HAL_PSSI_GetError(const PSSI_HandleTypeDef *hpssi);
0508 
0509 /**
0510   * @}
0511   */
0512 
0513 /** @addtogroup PSSI_IRQ_Handler_and_Callbacks IRQ Handler and Callbacks
0514   * @{
0515   */
0516 
0517 void HAL_PSSI_IRQHandler(PSSI_HandleTypeDef *hpssi);
0518 void HAL_PSSI_TxCpltCallback(PSSI_HandleTypeDef *hpssi);
0519 void HAL_PSSI_RxCpltCallback(PSSI_HandleTypeDef *hpssi);
0520 void HAL_PSSI_ErrorCallback(PSSI_HandleTypeDef *hpssi);
0521 void HAL_PSSI_AbortCpltCallback(PSSI_HandleTypeDef *hpssi);
0522 
0523 /**
0524   * @}
0525   */
0526 
0527 
0528 
0529 /**
0530   * @}
0531   */
0532 
0533 /* Private constants ---------------------------------------------------------*/
0534 
0535 
0536 /* Private macros ------------------------------------------------------------*/
0537 
0538 
0539 /**
0540   * @}
0541   */
0542 #endif /* PSSI */
0543 
0544 /**
0545   * @}
0546   */
0547 
0548 
0549 #ifdef __cplusplus
0550 }
0551 #endif
0552 
0553 #endif /* STM32H7xx_HAL_PSSI_H */
0554