3.3.3 SAFE_PLIB_DAC

Set of safe functions for setting up and controlling the DAC peripheral.

#define DAC_TIMEOUT                                     (10000)
#define DAC_ERROR_CALLBACK_NOT_REGISTERED               (0x1U)
#define DAC_ERROR_INVALID_PARAMETER                     (0x2U)
#define DAC_ERROR_TIMEOUT                               (0x3U)

// *****************************************************************************
// *****************************************************************************
// Section: Data Types
// *****************************************************************************
// *****************************************************************************    
typedef uint32_t DAC_STATUS;

typedef void (*DAC_CALLBACK)(DAC_STATUS status, uintptr_t context);

typedef struct
{
    DAC_CALLBACK callback;
    uintptr_t context;
} DAC_CALLBACK_OBJ;