1.34.3.2 DACC_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 DACC_IsReady (DACC_CHANNEL_NUM channel);
bool DACC_IsReady(void);

Summary

Returns the status of readiness of Channel x of DACC module for new conversion request

Description

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

Precondition

DACC_Initialize must have been called for the associated DACC instance.

Parameters

Param Description
channel Points to DACC Channel.

Returns

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

- False - When DACC 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 == DACC_IsReady (DACC_CHANNEL_1))
{
    DACC_DataWrite (DACC_CHANNEL_1, 0xff)
}
else
{
    //DACC is not ready to accept new conversion request
    //User Application code
}
bool status = false;
DACC_ChannelSelect(DACC_CHANNEL_0);
if (true == DACC_IsReady())
{
    DACC_DataWrite (0xff);
}
else
{
    //DACC is not ready to accept new conversion request
    //User Application code
}

Remarks

None.