[HAL][IRDA] Add const qualifier to comply to MISRA-C Rule-8.13
diff --git a/Inc/stm32l1xx_hal_irda.h b/Inc/stm32l1xx_hal_irda.h index d69b350..18e7079 100644 --- a/Inc/stm32l1xx_hal_irda.h +++ b/Inc/stm32l1xx_hal_irda.h
@@ -593,8 +593,8 @@ * @{ */ /* Peripheral State functions **************************************************/ -HAL_IRDA_StateTypeDef HAL_IRDA_GetState(IRDA_HandleTypeDef *hirda); -uint32_t HAL_IRDA_GetError(IRDA_HandleTypeDef *hirda); +HAL_IRDA_StateTypeDef HAL_IRDA_GetState(const IRDA_HandleTypeDef *hirda); +uint32_t HAL_IRDA_GetError(const IRDA_HandleTypeDef *hirda); /** * @} */
diff --git a/Src/stm32l1xx_hal_irda.c b/Src/stm32l1xx_hal_irda.c index d7189ba..ea63927 100644 --- a/Src/stm32l1xx_hal_irda.c +++ b/Src/stm32l1xx_hal_irda.c
@@ -2016,7 +2016,7 @@ * the configuration information for the specified IRDA. * @retval HAL state */ -HAL_IRDA_StateTypeDef HAL_IRDA_GetState(IRDA_HandleTypeDef *hirda) +HAL_IRDA_StateTypeDef HAL_IRDA_GetState(const IRDA_HandleTypeDef *hirda) { uint32_t temp1 = 0x00U, temp2 = 0x00U; temp1 = hirda->gState; @@ -2031,7 +2031,7 @@ * the configuration information for the specified IRDA. * @retval IRDA Error Code */ -uint32_t HAL_IRDA_GetError(IRDA_HandleTypeDef *hirda) +uint32_t HAL_IRDA_GetError(const IRDA_HandleTypeDef *hirda) { return hirda->ErrorCode; }