Skip to content

Commit b35b140

Browse files
committed
system(G4) update STM32G4xx HAL Drivers to v1.2.3
Included in STM32CubeG4 FW v1.5.2 Signed-off-by: Frederic Pillon <[email protected]>
1 parent c117c7e commit b35b140

File tree

123 files changed

+9722
-6599
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+9722
-6599
lines changed

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h

+136-129
Large diffs are not rendered by default.

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal.h

+3
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,9 @@ void HAL_ResumeTick(void);
544544
uint32_t HAL_GetHalVersion(void);
545545
uint32_t HAL_GetREVID(void);
546546
uint32_t HAL_GetDEVID(void);
547+
uint32_t HAL_GetUIDw0(void);
548+
uint32_t HAL_GetUIDw1(void);
549+
uint32_t HAL_GetUIDw2(void);
547550

548551
/**
549552
* @}

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc.h

+603-319
Large diffs are not rendered by default.

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc_ex.h

+380-203
Large diffs are not rendered by default.

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_comp.h

+161-162
Large diffs are not rendered by default.

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cordic.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ typedef struct
6464
{
6565
CORDIC_TypeDef *Instance; /*!< Register base address */
6666

67-
int32_t *pInBuff; /*!< Pointer to CORDIC input data buffer */
67+
const int32_t *pInBuff; /*!< Pointer to CORDIC input data buffer */
6868

6969
int32_t *pOutBuff; /*!< Pointer to CORDIC output data buffer */
7070

