@@ -78,19 +78,19 @@ typedef struct
78
78
__IO uint32_t ErrorCode ; /*!< DAC Error code */
79
79
80
80
#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 );
85
85
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 );
90
90
91
91
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 );
94
94
#endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
95
95
96
96
} DAC_HandleTypeDef ;
@@ -127,7 +127,7 @@ typedef struct
127
127
uint32_t DAC_OutputBuffer ; /*!< Specifies whether the DAC channel output buffer is enabled or disabled.
128
128
This parameter can be a value of @ref DAC_output_buffer */
129
129
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.
131
131
This parameter can be a value of @ref DAC_ConnectOnChipPeripheral */
132
132
133
133
uint32_t DAC_UserTrimming ; /*!< Specifies the trimming mode
@@ -209,19 +209,19 @@ typedef void (*pDAC_CallbackTypeDef)(DAC_HandleTypeDef *hdac);
209
209
#if defined(HRTIM1 )
210
210
#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 */
211
211
#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 */
213
213
#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 */
214
214
#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 */
215
215
#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 */
216
216
#if defined(TIM23 )
217
217
#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 */
219
219
#if defined(TIM24 )
220
220
#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 */
222
222
#if defined(DAC2 )
223
223
#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 */
225
225
226
226
/**
227
227
* @}
@@ -478,7 +478,7 @@ void HAL_DAC_MspDeInit(DAC_HandleTypeDef *hdac);
478
478
/* IO operation functions *****************************************************/
479
479
HAL_StatusTypeDef HAL_DAC_Start (DAC_HandleTypeDef * hdac , uint32_t Channel );
480
480
HAL_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 ,
482
482
uint32_t Alignment );
483
483
HAL_StatusTypeDef HAL_DAC_Stop_DMA (DAC_HandleTypeDef * hdac , uint32_t Channel );
484
484
void HAL_DAC_IRQHandler (DAC_HandleTypeDef * hdac );
@@ -504,8 +504,9 @@ HAL_StatusTypeDef HAL_DAC_UnRegisterCallback(DAC_HandleTypeDef *hdac, HAL_DA
504
504
* @{
505
505
*/
506
506
/* 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 );
509
510
/**
510
511
* @}
511
512
*/
@@ -514,8 +515,8 @@ HAL_StatusTypeDef HAL_DAC_ConfigChannel(DAC_HandleTypeDef *hdac, DAC_ChannelConf
514
515
* @{
515
516
*/
516
517
/* 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 );
519
520
520
521
/**
521
522
* @}
@@ -551,4 +552,3 @@ void DAC_DMAHalfConvCpltCh1(DMA_HandleTypeDef *hdma);
551
552
552
553
553
554
#endif /* STM32H7xx_HAL_DAC_H */
554
-
0 commit comments