#include "tz_dk_defs.h"
#include "dk_error.h"

#include "dk_attn.h"
#include "dk_log.h"
#include "TZ_Vendor_tl.h"

#define TAG "DK_TA_ATTN: "

DK_Result dk_ICCC_check(){
        uint32_t result_code;
        DK_Result ret = DK_ERROR_INTEGRITY_FAILED;

        Iccc_DeviceStatus_TA_vendor(&result_code);
        if (result_code != 0) {
                TTY_LOG(TAG "Device Status failed");
                TTY_LOG(TAG "Iccc_DeviceStatus_TA failed %x", result_code);
                ret = DK_ERROR_INTEGRITY_FAILED;
        } else {
                ret = DK_SUCCESS;
                TTY_LOG(TAG "Iccc_DeviceStatus_TA OK");
        }
        
        return ret;
}