@@ -546,14 +546,14 @@ HAL_StatusTypeDef HAL_CORDIC_UnRegisterCallback(CORDIC_HandleTypeDef *hcordic, H
546546
*/
547547
#endif /* USE_HAL_CORDIC_REGISTER_CALLBACKS */
548548
/* Peripheral Control functions ***********************************************/
549-
HAL_StatusTypeDef HAL_CORDIC_Configure(CORDIC_HandleTypeDef *hcordic, CORDIC_ConfigTypeDef *sConfig);
550-
HAL_StatusTypeDef HAL_CORDIC_Calculate(CORDIC_HandleTypeDef *hcordic, int32_t *pInBuff, int32_t *pOutBuff,
549+
HAL_StatusTypeDef HAL_CORDIC_Configure(CORDIC_HandleTypeDef *hcordic, const CORDIC_ConfigTypeDef *sConfig);
550+
HAL_StatusTypeDef HAL_CORDIC_Calculate(CORDIC_HandleTypeDef *hcordic, const int32_t *pInBuff, int32_t *pOutBuff,
551551
uint32_t NbCalc, uint32_t Timeout);
552-
HAL_StatusTypeDef HAL_CORDIC_CalculateZO(CORDIC_HandleTypeDef *hcordic, int32_t *pInBuff, int32_t *pOutBuff,
552+
HAL_StatusTypeDef HAL_CORDIC_CalculateZO(CORDIC_HandleTypeDef *hcordic, const int32_t *pInBuff, int32_t *pOutBuff,
553553
uint32_t NbCalc, uint32_t Timeout);
554-
HAL_StatusTypeDef HAL_CORDIC_Calculate_IT(CORDIC_HandleTypeDef *hcordic, int32_t *pInBuff, int32_t *pOutBuff,
554+
HAL_StatusTypeDef HAL_CORDIC_Calculate_IT(CORDIC_HandleTypeDef *hcordic, const int32_t *pInBuff, int32_t *pOutBuff,
555555
uint32_t NbCalc);
556-
HAL_StatusTypeDef HAL_CORDIC_Calculate_DMA(CORDIC_HandleTypeDef *hcordic, int32_t *pInBuff, int32_t *pOutBuff,
556+
HAL_StatusTypeDef HAL_CORDIC_Calculate_DMA(CORDIC_HandleTypeDef *hcordic, const int32_t *pInBuff, int32_t *pOutBuff,
557557
uint32_t NbCalc, uint32_t DMADirection);
558558
/**
559559
* @}
@@ -582,8 +582,8 @@ void HAL_CORDIC_IRQHandler(CORDIC_HandleTypeDef *hcordic);
582582
* @{
583583
*/
584584
/* Peripheral State functions *************************************************/
585-
HAL_CORDIC_StateTypeDef HAL_CORDIC_GetState(CORDIC_HandleTypeDef *hcordic);
586-
uint32_t HAL_CORDIC_GetError(CORDIC_HandleTypeDef *hcordic);
585+
HAL_CORDIC_StateTypeDef HAL_CORDIC_GetState(const CORDIC_HandleTypeDef *hcordic);
586+
uint32_t HAL_CORDIC_GetError(const CORDIC_HandleTypeDef *hcordic);
587587
/**
588588
* @}
589589
*/

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_crc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t
318318
/** @defgroup CRC_Exported_Functions_Group3 Peripheral State functions
319319
* @{
320320
*/
321-
HAL_CRC_StateTypeDef HAL_CRC_GetState(CRC_HandleTypeDef *hcrc);
321+
HAL_CRC_StateTypeDef HAL_CRC_GetState(const CRC_HandleTypeDef *hcrc);
322322
/**
323323
* @}
324324
*/

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cryp.h

+17-12
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ typedef struct
5353
uint32_t DataType; /*!< 32-bit data, 16-bit data, 8-bit data or 1-bit string.
5454
This parameter can be a value of @ref CRYP_Data_Type */
5555
uint32_t KeySize; /*!< Used only in AES mode : 128, 192 or 256 bit key length in CRYP1.
56-
128 or 256 bit key length in TinyAES This parameter can be a value of @ref CRYP_Key_Size */
56+
128 or 256 bit key length in TinyAES
57+
This parameter can be a value of @ref CRYP_Key_Size */
5758
uint32_t *pKey; /*!< The key used for encryption/decryption */
5859
uint32_t *pInitVect; /*!< The initialization vector used also as initialization
5960
counter in CTR mode */
@@ -96,7 +97,7 @@ typedef enum
9697
{
9798
HAL_CRYP_SUSPEND_NONE = 0x00U, /*!< CRYP processing suspension not requested */
9899
HAL_CRYP_SUSPEND = 0x01U /*!< CRYP processing suspension requested */
99-
}HAL_SuspendTypeDef;
100+
} HAL_SuspendTypeDef;
100101
#endif /* USE_HAL_CRYP_SUSPEND_RESUME */
101102

102103
/**
@@ -407,7 +408,7 @@ typedef void (*pCRYP_CallbackTypeDef)(CRYP_HandleTypeDef *hcryp); /*!< point
407408
* @arg CRYP_FLAG_OFNE: Output FIFO is not empty
408409
* @arg CRYP_FLAG_OFFU: Output FIFO is full
409410
* @arg CRYP_FLAG_OUTRIS: Input FIFO service raw interrupt is pending
410-
* @retval The state of __FLAG__ (TRUE or FALSE).
411+
* @retval The state of __FLAG__ (TRUE or FALSE).
411412
*/
412413

413414
#define CRYP_FLAG_MASK 0x0000001FU
@@ -434,7 +435,8 @@ typedef void (*pCRYP_CallbackTypeDef)(CRYP_HandleTypeDef *hcryp); /*!< point
434435
* @retval State of interruption (TRUE or FALSE).
435436
*/
436437

437-
#define __HAL_CRYP_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR & (__INTERRUPT__)) == (__INTERRUPT__))
438+
#define __HAL_CRYP_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR &\
439+
(__INTERRUPT__)) == (__INTERRUPT__))
438440

439441
/** @brief Check whether the specified CRYP interrupt is set or not.
440442
* @param __HANDLE__ specifies the CRYP handle.
@@ -503,7 +505,8 @@ void HAL_CRYP_MspDeInit(CRYP_HandleTypeDef *hcryp);
503505
HAL_StatusTypeDef HAL_CRYP_SetConfig(CRYP_HandleTypeDef *hcryp, CRYP_ConfigTypeDef *pConf);
504506
HAL_StatusTypeDef HAL_CRYP_GetConfig(CRYP_HandleTypeDef *hcryp, CRYP_ConfigTypeDef *pConf);
505507
#if (USE_HAL_CRYP_REGISTER_CALLBACKS == 1U)
506-
HAL_StatusTypeDef HAL_CRYP_RegisterCallback(CRYP_HandleTypeDef *hcryp, HAL_CRYP_CallbackIDTypeDef CallbackID, pCRYP_CallbackTypeDef pCallback);
508+
HAL_StatusTypeDef HAL_CRYP_RegisterCallback(CRYP_HandleTypeDef *hcryp, HAL_CRYP_CallbackIDTypeDef CallbackID,
509+
pCRYP_CallbackTypeDef pCallback);
507510
HAL_StatusTypeDef HAL_CRYP_UnRegisterCallback(CRYP_HandleTypeDef *hcryp, HAL_CRYP_CallbackIDTypeDef CallbackID);
508511
#endif /* USE_HAL_CRYP_REGISTER_CALLBACKS */
509512
#if (USE_HAL_CRYP_SUSPEND_RESUME == 1U)
@@ -520,8 +523,10 @@ HAL_StatusTypeDef HAL_CRYP_Resume(CRYP_HandleTypeDef *hcryp);
520523
*/
521524

522525
/* encryption/decryption ***********************************/
523-
HAL_StatusTypeDef HAL_CRYP_Encrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, uint16_t Size, uint32_t *Output, uint32_t Timeout);
524-
HAL_StatusTypeDef HAL_CRYP_Decrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, uint16_t Size, uint32_t *Output, uint32_t Timeout);
526+
HAL_StatusTypeDef HAL_CRYP_Encrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, uint16_t Size, uint32_t *Output,
527+
uint32_t Timeout);
528+
HAL_StatusTypeDef HAL_CRYP_Decrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, uint16_t Size, uint32_t *Output,
529+
uint32_t Timeout);
525530
HAL_StatusTypeDef HAL_CRYP_Encrypt_IT(CRYP_HandleTypeDef *hcryp, uint32_t *Input, uint16_t Size, uint32_t *Output);
526531
HAL_StatusTypeDef HAL_CRYP_Decrypt_IT(CRYP_HandleTypeDef *hcryp, uint32_t *Input, uint16_t Size, uint32_t *Output);
527532
HAL_StatusTypeDef HAL_CRYP_Encrypt_DMA(CRYP_HandleTypeDef *hcryp, uint32_t *Input, uint16_t Size, uint32_t *Output);
@@ -579,11 +584,11 @@ uint32_t HAL_CRYP_GetError(CRYP_HandleTypeDef *hcryp);
579584
((CONFIG) == CRYP_KEYIVCONFIG_ONCE))
580585

