27 #if (HAL_USE_DAC == TRUE) || defined(__DOXYGEN__) 75 #if DAC_USE_MUTUAL_EXCLUSION 78 #if defined(DAC_DRIVER_EXT_INIT_HOOK) 79 DAC_DRIVER_EXT_INIT_HOOK(dacp);
201 osalDbgCheck((dacp != NULL) && (grpp != NULL) && (samples != NULL) &&
202 ((depth == 1) || ((depth & 1) == 0)));
272 #if (DAC_USE_WAIT == TRUE) || defined(__DOXYGEN__) 312 #if (DAC_USE_MUTUAL_EXCLUSION == TRUE) || defined(__DOXYGEN__) static void osalMutexObjectInit(mutex_t *mp)
Initializes s mutex_t object.
void dacStartConversion(DACDriver *dacp, const DACConversionGroup *grpp, dacsample_t *samples, size_t depth)
Starts a DAC conversion.
#define _dac_reset_s(dacp)
Resumes a thread waiting for a conversion completion.
msg_t osalThreadSuspendS(thread_reference_t *trp)
Sends the current thread sleeping and sets a reference variable.
msg_t dacConvert(DACDriver *dacp, const DACConversionGroup *grpp, dacsample_t *samples, size_t depth)
Performs a DAC conversion.
Driver configuration structure.
void dacInit(void)
DAC Driver initialization.
uint32_t dacchannel_t
Type of a DAC channel index.
dacsample_t * samples
Samples buffer pointer.
thread_reference_t thread
Waiting thread.
#define osalDbgCheckClassI()
I-Class state check.
void dacObjectInit(DACDriver *dacp)
Initializes the standard part of a DACDriver structure.
void osalMutexLock(mutex_t *mp)
Locks the specified mutex.
static void osalSysUnlock(void)
Leaves a critical zone from thread context.
void dacStartConversionI(DACDriver *dacp, const DACConversionGroup *grpp, dacsample_t *samples, size_t depth)
Starts a DAC conversion.
void dac_lld_start(DACDriver *dacp)
Configures and activates the DAC peripheral.
int32_t msg_t
Type of a message.
void dacAcquireBus(DACDriver *dacp)
Gains exclusive access to the DAC bus.
void dacReleaseBus(DACDriver *dacp)
Releases exclusive access to the DAC bus.
void dac_lld_stop(DACDriver *dacp)
Deactivates the DAC peripheral.
Structure representing a DAC driver.
void dac_lld_init(void)
Low level DAC driver initialization.
dacstate_t state
Driver state.
#define osalDbgCheck(c)
Function parameters check.
#define DAC_MAX_CHANNELS
Maximum number of DAC channels per unit.
mutex_t mutex
Mutex protecting the bus.
DAC Conversion group structure.
void dac_lld_put_channel(DACDriver *dacp, dacchannel_t channel, dacsample_t sample)
Outputs a value directly on a DAC channel.
void dacStop(DACDriver *dacp)
Deactivates the DAC peripheral.
static void osalSysLock(void)
Enters a critical zone from thread context.
uint16_t depth
Samples buffer size.
void dac_lld_start_conversion(DACDriver *dacp)
Starts a DAC conversion.
void dacPutChannelX(DACDriver *dacp, dacchannel_t channel, dacsample_t sample)
Outputs a value directly on a DAC channel.
#define osalDbgAssert(c, remark)
Condition assertion.
void dacStopConversion(DACDriver *dacp)
Stops an ongoing conversion.
void osalMutexUnlock(mutex_t *mp)
Unlocks the specified mutex.
void dacStopConversionI(DACDriver *dacp)
Stops an ongoing conversion.
void dacStart(DACDriver *dacp, const DACConfig *config)
Configures and activates the DAC peripheral.
uint16_t dacsample_t
Type representing a DAC sample.
#define _dac_reset_i(dacp)
Resumes a thread waiting for a conversion completion.
void dac_lld_stop_conversion(DACDriver *dacp)
Stops an ongoing conversion.
const DACConversionGroup * grpp
Conversion group.
const DACConfig * config
Current configuration data.