@@ -78,19 +78,19 @@ typedef struct
7878 __IO uint32_t ErrorCode ; /*!< DAC Error code */
7979
8080#if (USE_HAL_DAC_REGISTER_CALLBACKS == 1 )
81- void (* ConvCpltCallbackCh1 ) (struct __DAC_HandleTypeDef * hdac );
82- void (* ConvHalfCpltCallbackCh1 ) (struct __DAC_HandleTypeDef * hdac );
83- void (* ErrorCallbackCh1 ) (struct __DAC_HandleTypeDef * hdac );
84- void (* DMAUnderrunCallbackCh1 ) (struct __DAC_HandleTypeDef * hdac );
81+ void (* ConvCpltCallbackCh1 )(struct __DAC_HandleTypeDef * hdac );
82+ void (* ConvHalfCpltCallbackCh1 )(struct __DAC_HandleTypeDef * hdac );
83+ void (* ErrorCallbackCh1 )(struct __DAC_HandleTypeDef * hdac );
84+ void (* DMAUnderrunCallbackCh1 )(struct __DAC_HandleTypeDef * hdac );
8585
86- void (* ConvCpltCallbackCh2 ) (struct __DAC_HandleTypeDef * hdac );
87- void (* ConvHalfCpltCallbackCh2 ) (struct __DAC_HandleTypeDef * hdac );
88- void (* ErrorCallbackCh2 ) (struct __DAC_HandleTypeDef * hdac );
89- void (* DMAUnderrunCallbackCh2 ) (struct __DAC_HandleTypeDef * hdac );
86+ void (* ConvCpltCallbackCh2 )(struct __DAC_HandleTypeDef * hdac );
87+ void (* ConvHalfCpltCallbackCh2 )(struct __DAC_HandleTypeDef * hdac );
88+ void (* ErrorCallbackCh2 )(struct __DAC_HandleTypeDef * hdac );
89+ void (* DMAUnderrunCallbackCh2 )(struct __DAC_HandleTypeDef * hdac );
9090
9191
92- void (* MspInitCallback ) (struct __DAC_HandleTypeDef * hdac );
93- void (* MspDeInitCallback ) (struct __DAC_HandleTypeDef * hdac );
92+ void (* MspInitCallback )(struct __DAC_HandleTypeDef * hdac );
93+ void (* MspDeInitCallback )(struct __DAC_HandleTypeDef * hdac );
9494#endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
9595
9696} DAC_HandleTypeDef ;
@@ -127,7 +127,7 @@ typedef struct
127127 uint32_t DAC_OutputBuffer ; /*!< Specifies whether the DAC channel output buffer is enabled or disabled.
128128 This parameter can be a value of @ref DAC_output_buffer */
129129
130- uint32_t DAC_ConnectOnChipPeripheral ; /*!< Specifies whether the DAC output is connected or not to on chip peripheral .
130+ uint32_t DAC_ConnectOnChipPeripheral ; /*!< Specifies whether the DAC output is connected or not to on chip peripheral.
131131 This parameter can be a value of @ref DAC_ConnectOnChipPeripheral */
132132
133133 uint32_t DAC_UserTrimming ; /*!< Specifies the trimming mode
@@ -209,19 +209,19 @@ typedef void (*pDAC_CallbackTypeDef)(DAC_HandleTypeDef *hdac);
209209#if defined(HRTIM1 )
210210#define DAC_TRIGGER_HR1_TRGO1 (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_0 | DAC_CR_TEN1) /*!< HR1 TRGO1 selected as external conversion trigger for DAC channel */
211211#define DAC_TRIGGER_HR1_TRGO2 (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_1 | DAC_CR_TEN1) /*!< HR1 TRGO2 selected as external conversion trigger for DAC channel */
212- #endif
212+ #endif /* HRTIM12 */
213213#define DAC_TRIGGER_LPTIM1_OUT (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1) /*!< LPTIM1 OUT TRGO selected as external conversion trigger for DAC channel */
214214#define DAC_TRIGGER_LPTIM2_OUT (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_2 | DAC_CR_TEN1) /*!< LPTIM2 OUT TRGO selected as external conversion trigger for DAC channel */
215215#define DAC_TRIGGER_EXT_IT9 (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_2 | DAC_CR_TSEL1_0 | DAC_CR_TEN1) /*!< EXTI Line9 event selected as external conversion trigger for DAC channel */
216216#if defined(TIM23 )
217217#define DAC_TRIGGER_T23_TRGO (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_2 | DAC_CR_TSEL1_1 | DAC_CR_TEN1) /*!< TIM23 TRGO selected as external conversion trigger for DAC channel */
218- #endif
218+ #endif /* TIM23 */
219219#if defined(TIM24 )
220220#define DAC_TRIGGER_T24_TRGO (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_2 | DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1) /*!< TIM24 TRGO selected as external conversion trigger for DAC channel */
221- #endif
221+ #endif /* TIM24 */
222222#if defined(DAC2 )
223223#define DAC_TRIGGER_LPTIM3_OUT (DAC_CR_TSEL1_3 | DAC_CR_TSEL1_2 | DAC_CR_TSEL1_1 | DAC_CR_TEN1) /*!< LPTIM3 OUT TRGO selected as external conversion trigger for DAC channel */
224- #endif
224+ #endif /* DAC2 */
225225
226226/**
227227 * @}
@@ -478,7 +478,7 @@ void HAL_DAC_MspDeInit(DAC_HandleTypeDef *hdac);
478478/* IO operation functions *****************************************************/
479479HAL_StatusTypeDef HAL_DAC_Start (DAC_HandleTypeDef * hdac , uint32_t Channel );
480480HAL_StatusTypeDef HAL_DAC_Stop (DAC_HandleTypeDef * hdac , uint32_t Channel );
481- HAL_StatusTypeDef HAL_DAC_Start_DMA (DAC_HandleTypeDef * hdac , uint32_t Channel , uint32_t * pData , uint32_t Length ,
481+ HAL_StatusTypeDef HAL_DAC_Start_DMA (DAC_HandleTypeDef * hdac , uint32_t Channel , const uint32_t * pData , uint32_t Length ,
482482 uint32_t Alignment );
483483HAL_StatusTypeDef HAL_DAC_Stop_DMA (DAC_HandleTypeDef * hdac , uint32_t Channel );
484484void HAL_DAC_IRQHandler (DAC_HandleTypeDef * hdac );
@@ -504,8 +504,9 @@ HAL_StatusTypeDef HAL_DAC_UnRegisterCallback(DAC_HandleTypeDef *hdac, HAL_DA
504504 * @{
505505 */
506506/* Peripheral Control functions ***********************************************/
507- uint32_t HAL_DAC_GetValue (DAC_HandleTypeDef * hdac , uint32_t Channel );
508- HAL_StatusTypeDef HAL_DAC_ConfigChannel (DAC_HandleTypeDef * hdac , DAC_ChannelConfTypeDef * sConfig , uint32_t Channel );
507+ uint32_t HAL_DAC_GetValue (const DAC_HandleTypeDef * hdac , uint32_t Channel );
508+ HAL_StatusTypeDef HAL_DAC_ConfigChannel (DAC_HandleTypeDef * hdac ,
509+ const DAC_ChannelConfTypeDef * sConfig , uint32_t Channel );
509510/**
510511 * @}
511512 */
@@ -514,8 +515,8 @@ HAL_StatusTypeDef HAL_DAC_ConfigChannel(DAC_HandleTypeDef *hdac, DAC_ChannelConf
514515 * @{
515516 */
516517/* Peripheral State and Error functions ***************************************/
517- HAL_DAC_StateTypeDef HAL_DAC_GetState (DAC_HandleTypeDef * hdac );
518- uint32_t HAL_DAC_GetError (DAC_HandleTypeDef * hdac );
518+ HAL_DAC_StateTypeDef HAL_DAC_GetState (const DAC_HandleTypeDef * hdac );
519+ uint32_t HAL_DAC_GetError (const DAC_HandleTypeDef * hdac );
519520
520521/**
521522 * @}
@@ -551,4 +552,3 @@ void DAC_DMAHalfConvCpltCh1(DMA_HandleTypeDef *hdma);
551552
552553
553554#endif /* STM32H7xx_HAL_DAC_H */
554-
0 commit comments