581586
#define IS_CRYP_BUFFERSIZE(ALGO, DATAWIDTH, SIZE) \
582-
(((((ALGO) == CRYP_AES_CTR)) && \
583-
((((DATAWIDTH) == CRYP_DATAWIDTHUNIT_WORD) && (((SIZE) % 4U) == 0U)) || \
584-
(((DATAWIDTH) == CRYP_DATAWIDTHUNIT_BYTE) && (((SIZE) % 16U) == 0U)))) || \
585-
(((ALGO) == CRYP_AES_ECB) || ((ALGO) == CRYP_AES_CBC) || \
586-
((ALGO)== CRYP_AES_GCM_GMAC) || ((ALGO) == CRYP_AES_CCM)))
587+
(((((ALGO) == CRYP_AES_CTR)) && \
588+
((((DATAWIDTH) == CRYP_DATAWIDTHUNIT_WORD) && (((SIZE) % 4U) == 0U)) || \
589+
(((DATAWIDTH) == CRYP_DATAWIDTHUNIT_BYTE) && (((SIZE) % 16U) == 0U)))) || \
590+
(((ALGO) == CRYP_AES_ECB) || ((ALGO) == CRYP_AES_CBC) || \
591+
((ALGO)== CRYP_AES_GCM_GMAC) || ((ALGO) == CRYP_AES_CCM)))
587592

588593
/**
589594
* @}

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cryp_ex.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ extern "C" {
7373
*/
7474

7575
/**
76-
* @}
77-
*/
76+
* @}
77+
*/
7878

7979
/* Private functions ---------------------------------------------------------*/
8080
/** @defgroup CRYPEx_Private_Functions CRYPEx Private Functions

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac.h

+32-18
Original file line numberDiff line numberDiff line change
@@ -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;
@@ -143,7 +143,7 @@ typedef struct
143143
uint32_t DAC_OutputBuffer; /*!< Specifies whether the DAC channel output buffer is enabled or disabled.
144144
This parameter can be a value of @ref DAC_output_buffer */
145145

146-
uint32_t DAC_ConnectOnChipPeripheral ; /*!< Specifies whether the DAC output is connected or not to on chip peripheral .
146+
uint32_t DAC_ConnectOnChipPeripheral ; /*!< Specifies whether the DAC output is connected or not to on chip peripheral.
147147
This parameter can be a value of @ref DAC_ConnectOnChipPeripheral */
148148

149149
uint32_t DAC_UserTrimming; /*!< Specifies the trimming mode
@@ -349,6 +349,20 @@ typedef void (*pDAC_CallbackTypeDef)(DAC_HandleTypeDef *hdac);
349349
* @}
350350
*/
351351

