6.6.4.6.1 Function dac_chan_enable_callback()

Enables asynchronous callback generation for a given channel and type.

enum status_code dac_chan_enable_callback( struct dac_module *const module, const enum dac_channel channel, const enum dac_callback type)

Enables asynchronous callbacks for a given logical DAC channel and type. This must be called before a DAC channel will generate callback events.

Table 6-32. Parameters
Data directionParameter nameDescription

[in, out]

dac_module

Pointer to the DAC software instance struct

[in]

channel

Logical channel to enable callback function

[in]

type

Type of callback function callbacks to enable

Returns

Status of the callback enable operation.

Table 6-33. Return Values
Return valueDescription

STATUS_OK

The callback was enabled successfully

STATUS_ERR_UNSUPPORTED_DEV

If a callback that requires event driven mode was specified with a DAC instance configured in non-event mode