[HAL][DSI] Enhance HAL code quality for MISRA-C Rule-8.13 by adding const qualifiers
edit 020c3e3 [HAL][DSI] Enhance HAL code quality for MISRA-C Rule-8.13 by adding const qualifiers
diff --git a/Inc/stm32f7xx_hal_dsi.h b/Inc/stm32f7xx_hal_dsi.h
index f732628..d887cce 100644
--- a/Inc/stm32f7xx_hal_dsi.h
+++ b/Inc/stm32f7xx_hal_dsi.h
@@ -1184,7 +1184,7 @@
uint32_t Mode,
uint32_t NbParams,
uint32_t Param1,
- uint8_t *ParametersTable);
+ const uint8_t *ParametersTable);
HAL_StatusTypeDef HAL_DSI_Read(DSI_HandleTypeDef *hdsi,
uint32_t ChannelNbr,
uint8_t *Array,
@@ -1222,8 +1222,8 @@
* @brief Peripheral State and Errors functions
* @{
*/
-uint32_t HAL_DSI_GetError(DSI_HandleTypeDef *hdsi);
-HAL_DSI_StateTypeDef HAL_DSI_GetState(DSI_HandleTypeDef *hdsi);
+uint32_t HAL_DSI_GetError(const DSI_HandleTypeDef *hdsi);
+HAL_DSI_StateTypeDef HAL_DSI_GetState(const DSI_HandleTypeDef *hdsi);
/**
* @}
diff --git a/Src/stm32f7xx_hal_dsi.c b/Src/stm32f7xx_hal_dsi.c
index fc69d9e..e1062ed 100644
--- a/Src/stm32f7xx_hal_dsi.c
+++ b/Src/stm32f7xx_hal_dsi.c
@@ -1628,14 +1628,14 @@
uint32_t Mode,
uint32_t NbParams,
uint32_t Param1,
- uint8_t *ParametersTable)
+ const uint8_t *ParametersTable)
{
uint32_t uicounter;
uint32_t nbBytes;
uint32_t count;
uint32_t tickstart;
uint32_t fifoword;
- uint8_t *pparams = ParametersTable;
+ const uint8_t *pparams = ParametersTable;
/* Process locked */
__HAL_LOCK(hdsi);
@@ -3079,7 +3079,7 @@
* the configuration information for the DSI.
* @retval HAL state
*/
-HAL_DSI_StateTypeDef HAL_DSI_GetState(DSI_HandleTypeDef *hdsi)
+HAL_DSI_StateTypeDef HAL_DSI_GetState(const DSI_HandleTypeDef *hdsi)
{
return hdsi->State;
}
@@ -3090,7 +3090,7 @@
* the configuration information for the DSI.
* @retval DSI Error Code
*/
-uint32_t HAL_DSI_GetError(DSI_HandleTypeDef *hdsi)
+uint32_t HAL_DSI_GetError(const DSI_HandleTypeDef *hdsi)
{
/* Get the error code */
return hdsi->ErrorCode;