1.3.6.3 1.4.5.3 1.5.5.3 1.29.6.3 1.30.4.3 1.31.4.3 1.32.7.3 1.33.4.3 1.37.4.3 1.38.5.3 1.39.4.3 1.40.5.3 DAC_IsReady Function

C

The prototype of this function varies based on device family. Refer to the generated header file for the actual prototype to be used.

bool DAC_IsReady (DAC_CHANNEL_NUM channel);
bool DAC_IsReady(void);

Summary

Returns the status of readiness of Channel of DAC module for new conversion request

Description

This function returns the status of Channel of DAC module, is it ready to accept new conversion requests or not.

Precondition

DAC_Initialize must have been called.

Parameters

Param Description
channel Points to DAC Channel.

Returns

- True - When DAC is ready to accept new data for conversion.

- False - When DAC is busy and can not accept new data for conversion

Example

Example of this function varies based on device family. Refer to the one which is applicable for the device being used.

bool status = false;

if (true == DAC_IsReady (DAC_CHANNEL_1))
{
    DAC_DataWrite (DAC_CHANNEL_1, 0xff)
}
else
{
    //DAC is not ready to accept new conversion request
    //User Application code
}
if (DAC_IsReady())
{
    DAC_DataWrite(0xFF);
}
else
{
    // Not ready to accept new conversion request.
    // User Application code.
}

Remarks

None.