352+
/* Delay for DAC channel voltage settling time from DAC channel startup */
353+
/* (transition from disable to enable). */
354+
/* Note: DAC channel startup time depends on board application environment: */
355+
/* impedance connected to DAC channel output. */
356+
/* The delay below is specified under conditions: */
357+
/* - voltage maximum transition (lowest to highest value) */
358+
/* - until voltage reaches final value +-1LSB */
359+
/* - DAC channel output buffer enabled */
360+
/* - load impedance of 5kOhm (min), 50pF (max) */
361+
/* Literal set to maximum value (refer to device datasheet, */
362+
/* parameter "tWAKEUP"). */
363+
/* Unit: us */
364+
#define DAC_DELAY_STARTUP_US (15UL) /*!< Delay for DAC channel voltage settling time from DAC channel startup (transition from disable to enable) */
365+
352366
/* Exported macro ------------------------------------------------------------*/
353367

354368
/** @defgroup DAC_Exported_Macros DAC Exported Macros
@@ -496,7 +510,7 @@ typedef void (*pDAC_CallbackTypeDef)(DAC_HandleTypeDef *hdac);
496510
#define IS_DAC_CHANNEL(DACX, CHANNEL) \
497511
(((CHANNEL) == DAC_CHANNEL_1) || \
498512
((CHANNEL) == DAC_CHANNEL_2))
499-
#endif
513+
#endif /* STM32G474xx || STM32G484xx || STM32G473xx */
500514

