Subversion Repositories FuelGauge

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 6
Line 153... Line 153...
153
    =============================================
153
    =============================================
154
    [..]
154
    [..]
155
      The compilation define  USE_HAL_DAC_REGISTER_CALLBACKS when set to 1
155
      The compilation define  USE_HAL_DAC_REGISTER_CALLBACKS when set to 1
156
      allows the user to configure dynamically the driver callbacks.
156
      allows the user to configure dynamically the driver callbacks.
157
 
157
 
158
    Use Functions @ref HAL_DAC_RegisterCallback() to register a user callback,
158
    Use Functions HAL_DAC_RegisterCallback() to register a user callback,
159
      it allows to register following callbacks:
159
      it allows to register following callbacks:
160
      (+) ConvCpltCallbackCh1     : callback when a half transfer is completed on Ch1.                
160
      (+) ConvCpltCallbackCh1     : callback when a half transfer is completed on Ch1.                
161
      (+) ConvHalfCpltCallbackCh1 : callback when a transfer is completed on Ch1.
161
      (+) ConvHalfCpltCallbackCh1 : callback when a transfer is completed on Ch1.
162
      (+) ErrorCallbackCh1        : callback when an error occurs on Ch1.
162
      (+) ErrorCallbackCh1        : callback when an error occurs on Ch1.
163
      (+) DMAUnderrunCallbackCh1  : callback when an error occurs on Ch1.
163
      (+) DMAUnderrunCallbackCh1  : callback when an error occurs on Ch1.
Line 168... Line 168...
168
      (+) MspInitCallback         : DAC MspInit.  
168
      (+) MspInitCallback         : DAC MspInit.  
169
      (+) MspDeInitCallback       : DAC MspdeInit.
169
      (+) MspDeInitCallback       : DAC MspdeInit.
170
      This function takes as parameters the HAL peripheral handle, the Callback ID
170
      This function takes as parameters the HAL peripheral handle, the Callback ID
171
      and a pointer to the user callback function.
171
      and a pointer to the user callback function.
172
 
172
 
173
    Use function @ref HAL_DAC_UnRegisterCallback() to reset a callback to the default
173
    Use function HAL_DAC_UnRegisterCallback() to reset a callback to the default
174
      weak (surcharged) function. It allows to reset following callbacks:
174
      weak (surcharged) function. It allows to reset following callbacks:
175
      (+) ConvCpltCallbackCh1     : callback when a half transfer is completed on Ch1.                
175
      (+) ConvCpltCallbackCh1     : callback when a half transfer is completed on Ch1.                
176
      (+) ConvHalfCpltCallbackCh1 : callback when a transfer is completed on Ch1.
176
      (+) ConvHalfCpltCallbackCh1 : callback when a transfer is completed on Ch1.
177
      (+) ErrorCallbackCh1        : callback when an error occurs on Ch1.
177
      (+) ErrorCallbackCh1        : callback when an error occurs on Ch1.
178
      (+) DMAUnderrunCallbackCh1  : callback when an error occurs on Ch1.
178
      (+) DMAUnderrunCallbackCh1  : callback when an error occurs on Ch1.
Line 183... Line 183...
183
      (+) MspInitCallback         : DAC MspInit.  
183
      (+) MspInitCallback         : DAC MspInit.  
184
      (+) MspDeInitCallback       : DAC MspdeInit.
184
      (+) MspDeInitCallback       : DAC MspdeInit.
185
      (+) All Callbacks
185
      (+) All Callbacks
186
      This function) takes as parameters the HAL peripheral handle and the Callback ID.
186
      This function) takes as parameters the HAL peripheral handle and the Callback ID.
187
 
187
 
188
      By default, after the @ref HAL_DAC_Init and if the state is HAL_DAC_STATE_RESET
188
      By default, after the HAL_DAC_Init and if the state is HAL_DAC_STATE_RESET
189
      all callbacks are reset to the corresponding legacy weak (surcharged) functions.
189
      all callbacks are reset to the corresponding legacy weak (surcharged) functions.
190
      Exception done for MspInit and MspDeInit callbacks that are respectively
190
      Exception done for MspInit and MspDeInit callbacks that are respectively
191
      reset to the legacy weak (surcharged) functions in the @ref HAL_DAC_Init
191
      reset to the legacy weak (surcharged) functions in the HAL_DAC_Init
192
      and @ref  HAL_DAC_DeInit only when these callbacks are null (not registered beforehand).
192
      and  HAL_DAC_DeInit only when these callbacks are null (not registered beforehand).
193
      If not, MspInit or MspDeInit are not null, the @ref HAL_DAC_Init and @ref HAL_DAC_DeInit
193
      If not, MspInit or MspDeInit are not null, the HAL_DAC_Init and HAL_DAC_DeInit
194
      keep and use the user MspInit/MspDeInit callbacks (registered beforehand)
194
      keep and use the user MspInit/MspDeInit callbacks (registered beforehand)
195
 
195
 
196
      Callbacks can be registered/unregistered in READY state only.
196
      Callbacks can be registered/unregistered in READY state only.
197
      Exception done for MspInit/MspDeInit callbacks that can be registered/unregistered
197
      Exception done for MspInit/MspDeInit callbacks that can be registered/unregistered
198
      in READY or RESET state, thus registered (user) MspInit/DeInit callbacks can be used
198
      in READY or RESET state, thus registered (user) MspInit/DeInit callbacks can be used
199
      during the Init/DeInit.
199
      during the Init/DeInit.
200
      In that case first register the MspInit/MspDeInit user callbacks
200
      In that case first register the MspInit/MspDeInit user callbacks
201
      using @ref HAL_DAC_RegisterCallback before calling @ref HAL_DAC_DeInit
201
      using HAL_DAC_RegisterCallback before calling HAL_DAC_DeInit
202
      or @ref HAL_DAC_Init function.
202
      or HAL_DAC_Init function.
203
 
203
 
204
      When The compilation define USE_HAL_DAC_REGISTER_CALLBACKS is set to 0 or
204
      When The compilation define USE_HAL_DAC_REGISTER_CALLBACKS is set to 0 or
205
      not defined, the callback registering feature is not available
205
      not defined, the callback registering feature is not available
206
      and weak (surcharged) callbacks are used.
206
      and weak (surcharged) callbacks are used.
207
 
207