@@ -80,32 +80,42 @@ SL_ENUM(sl_hal_dcdc_coulomb_counter_calibration_load_level_t) {
80
80
typedef struct {
81
81
uint16_t counter_threshold_em0 ; ///< Coulomb Counter Threshold in EM0.
82
82
uint16_t counter_threshold_em2 ; ///< Coulomb Counter Threshold in EM2.
83
- } sl_hal_dcdc_coulomb_counter_config_t ;
84
-
85
- /// DCDC_COULOMB_COUNTER calibration configuration structure.
83
+ } sl_hal_dcdc_coulomb_counter_init_t ;
86
84
typedef struct {
87
85
CMU_Select_TypeDef reference_clk ; ///< Coulomb Counter Calibration Reference Clock.
88
86
int8_t cal_count ; ///< Coulomb Counter Calibration Reference Count.
89
87
sl_hal_dcdc_coulomb_counter_emode_t cal_emode ; ///< Coulomb Counter Calibration Energy Mode.
90
88
sl_hal_dcdc_coulomb_counter_calibration_load_level_t cal_load_level ; ///< Coulomb Counter Calibration Power Load.
91
- } sl_hal_dcdc_coulomb_counter_calibration_config_t ;
89
+ } sl_hal_dcdc_coulomb_counter_calibration_init_t ;
90
+
91
+ /** @cond DO_NOT_INCLUDE_WITH_DOXYGEN */
92
+ // Typedef for configuration structure used for backward compatibility purposes.
93
+ typedef sl_hal_dcdc_coulomb_counter_init_t sl_hal_dcdc_coulomb_counter_config_t ;
94
+ typedef sl_hal_dcdc_coulomb_counter_calibration_init_t sl_hal_dcdc_coulomb_counter_calibration_config_t ;
95
+ /** @endcond */
92
96
93
97
/// Suggested default values for DCDC_COULOMB_COUNTER configuration structure.
94
- #define DCDC_COULOMB_COUNTER_CONFIG_DEFAULT \
98
+ #define SL_HAL_DCDC_COULOMB_COUNTER_INIT_DEFAULT \
95
99
{ \
96
100
0x8000, /* Coulomb Counter EM0 Threshold. */ \
97
101
0x8000 , /* Coulomb Counter EM2 Threshold. */ \
98
102
}
99
103
100
104
/// Suggested default values for DCDC_COULOMB_COUNTER calibration configuration structure.
101
- #define DCDC_COULOMB_COUNTER_CALIBRATION_CONFIG_DEFAULT \
105
+ #define SL_HAL_DCDC_COULOMB_COUNTER_CALIBRATION_INIT_DEFAULT \
102
106
{ \
103
107
cmuSelect_HFXO, /* Coulomb Counter Calibration Reference Clock. */ \
104
108
8 , /* Coulomb Counter Calibration Reference Count. */ \
105
109
SL_HAL_DCDC_COULOMB_COUNTER_EM0 , /* Coulomb Counter Calibration DC-DC energy mode. */ \
106
110
SL_HAL_DCDC_COULOMB_COUNTER_CAL_LOAD3 , /* Coulomb Counter Calibration Load. */ \
107
111
}
108
112
113
+ /** @cond DO_NOT_INCLUDE_WITH_DOXYGEN */
114
+ // Alias for deprecated macro names used for backward compatibility purposes.
115
+ #define DCDC_COULOMB_COUNTER_CONFIG_DEFAULT SL_HAL_DCDC_COULOMB_COUNTER_INIT_DEFAULT
116
+ #define DCDC_COULOMB_COUNTER_CALIBRATION_CONFIG_DEFAULT SL_HAL_DCDC_COULOMB_COUNTER_CALIBRATION_INIT_DEFAULT
117
+ /** @endcond */
118
+
109
119
/*******************************************************************************
110
120
***************************** PROTOTYPES **********************************
111
121
******************************************************************************/
@@ -114,11 +124,11 @@ typedef struct {
114
124
* @brief
115
125
* Initializes DCDC_COULOMB_COUNTER module.
116
126
*
117
- * @param[in] p_config
127
+ * @param[in] init
118
128
* A pointer to the DCDC_COULOMB_COUNTER initialization
119
129
* structure variable.
120
130
******************************************************************************/
121
- void sl_hal_dcdc_coulomb_counter_init (const sl_hal_dcdc_coulomb_counter_config_t * p_config );
131
+ void sl_hal_dcdc_coulomb_counter_init (const sl_hal_dcdc_coulomb_counter_init_t * init );
122
132
123
133
/***************************************************************************/ /**
124
134
* @brief
@@ -354,14 +364,14 @@ __STATIC_INLINE void sl_hal_dcdc_coulomb_counter_set_interrupts(uint32_t flags)
354
364
* @brief
355
365
* Initializes the calibration of the DCDC Coulomb Counter.
356
366
*
357
- * @param[in] config
367
+ * @param[in] init
358
368
* DCDC_COULOMB_COUNTER calibration configuration structure.
359
369
*
360
370
* @note
361
371
* The charge per pulse is measured using known on-chip calibration
362
372
* loads, a PRS channel, and the CMU RC oscillator calibration circuitry.
363
373
******************************************************************************/
364
- void sl_hal_dcdc_coulomb_counter_cal_init (sl_hal_dcdc_coulomb_counter_calibration_config_t config );
374
+ void sl_hal_dcdc_coulomb_counter_cal_init (sl_hal_dcdc_coulomb_counter_calibration_init_t init );
365
375
366
376
/***************************************************************************/ /**
367
377
* @brief
@@ -472,10 +482,10 @@ __STATIC_INLINE bool sl_hal_dcdc_coulomb_counter_calhalt_is_set(void)
472
482
* @code{.c}
473
483
* {
474
484
* // Initialize with default configuration
475
- * sl_hal_dcdc_coulomb_counter_config_t config = DCDC_COULOMB_COUNTER_CONFIG_DEFAULT ;
485
+ * sl_hal_dcdc_coulomb_counter_init_t init = SL_HAL_DCDC_COULOMB_COUNTER_INIT_DEFAULT ;
476
486
*
477
487
* // Initialize the coulomb counter
478
- * sl_hal_dcdc_coulomb_counter_init(&config );
488
+ * sl_hal_dcdc_coulomb_counter_init(&init );
479
489
*
480
490
* // Enable the counter
481
491
* sl_hal_dcdc_coulomb_counter_enable();
@@ -502,10 +512,10 @@ __STATIC_INLINE bool sl_hal_dcdc_coulomb_counter_calhalt_is_set(void)
502
512
* sl_hal_dcdc_coulomb_counter_disable();
503
513
*
504
514
* // To calibrate the counter before use:
505
- * sl_hal_dcdc_coulomb_counter_calibration_config_t cal_config =
506
- * DCDC_COULOMB_COUNTER_CALIBRATION_CONFIG_DEFAULT ;
515
+ * sl_hal_dcdc_coulomb_counter_calibration_init_t cal_init =
516
+ * SL_HAL_DCDC_COULOMB_COUNTER_CALIBRATION_INIT_DEFAULT ;
507
517
*
508
- * sl_hal_dcdc_coulomb_counter_cal_init(cal_config );
518
+ * sl_hal_dcdc_coulomb_counter_cal_init(cal_init );
509
519
* sl_hal_dcdc_coulomb_counter_cal_start();
510
520
*
511
521
* // After calibration is complete
0 commit comments