/******************************************************************************/
/* Component Name   ICU-M Interface Library (ICUMIF)                          */
/******************************************************************************/
/* Product      : ICU-M Firmware                                              */
/******************************************************************************/
/*******************************************************************************
* Copyright(C) 2021-2023 Renesas Electronics Corporation.                       
*                                                                               
*          RENESAS ELECTRONICS CONFIDENTIAL AND PROPRIETARY                     
*                                                                               
* These instructions, statements, and programs are the confidential information 
* of Renesas Electronics Corporation. They must be used and modified solely for 
* the purpose for which it was furnished by Renesas Electronics Corporation.    
* All part of them must not be reproduced nor disclosed to others in any form,  
* without the prior written permission of Renesas Electronics Corporation.      
*******************************************************************************/
#if !defined(R_ICUMIF_API_LIFECYCLE_H)
#define R_ICUMIF_API_LIFECYCLE_H

/**********************************************************************************/
/* Service parameters                                                             */
/**********************************************************************************/

typedef enum
{
    LC_STAGE_LC0 = 0x1122,
    LC_STAGE_LC1 = 0x2233,
    LC_STAGE_LC2 = 0x3344,
    LC_STAGE_LC2S = 0x4455,
    LC_STAGE_TERMINATION = 0x5566,

    LAST_ITEM_LC_STAGE = 0x01000000
} r_stage_type_t;

typedef enum
{
    LC_CR_NONE,
    LC_CR_CHALLENGE,
    LC_CR_RESPONSE,

    LAST_ITEM_LC_CR_REQ = 0x01000000
} r_cr_request_t;

typedef struct
{
    uint16_t    life_cycle_stage;
    uint16_t    lc_terminate_status;
} sys_cfg_lc_t;

typedef enum
{
    LC_TERMINATE_NON,
    LC_TERMINATE_EXECUTE,
    LC_TERMINATE_COMPLETE,

    LAST_ITEM_LC_TERM = 0x01000000
} r_trm_status_t;

typedef struct ISD_LIFE_CYCLE
{
    r_stage_type_t      current_stage;
    r_stage_type_t      transition_dest;
    r_mem_cluster_id_t  cluster_id;
    r_cr_request_t      cr_request;
    union
    {
        uint8_t         *p_challenge;
        uint64_t        padding_sys64;
    } ptr1;
    union
    {
        uint8_t         *p_response;
        uint64_t        padding_sys64;
    } ptr2;
} ISD_LIFE_CYCLE_t;

#endif /* R_ICUMIF_API_LIFECYCLE_H */
