|
ChibiOS 21.11.4
|
DAC Driver macros and structures. More...
#include "hal_dac_lld.h"Go to the source code of this file.
Data Structures | |
| struct | hal_dac_conversion_group |
| DAC Conversion group structure. More... | |
| struct | hal_dac_config |
| Driver configuration structure. More... | |
| struct | hal_dac_driver |
| Structure representing a DAC driver. More... | |
Macros | |
DAC configuration options | |
| #define | DAC_USE_SYNCHRONIZATION FALSE |
| Support for thread synchronization API. | |
| #define | DAC_USE_MUTUAL_EXCLUSION TRUE |
Enables the dacAcquireBus() and dacReleaseBus() APIs. | |
Low level driver helper macros | |
| #define | dacIsBufferComplete(dacp) |
| Buffer state. | |
| #define | _dac_wait_s(dacp) |
| Waits for operation completion. | |
| #define | _dac_reset_i(dacp) |
| Resumes a thread waiting for a conversion completion. | |
| #define | _dac_reset_s(dacp) |
| Resumes a thread waiting for a conversion completion. | |
| #define | _dac_wakeup_isr(dacp) |
| Wakes up the waiting thread. | |
| #define | _dac_timeout_isr(dacp) |
| Wakes up the waiting thread with a timeout message. | |
| #define | _dac_isr_half_code(dacp) |
| Common ISR code, half buffer event. | |
| #define | _dac_isr_full_code(dacp) |
| Common ISR code, full buffer event. | |
| #define | _dac_isr_error_code(dacp, err) |
| Common ISR code, error event. | |
Typedefs | |
| typedef struct hal_dac_driver | DACDriver |
| Type of a structure representing an DAC driver. | |
| typedef struct hal_dac_config | DACConfig |
| Type of a structure representing an DAC driver configuration. | |
| typedef struct hal_dac_conversion_group | DACConversionGroup |
| Type of a DAC conversion group. | |
| typedef void(* | daccallback_t) (DACDriver *dacp) |
| DAC notification callback type. | |
| typedef void(* | dacerrorcallback_t) (DACDriver *dacp, dacerror_t err) |
| DAC error callback type. | |
Enumerations | |
| enum | dacstate_t { DAC_UNINIT = 0 , DAC_STOP = 1 , DAC_READY = 2 , DAC_ACTIVE = 3 , DAC_COMPLETE = 4 , DAC_ERROR = 5 } |
| Driver state machine possible states. More... | |
Functions | |
| void | dacInit (void) |
| DAC Driver initialization. | |
| void | dacObjectInit (DACDriver *dacp) |
Initializes the standard part of a DACDriver structure. | |
| msg_t | dacStart (DACDriver *dacp, const DACConfig *config) |
| Configures and activates the DAC peripheral. | |
| void | dacStop (DACDriver *dacp) |
| Deactivates the DAC peripheral. | |
| msg_t | dacPutChannelX (DACDriver *dacp, dacchannel_t channel, dacsample_t sample) |
| Outputs a value directly on a DAC channel. | |
| msg_t | dacStartConversion (DACDriver *dacp, const DACConversionGroup *grpp, dacsample_t *samples, size_t depth) |
| Starts a DAC conversion. | |
| msg_t | dacStartConversionI (DACDriver *dacp, const DACConversionGroup *grpp, dacsample_t *samples, size_t depth) |
| Starts a DAC conversion. | |
| void | dacStopConversion (DACDriver *dacp) |
| Stops an ongoing conversion. | |
| void | dacStopConversionI (DACDriver *dacp) |
| Stops an ongoing conversion. | |
DAC Driver macros and structures.
Definition in file hal_dac.h.