501515
#define IS_DAC_ALIGN(ALIGN) (((ALIGN) == DAC_ALIGN_12B_R) || \
502516
((ALIGN) == DAC_ALIGN_12B_L) || \
@@ -538,7 +552,7 @@ void HAL_DAC_MspDeInit(DAC_HandleTypeDef *hdac);
538552
/* IO operation functions *****************************************************/
539553
HAL_StatusTypeDef HAL_DAC_Start(DAC_HandleTypeDef *hdac, uint32_t Channel);
540554
HAL_StatusTypeDef HAL_DAC_Stop(DAC_HandleTypeDef *hdac, uint32_t Channel);
541-
HAL_StatusTypeDef HAL_DAC_Start_DMA(DAC_HandleTypeDef *hdac, uint32_t Channel, uint32_t *pData, uint32_t Length,
555+
HAL_StatusTypeDef HAL_DAC_Start_DMA(DAC_HandleTypeDef *hdac, uint32_t Channel, const uint32_t *pData, uint32_t Length,
542556
uint32_t Alignment);
543557
HAL_StatusTypeDef HAL_DAC_Stop_DMA(DAC_HandleTypeDef *hdac, uint32_t Channel);
544558
void HAL_DAC_IRQHandler(DAC_HandleTypeDef *hdac);
@@ -564,8 +578,9 @@ HAL_StatusTypeDef HAL_DAC_UnRegisterCallback(DAC_HandleTypeDef *hdac, HAL_DA
564578
* @{
565579
*/
566580
/* Peripheral Control functions ***********************************************/
567-
uint32_t HAL_DAC_GetValue(DAC_HandleTypeDef *hdac, uint32_t Channel);
568-
HAL_StatusTypeDef HAL_DAC_ConfigChannel(DAC_HandleTypeDef *hdac, DAC_ChannelConfTypeDef *sConfig, uint32_t Channel);
581+
uint32_t HAL_DAC_GetValue(const DAC_HandleTypeDef *hdac, uint32_t Channel);
582+
HAL_StatusTypeDef HAL_DAC_ConfigChannel(DAC_HandleTypeDef *hdac,
583+
const DAC_ChannelConfTypeDef *sConfig, uint32_t Channel);
569584
/**
570585
* @}
571586
*/
@@ -574,8 +589,8 @@ HAL_StatusTypeDef HAL_DAC_ConfigChannel(DAC_HandleTypeDef *hdac, DAC_ChannelConf
574589
* @{
575590
*/
576591
/* Peripheral State and Error functions ***************************************/
577-
HAL_DAC_StateTypeDef HAL_DAC_GetState(DAC_HandleTypeDef *hdac);
578-
uint32_t HAL_DAC_GetError(DAC_HandleTypeDef *hdac);
592+
HAL_DAC_StateTypeDef HAL_DAC_GetState(const DAC_HandleTypeDef *hdac);
593+
uint32_t HAL_DAC_GetError(const DAC_HandleTypeDef *hdac);
579594

580595
/**
581596
* @}
@@ -611,4 +626,3 @@ void DAC_DMAHalfConvCpltCh1(DMA_HandleTypeDef *hdma);
611626

612627

613628
#endif /* STM32G4xx_HAL_DAC_H */
614-

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac_ex.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ extern "C" {
9090
/**
9191
* @}
9292
*/
93+
9394
/**
9495
* @}
9596
*/
@@ -152,7 +153,7 @@ extern "C" {
152153
: ((TRIGGER) == DAC_TRIGGER_T8_TRGO) \
153154
) \
154155
)
155-
#endif
156+
#endif /* STM32G474xx || STM32G484xx */
156157

157158
#if defined(STM32G474xx) || defined(STM32G484xx)
158159
#define IS_DAC_TRIGGER2(DACX, TRIGGER) \
@@ -200,7 +201,7 @@ extern "C" {
200201
:((TRIGGER) == DAC_TRIGGER_T8_TRGO) \
201202
) \
202203
)
203-
#endif
204+
#endif /* STM32G474xx || STM32G484xx */
204205
#define IS_DAC_HIGH_FREQUENCY_MODE(MODE) (((MODE) == DAC_HIGH_FREQUENCY_INTERFACE_MODE_DISABLE) || \
205206
((MODE) == DAC_HIGH_FREQUENCY_INTERFACE_MODE_ABOVE_80MHZ) || \
206207
((MODE) == DAC_HIGH_FREQUENCY_INTERFACE_MODE_ABOVE_160MHZ) || \
@@ -279,11 +280,11 @@ HAL_StatusTypeDef HAL_DACEx_SawtoothWaveDataStep(DAC_HandleTypeDef *hdac, uint32
279280

280281
HAL_StatusTypeDef HAL_DACEx_DualStart(DAC_HandleTypeDef *hdac);
281282
HAL_StatusTypeDef HAL_DACEx_DualStop(DAC_HandleTypeDef *hdac);
282-
HAL_StatusTypeDef HAL_DACEx_DualStart_DMA(DAC_HandleTypeDef *hdac, uint32_t Channel, uint32_t *pData, uint32_t Length,
283-
uint32_t Alignment);
283+
HAL_StatusTypeDef HAL_DACEx_DualStart_DMA(DAC_HandleTypeDef *hdac, uint32_t Channel,
284+
const uint32_t *pData, uint32_t Length, uint32_t Alignment);
284285
HAL_StatusTypeDef HAL_DACEx_DualStop_DMA(DAC_HandleTypeDef *hdac, uint32_t Channel);
285286
HAL_StatusTypeDef HAL_DACEx_DualSetValue(DAC_HandleTypeDef *hdac, uint32_t Alignment, uint32_t Data1, uint32_t Data2);
286-
uint32_t HAL_DACEx_DualGetValue(DAC_HandleTypeDef *hdac);
287+
uint32_t HAL_DACEx_DualGetValue(const DAC_HandleTypeDef *hdac);
287288

288289
void HAL_DACEx_ConvCpltCallbackCh2(DAC_HandleTypeDef *hdac);
289290
void HAL_DACEx_ConvHalfCpltCallbackCh2(DAC_HandleTypeDef *hdac);
@@ -303,7 +304,7 @@ void HAL_DACEx_DMAUnderrunCallbackCh2(DAC_HandleTypeDef *hdac);
303304
HAL_StatusTypeDef HAL_DACEx_SelfCalibrate(DAC_HandleTypeDef *hdac, DAC_ChannelConfTypeDef *sConfig, uint32_t Channel);
304305
HAL_StatusTypeDef HAL_DACEx_SetUserTrimming(DAC_HandleTypeDef *hdac, DAC_ChannelConfTypeDef *sConfig, uint32_t Channel,
305306
uint32_t NewTrimmingValue);
306-
uint32_t HAL_DACEx_GetTrimOffset(DAC_HandleTypeDef *hdac, uint32_t Channel);
307+
uint32_t HAL_DACEx_GetTrimOffset(const DAC_HandleTypeDef *hdac, uint32_t Channel);
307308

308309
/**
309310
* @}
@@ -342,4 +343,3 @@ void DAC_DMAHalfConvCpltCh2(DMA_HandleTypeDef *hdma);
342343
#endif
343344

344345
#endif /* STM32G4xx_HAL_DAC_EX_H */
345-

Diff for: system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_def.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ typedef enum
6565
(__DMA_HANDLE__).Parent = (__HANDLE__); \
6666
} while(0)
6767

68-
#define UNUSED(X) (void)X
68+
#if !defined(UNUSED)
69+
#define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */
70+
#endif /* UNUSED */
6971

7072
/** @brief Reset the Handle's State field.
7173
* @param __HANDLE__: specifies the Peripheral Handle.

0 commit comments

Comments
 (0)