/* Initialize CRC Interface. 1. Initializes the resources needed for the CRC interface 2.registers event callback function.  */
crc_handle_t csi_crc_initialize(int32_t idx, crc_event_cb_t cb_event)
/* Initialize CRC Interface. 1. Initializes the resources needed for the CRC interface 2.registers event callback function.  */
crc_handle_t csi_crc_initialize(int32_t idx, crc_event_cb_t cb_event)
{
    if (idx < 0 || idx >= CONFIG_CRC_NUM) {
        return NULL;
    }
    uint32_t base = 0u;
    int32_t real_idx = target_get_crc(idx, &base);
    if (real_idx != idx) {
        return NULL;
    }
    ck_crc_priv_t *crc_priv = &crc_handle[idx];
    crc_reg = (ck_crc_reg_t *)(crc_priv->base);
    crc_priv->base = base;
    crc_priv->cb = cb_event;
    crc_priv->status.busy = 0;
    return (crc_handle_t)crc_priv;
}