/*==================================================================================================
*   Project              : RTD AUTOSAR 4.9
*   Platform             : CORTEXM
*   Peripheral           : FS26
*   Dependencies         :
*
*   Autosar Version      : 4.9.0
*   Autosar Revision     : ASR_REL_4_9_REV_0000
*   Autosar Conf.Variant :
*   SW Version           : 6.0.0
*   Build Version        : S32K3_RTD_6_0_0_D2511_ASR_REL_4_9_REV_0000_20251114
*
*   Copyright 2020 - 2025 NXP
*
*   NXP Confidential and Proprietary.This software is owned or controlled by NXP and may only be
*   used strictly in accordance with the applicable license terms. By expressly
*   accepting such terms or by downloading, installing, activating and/or otherwise
*   using the software, you are agreeing that you have read, and that you agree to
*   comply with and are bound by, such license terms. If you do not agree to be
*   bound by the applicable license terms, then you may not retain, install,
*   activate or otherwise use the software.
==================================================================================================*/

/**
* @file         CDD_Sbc_fs26_Types.h
* @version      6.0.0
*
* @brief        AUTOSAR Sbc_fs26 - module generic types file.
* @details      Contains generic FS26 driver types and structures.
*
* @addtogroup   CDD_SBC_FS26_DRIVER
* @{
*/

#ifndef CDD_SBC_FS26_TYPES_H
#define CDD_SBC_FS26_TYPES_H

#ifdef __cplusplus
extern "C" {
#endif

/*==================================================================================================
*                                         INCLUDE FILES
* 1) system and project includes
* 2) needed interfaces from external units
* 3) internal and external interfaces from this unit
==================================================================================================*/
#include "CDD_Sbc_fs26_Cfg.h"
#if (STD_OFF == SBC_FS26_DISABLE_DEM_ERROR_REPORT)
    #include "Dem.h"
#endif /* STD_OFF == SBC_FS26_DISABLE_DEM_ERROR_REPORT */
#include "CDD_Sbc_fs26_Regs.h"
#include "Sbc_fs26_spi_external_access.h"

/*==================================================================================================
*                               SOURCE FILE VERSION INFORMATION
==================================================================================================*/
#define SBC_FS26_VENDOR_ID_TYPES_H                    43
#define SBC_FS26_MODULE_ID_TYPES_H                    255
#define SBC_FS26_AR_RELEASE_MAJOR_VERSION_TYPES_H     4
#define SBC_FS26_AR_RELEASE_MINOR_VERSION_TYPES_H     9
#define SBC_FS26_AR_RELEASE_REVISION_VERSION_TYPES_H  0
#define SBC_FS26_SW_MAJOR_VERSION_TYPES_H             6
#define SBC_FS26_SW_MINOR_VERSION_TYPES_H             0
#define SBC_FS26_SW_PATCH_VERSION_TYPES_H             0

/*==================================================================================================
*                                      FILE VERSION CHECKS
==================================================================================================*/
/* Check if current file and CDD_Sbc_fs26 configuration header file are of the same vendor */
#if (SBC_FS26_VENDOR_ID_TYPES_H != SBC_FS26_VENDOR_ID_CFG_H)
    #error "CDD_Sbc_fs26_Types.h and CDD_Sbc_fs26_Cfg.h have different vendor ids"
#endif
/* Check if current file and CDD_Sbc_fs26 configuration header file are of the same module */
#if (SBC_FS26_MODULE_ID_TYPES_H != SBC_FS26_MODULE_ID_CFG_H)
#error "CDD_Sbc_fs26_Types.h and CDD_Sbc_fs26_Cfg.h have different module ids"
#endif
/* Check if current file and CDD_Sbc_fs26 configuration header file are of the same Autosar version */
#if ((SBC_FS26_AR_RELEASE_MAJOR_VERSION_TYPES_H != SBC_FS26_AR_RELEASE_MAJOR_VERSION_CFG_H) || \
     (SBC_FS26_AR_RELEASE_MINOR_VERSION_TYPES_H != SBC_FS26_AR_RELEASE_MINOR_VERSION_CFG_H) || \
     (SBC_FS26_AR_RELEASE_REVISION_VERSION_TYPES_H != SBC_FS26_AR_RELEASE_REVISION_VERSION_CFG_H))
  #error "AutoSar Version Numbers of CDD_Sbc_fs26_Types.h and CDD_Sbc_fs26_Cfg.h are different"
#endif
/* Check if current file and CDD_Sbc_fs26 configuration header file are of the same software version */
#if ((SBC_FS26_SW_MAJOR_VERSION_TYPES_H != SBC_FS26_SW_MAJOR_VERSION_CFG_H) || \
     (SBC_FS26_SW_MINOR_VERSION_TYPES_H != SBC_FS26_SW_MINOR_VERSION_CFG_H) || \
     (SBC_FS26_SW_PATCH_VERSION_TYPES_H != SBC_FS26_SW_PATCH_VERSION_CFG_H))
  #error "Software Version Numbers of CDD_Sbc_fs26_Types.h and CDD_Sbc_fs26_Cfg.h are different"
#endif

/* Check if current file and CDD_Sbc_fs26 register header file are of the same vendor */
#if (SBC_FS26_VENDOR_ID_TYPES_H != SBC_FS26_REG_VENDOR_ID)
#error "CDD_Sbc_fs26_Types.h and CDD_Sbc_fs26_Regs.h have different vendor ids"
#endif
/* Check if current file and CDD_Sbc_fs26 register header file are of the same module */
#if (SBC_FS26_MODULE_ID_TYPES_H != SBC_FS26_REG_MODULE_ID)
#error "CDD_Sbc_fs26_Types.h and CDD_Sbc_fs26_Regs.h have different module ids"
#endif
/* Check if current file and CDD_Sbc_fs26 register header file are of the same Autosar version */
#if ((SBC_FS26_AR_RELEASE_MAJOR_VERSION_TYPES_H != SBC_FS26_REG_AR_RELEASE_MAJOR_VERSION) || \
     (SBC_FS26_AR_RELEASE_MINOR_VERSION_TYPES_H != SBC_FS26_REG_AR_RELEASE_MINOR_VERSION) || \
     (SBC_FS26_AR_RELEASE_REVISION_VERSION_TYPES_H != SBC_FS26_REG_AR_RELEASE_REVISION_VERSION))
  #error "AutoSar Version Numbers of CDD_Sbc_fs26_Types.h and CDD_Sbc_fs26_Regs.h are different"
#endif
/* Check if current file and CDD_Sbc_fs26 register header file are of the same software version */
#if ((SBC_FS26_SW_MAJOR_VERSION_TYPES_H != SBC_FS26_REG_SW_MAJOR_VERSION) || \
     (SBC_FS26_SW_MINOR_VERSION_TYPES_H != SBC_FS26_REG_SW_MINOR_VERSION) || \
     (SBC_FS26_SW_PATCH_VERSION_TYPES_H != SBC_FS26_REG_SW_PATCH_VERSION))
  #error "Software Version Numbers of CDD_Sbc_fs26_Types.h and CDD_Sbc_fs26_Regs.h are different"
#endif

/* Check if current file and spi external access header file are of the same version */
#ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
    #if ((SBC_FS26_AR_RELEASE_MAJOR_VERSION_TYPES_H != SBC_FS26_SPI_EXTERNAL_ACCESS_AR_RELEASE_MAJOR_VERSION) || \
         (SBC_FS26_AR_RELEASE_MINOR_VERSION_TYPES_H != SBC_FS26_SPI_EXTERNAL_ACCESS_AR_RELEASE_MINOR_VERSION))
        #error "AutoSar Version Numbers of CDD_Sbc_fs26_Types.h and Sbc_fs26_spi_external_access.h are different"
    #endif
#endif
/*==================================================================================================
*                                           CONSTANTS
==================================================================================================*/

/*==================================================================================================
*                                       PLATFORM SPECIFIC DEFINES AND MACROS
==================================================================================================*/

/*==================================================================================================
*                                       DEFINES AND MACROS
==================================================================================================*/
/* Data frame macros. */
/**
* @brief Length of the communication frame.
*/
#define SBC_FS26_COMM_FRAME_SIZE_U8             ((uint8)(0x04U))

#if (STD_ON == SBC_FS26_DEV_ERROR_DETECT)
/* Development errors. */
/**
* @brief  FS26 driver was not initialized.
* @implements SBC_FS26_E_UNINIT_define
*/
#define  SBC_FS26_E_UNINIT                      (0x01U)
/**
* @brief  Invalid pointer in parameter list.
* @implements SBC_FS26_E_PARAM_POINTER_define
*/
#define  SBC_FS26_E_PARAM_POINTER               (0x02U)
/**
* @brief  Parameter out of range.
* @implements SBC_FS26_E_PARAM_RANGE_define
*/
#define  SBC_FS26_E_PARAM_RANGE                 (0x03U)
/**
* @brief  Multiple initialization.
* @implements SBC_FS26_E_MULTIPLE_INIT_define
*/
#define  SBC_FS26_E_MULTIPLE_INIT               (0x04U)

/* Service ID (APIs) for Det reporting. */
/**
* @brief API service ID for Sbc_fs26_Init function.
*/
#define SBC_FS26_SID_INIT                       ((uint8)0x00U)
/**
* @brief API service ID for Sbc_fs26_ReadRegister function.
*/
#define SBC_FS26_SID_READREGISTER               ((uint8)0x01U)
/**
* @brief API service ID for Sbc_fs26_WriteRegister function.
*/
#define SBC_FS26_SID_WRITEREGISTER              ((uint8)0x02U)
/**
* @brief API service ID for Sbc_fs26_SetOperatingMode function.
*/
#define SBC_FS26_SID_SETOPERATINGMODE           ((uint8)0x03U)
/**
* @brief API service ID for Sbc_fs26_SetLDT function.
*/
#define SBC_FS26_SID_SETLDT                     ((uint8)0x04U)
/**
* @brief API service ID for Sbc_fs26_GetLDTValue function.
*/
#define SBC_FS26_SID_GETLDTVALUE                ((uint8)0x05U)
/**
* @brief API service ID for Sbc_fs26_WdChangeToken function.
*/
#define SBC_FS26_SID_WDCHANGETOKEN              ((uint8)0x06U)
/**
* @brief API service ID for Sbc_fs26_WdRefresh function.
*/
#define SBC_FS26_SID_WDREFRESH                  ((uint8)0x07U)
/**
* @brief API service ID for Sbc_fs26_GetFaultErrorCounterValue function.
*/
#define SBC_FS26_SID_GETFAULTERRORCOUNTERVALUE  ((uint8)0x08U)
/**
* @brief API service ID for Sbc_fs26_FsxbRelease function.
*/
#define SBC_FS26_SID_FSXBRELEASE                ((uint8)0x09U)
/**
* @brief API service ID for Sbc_fs26_SetRegulatorState function.
*/
#define SBC_FS26_SID_SETREGULATORSTATE          ((uint8)0x0AU)
/**
* @brief API service ID for Sbc_fs26_SetAmux function.
*/
#define SBC_FS26_SID_SETAMUX                    ((uint8)0x0BU)
/**
* @brief API service ID for Sbc_fs26_SetWakeup function.
*/
#define SBC_FS26_SID_SETWAKEUP                  ((uint8)0x0CU)
/**
* @brief API service ID for Sbc_fs26_GetWakeup function.
*/
#define SBC_FS26_SID_GETWAKEUP                  ((uint8)0x0DU)
/**
* @brief API service ID for Sbc_fs26_GetVersionInfo function.
*/
#define SBC_FS26_SID_GETVERSIONINFO             ((uint8)0x0EU)
/**
* @brief API service ID for Sbc_fs26_Deinit function.
*/
#define SBC_FS26_SID_DEINIT                     ((uint8)0x0FU)
/**
* @brief API service ID for Sbc_fs26_InitDevice function.
*/
#define SBC_FS26_SID_INITDEVICE                 ((uint8)0x10U)
/**
* @brief API service ID for Sbc_fs26_GotoInitFS function.
*/
#define SBC_FS26_SID_GOTOINITFS                 ((uint8)0x11U)
/**
* @brief API service ID for Sbc_fs26_DisableWatchdog function.
*/
#define SBC_FS26_SID_DISABLEWATCHDOG            ((uint8)0x12U)
/**
* @brief API service ID for Sbc_fs26_PerformAbist2Check function.
*/
#define SBC_FS26_SID_PERFORMABIST2CHECK         ((uint8)0x13U)
/**
* @brief API service ID for Sbc_fs26_GetDeviceState function.
*/
#define SBC_FS26_SID_GETDEVICESTATE             ((uint8)0x14U)
#ifdef SBC_FS26_ASYNC_TRANSMIT
    /**
    * @brief API service ID for Sbc_fs26_GetAsyncTransmissionStatus function.
    */
    #define SBC_FS26_SID_GETASYNCSTATUS             ((uint8)0x15U)
#endif /* SBC_FS26_ASYNC_TRANSMIT */
#endif /* STD_ON == SBC_FS26_DEV_ERROR_DETECT */

/*==================================================================================================
*                                              ENUMS
==================================================================================================*/
#ifdef SBC_FS26_ASYNC_TRANSMIT
/**
 * @brief           Interface type
 * @details         The enumeration with Spi transmission status @ref Sbc_fs26_GetAsyncTransmissionStatus().
 * @implements      Sbc_fs26_SpiAsyncStatusType_enum
 */
typedef enum
{
    SBC_FS26_TRANS_DONE        = 0U,
    SBC_FS26_TRANS_ON_GOING    = 1U,
    SBC_FS26_TRANS_FAILED      = 2U
}Sbc_fs26_SpiAsyncStatusType;
#endif/*SBC_FS26_ASYNC_TRANSMIT*/

/**
* @brief Watchdog type.
*/
typedef enum
{
    SBC_FS26_WD_SIMPLE     = 1U, /**< @brief Simple watchdog refresh */
    SBC_FS26_WD_CHALLENGER = 2U  /**< @brief Challenger watchdog refresh */
} Sbc_fs26_WatchdogType;

/**
* @brief Device operating mode. Can be used with function Sbc_fs26_SetOperatingMode.
*
* @implements Sbc_fs26_OpModeType_enum
*/
typedef enum
{
    SBC_FS26_OPMODE_STANDBY = SBC_FS26_FS_FS_LP_REQ_PRE_STANDBY, /**< @brief Standby mode */
    SBC_FS26_OPMODE_LPOFF   = SBC_FS26_FS_FS_LP_REQ_PRE_LPOFF    /**< @brief LPOFF mode */
} Sbc_fs26_OpModeType;

#if (STD_ON == SBC_FS26_LDT_FUNCTION_API)
/**
* @brief LDT function. Can be used with function Sbc_fs26_SetLDT.
*
* @implements Sbc_fs26_LdtFuncType_enum
*/
typedef enum
{
    SBC_FS26_LDTFUNC_FUNC1 = SBC_FS26_M_LDT_FNCT_1, /**< @brief Function 1 */
    SBC_FS26_LDTFUNC_FUNC2 = SBC_FS26_M_LDT_FNCT_2, /**< @brief Function 2 */
    SBC_FS26_LDTFUNC_FUNC3 = SBC_FS26_M_LDT_FNCT_3, /**< @brief Function 3 */
    SBC_FS26_LDTFUNC_FUNC4 = SBC_FS26_M_LDT_FNCT_4, /**< @brief Function 4 */
    SBC_FS26_LDTFUNC_FUNC5 = SBC_FS26_M_LDT_FNCT_5  /**< @brief Function 5 */
} Sbc_fs26_LdtFuncType;

/**
* @brief LDT mode. Can be used with function Sbc_fs26_SetLDT.
*
* @implements Sbc_fs26_LdtModeType_enum
*/
typedef enum
{
    SBC_FS26_LDTMODE_LONG  = SBC_FS26_M_LDT_MODE_LONG, /**< @brief LDT long count */
    SBC_FS26_LDTMODE_SHORT = SBC_FS26_M_LDT_MODE_SHORT /**< @brief LDT short count */
} Sbc_fs26_LdtModeType;

/**
* @brief LDT low-power mode to go to. Can be used with function Sbc_fs26_SetLDT.
*
* @implements Sbc_fs26_LdtLpType_enum
*/
typedef enum
{
    SBC_FS26_LDTLP_LPOFF   = SBC_FS26_FS_LDT_LPSEL_LPOFF,  /**< @brief Go to LPOFF */
    SBC_FS26_LDTLP_STANDBY = SBC_FS26_FS_LDT_LPSEL_STANDBY /**< @brief Go to Standby */
} Sbc_fs26_LdtLpType;
#endif /* STD_ON == SBC_FS26_LDT_FUNCTION_API */

/**
* @brief FS output to release. Can be used with function Sbc_fs26_FsxbRelease.
*
* @implements Sbc_fs26_FsOutputType_enum
*/
typedef enum
{
    SBC_FS26_FS_FS0B = SBC_FS26_FS_RELEASE_OUTPUT_FS0B,     /**< @brief FS0b output */
    SBC_FS26_FS_FS1B = SBC_FS26_FS_RELEASE_OUTPUT_FS1B,     /**< @brief FS1b output */
    SBC_FS26_FS_BOTH = SBC_FS26_FS_RELEASE_OUTPUT_FS0B_FS1B /**< @brief Both FS0b and FS1b outputs */
} Sbc_fs26_FsOutputType;

#if (STD_ON == SBC_FS26_SET_REGULATOR_API)
/**
* @brief Voltage outputs. Can be used with function Sbc_fs26_SetRegulatorState.
*
* @implements Sbc_fs26_RegOutputType_enum
*/
typedef enum
{
    SBC_FS26_REG_LDO1  = 0U, /**< @brief LDO1 */
    SBC_FS26_REG_LDO2  = 1U, /**< @brief LDO2 */
    SBC_FS26_REG_VCORE = 2U, /**< @brief VCORE */
    SBC_FS26_REG_TRK1  = 3U, /**< @brief TRK1 */
    SBC_FS26_REG_TRK2  = 4U, /**< @brief TRK2 */
    SBC_FS26_REG_VBST  = 6U, /**< @brief VBST */
    SBC_FS26_REG_VREF  = 7U  /**< @brief VREF */
} Sbc_fs26_RegOutputType;
#endif /* STD_ON == SBC_FS26_SET_REGULATOR_API */

#if (STD_ON == SBC_FS26_AMUX_CHANNEL_API)
/**
* @brief AMUX channel. Can be used with function Sbc_fs26_SetAmux.
*
* @implements Sbc_fs26_AmuxChanType_enum
*/
typedef enum
{
    SBC_FS26_AMUXCHAN_DISABLED     = SBC_FS26_M_AMUX_DISABLED,     /**< @brief AMUX disabled */
    SBC_FS26_AMUXCHAN_LP_BANDGAP   = SBC_FS26_M_AMUX_LP_BANDGAP,   /**< @brief Low power bandgap for main domain */
    SBC_FS26_AMUXCHAN_MAIN_BANDGAP = SBC_FS26_M_AMUX_MAIN_BANDGAP, /**< @brief Bandgap for main domain */
    SBC_FS26_AMUXCHAN_FS_BANDGAP   = SBC_FS26_M_AMUX_FS_BANDGAP,   /**< @brief Bandgap for fail safe domain */
    SBC_FS26_AMUXCHAN_VANA         = SBC_FS26_M_AMUX_VANA,         /**< @brief Analog voltage supply for main domain */
    SBC_FS26_AMUXCHAN_VDIG         = SBC_FS26_M_AMUX_VDIG,         /**< @brief Digital voltage supply for main domain */
    SBC_FS26_AMUXCHAN_VDIG_FS      = SBC_FS26_M_AMUX_VDIG_FS,      /**< @brief Digital voltage supply for fail safe domain */
    SBC_FS26_AMUXCHAN_VCORE        = SBC_FS26_M_AMUX_VCORE,        /**< @brief VCORE voltage */
    SBC_FS26_AMUXCHAN_VPRE         = SBC_FS26_M_AMUX_VPRE,         /**< @brief VPRE voltage */
    SBC_FS26_AMUXCHAN_LDO1         = SBC_FS26_M_AMUX_LDO1,         /**< @brief LDO1 voltage */
    SBC_FS26_AMUXCHAN_LDO2         = SBC_FS26_M_AMUX_LDO2,         /**< @brief LDO2 voltage */
    SBC_FS26_AMUXCHAN_VREF         = SBC_FS26_M_AMUX_VREF,         /**< @brief VREF voltage */
    SBC_FS26_AMUXCHAN_TRK1         = SBC_FS26_M_AMUX_TRK1,         /**< @brief TRK1 voltage */
    SBC_FS26_AMUXCHAN_TRK2         = SBC_FS26_M_AMUX_TRK2,         /**< @brief TRK2 voltage */
    SBC_FS26_AMUXCHAN_VDDIO        = SBC_FS26_M_AMUX_VDDIO,        /**< @brief VDDIO voltage */
    SBC_FS26_AMUXCHAN_VBOS         = SBC_FS26_M_AMUX_VBOS,         /**< @brief VBOS internal voltage */
    SBC_FS26_AMUXCHAN_VBST         = SBC_FS26_M_AMUX_VBST,         /**< @brief VBST voltage (divider ratio configurable by SPI) */
    SBC_FS26_AMUXCHAN_VSUP         = SBC_FS26_M_AMUX_VSUP,         /**< @brief VSUP voltage (divider ratio configurable by SPI) */
    SBC_FS26_AMUXCHAN_WAKE1        = SBC_FS26_M_AMUX_WAKE1,        /**< @brief WAKE1 voltage (divider ratio configurable by SPI) */
    SBC_FS26_AMUXCHAN_WAKE2        = SBC_FS26_M_AMUX_WAKE2,        /**< @brief WAKE2 voltage (divider ratio configurable by SPI) */
    SBC_FS26_AMUXCHAN_GPIO1        = SBC_FS26_M_AMUX_GPIO1,        /**< @brief GPIO1 voltage (divider ratio configurable by SPI) */
    SBC_FS26_AMUXCHAN_GPIO2        = SBC_FS26_M_AMUX_GPIO2,        /**< @brief GPIO2 voltage (divider ratio configurable by SPI) */
    SBC_FS26_AMUXCHAN_BATSENSE     = SBC_FS26_M_AMUX_BATSENSE,     /**< @brief BATSENSE pin voltage (divider ratio configurable by SPI) */
    SBC_FS26_AMUXCHAN_DIE_TEMP     = SBC_FS26_M_AMUX_DIE_TEMP,     /**< @brief Central die temperature sensor */
    SBC_FS26_AMUXCHAN_VCORE_TEMP   = SBC_FS26_M_AMUX_VCORE_TEMP,   /**< @brief VCORE temperature sensor */
    SBC_FS26_AMUXCHAN_VPRE_TEMP    = SBC_FS26_M_AMUX_VPRE_TEMP,    /**< @brief VPRE temperature sensor */
    SBC_FS26_AMUXCHAN_LDO1_TEMP    = SBC_FS26_M_AMUX_LDO1_TEMP,    /**< @brief LDO1 temperature sensor */
    SBC_FS26_AMUXCHAN_LDO2_TEMP    = SBC_FS26_M_AMUX_LDO2_TEMP,    /**< @brief LDO2 temperature sensor */
    SBC_FS26_AMUXCHAN_TRK1_TEMP    = SBC_FS26_M_AMUX_TRK1_TEMP,    /**< @brief TRK1 temperature sensor */
    SBC_FS26_AMUXCHAN_TRK2_TEMP    = SBC_FS26_M_AMUX_TRK2_TEMP,    /**< @brief TRK2 temperature sensor */
    SBC_FS26_AMUXCHAN_GPIO1_TEMP   = SBC_FS26_M_AMUX_GPIO1_TEMP    /**< @brief GPIO1 temperature sensor */
} Sbc_fs26_AmuxChanType;

/**
* @brief AMUX divider. Can be used with function Sbc_fs26_SetAmux.
*
* @implements Sbc_fs26_AmuxDivType_enum
*/
typedef enum
{
    SBC_FS26_AMUXDIV_LOW  = SBC_FS26_M_AMUX_DIV_0, /**< @brief Divider 0 */
    SBC_FS26_AMUXDIV_HIGH = SBC_FS26_M_AMUX_DIV_1  /**< @brief Divider 1 */
} Sbc_fs26_AmuxDivType;
#endif /* STD_ON == SBC_FS26_AMUX_CHANNEL_API */

#if (STD_ON == SBC_FS26_ABIST2_CHECK_API)
/**
* @brief Voltage Monitoring. Can be used with function Sbc_fs26_PerformAbist2Check.
*
* @implements Sbc_fs26_VoltageSupervisionType_enum
*/
typedef enum
{
    SBC_FS26_MOR_VPRE  = 0U, /**< @brief VPRE */
    SBC_FS26_MOR_VCORE = 1U, /**< @brief VCORE */
    SBC_FS26_MOR_LDO1  = 2U, /**< @brief LDO1 */
    SBC_FS26_MOR_LDO2  = 3U, /**< @brief LDO2 */
    SBC_FS26_MOR_TRK1  = 4U, /**< @brief TRK1 */
    SBC_FS26_MOR_TRK2  = 5U, /**< @brief TRK2 */
    SBC_FS26_MOR_VREF  = 6U, /**< @brief VREF */
    SBC_FS26_MOR_VEXT  = 7U  /**< @brief VEXT */
} Sbc_fs26_VoltageSupervisionType;
#endif /* STD_ON == SBC_FS26_ABIST2_CHECK_API */

/**
* @brief Structure representing Sbc device's state.
*/
typedef enum
{
    FS_STATES_DEBUG_ENTRY  = 0x00U, /**< Sbc is currently in DEBUG ENTRY phase */
    FS_STATES_MONITORING   = 0x01U, /**< Sbc is currently in ENABLE MONITORING phase */
    FS_STATES_RSTB_RELEASE = 0x02U, /**< Sbc is currently in RSTB RELEASE phase */
    FS_STATES_INIT_FS      = 0x03U, /**< Sbc is currently in FS_INIT phase */
    FS_STATES_FS0B_ASSERT  = 0x04U, /**< Sbc is currently in FS0B NOT RELEASED phase */
    FS_STATES_NORMAL_FS    = 0x05U, /**< Sbc is currently in NORMAL_FS phase */
    FS_STATES_INVALID      = 0x06U  /**< Sbc did not respond or an error occured */
} Sbc_fs26_DeviceState;
/*==================================================================================================
*                                  STRUCTURES AND OTHER TYPEDEFS
==================================================================================================*/
/**
* @brief Structure representing received data frame.
*
* @implements Sbc_fs26_RxFrameType_struct
*/
typedef struct
{
    /** @brief A device status is returned into this byte after a successful transfer. */
    uint8 u8DeviceStatus;
    /** @brief Content of a read register. */
    uint16 u16ReadData;
} Sbc_fs26_RxFrameType;

#ifdef SBC_FS26_ASYNC_TRANSMIT
/*Async transmission used*/
typedef struct {
    uint8 (*paBuffer)[SBC_FS26_COMM_FRAME_SIZE_U8];
    uint32 u32Head;
    uint32 u32Tail;
    uint32 u32Maxlen;
} Sbc_fs26_BufferRingType;

typedef struct {
    Sbc_fs26_RxFrameType **pData;
    uint32 u32Head;
    uint32 u32Tail;
    uint32 u32Maxlen;
} Sbc_fs26_DataRingType;
#endif/*SBC_FS26_ASYNC_TRANSMIT*/

#if (STD_ON == SBC_FS26_WAKEUP_API)
/**
* @brief Structure for wake up source configuration. Can be used with function Sbc_fs26_SetWakeup.
*
* @implements Sbc_fs26_WuSrcType_struct
*/
typedef struct
{
    /** @brief WAKE1 wake-up enabled - TRUE = enabled. */
    boolean bWk1WuEnabled;
    /** @brief WAKE2 wake-up enabled - TRUE = enabled. */
    boolean bWk2WuEnabled;
    /** @brief GPIO1 wake-up enabled - TRUE = enabled. */
    boolean bGpio1WuEnabled;
    /** @brief GPIO2 wake-up enabled - TRUE = enabled. */
    boolean bGpio2WuEnabled;
    /** @brief Long Duration Timer wake-up enabled - TRUE = enabled. */
    boolean bLdtWuEnabled;
    /** @brief CSB Transition wake-up enabled - TRUE = enabled. */
    boolean bCsbWuEnabled;
} Sbc_fs26_WuSrcType;

/**
* @brief Structure for wake up polarity. Can be used with function Sbc_fs26_SetWakeup.
*
* @implements Sbc_fs26_WuPolType_struct
*/
typedef struct
{
    /** @brief WAKE1 event detection polarity - TRUE = low. */
    boolean bWk1Polarity;
    /** @brief WAKE2 event detection polarity - TRUE = low. */
    boolean bWk2Polarity;
    /** @brief GPIO1 event detection polarity - TRUE = low. */
    boolean bGpio1Polarity;
    /** @brief GPIO2 event detection polarity - TRUE = low. */
    boolean bGpio2Polarity;
} Sbc_fs26_WuPolType;

/**
* @brief Structure for wake up status. Can be used with function Sbc_fs26_GetWakeup.
*
* @implements Sbc_fs26_WuReasonType_struct
*/
typedef struct
{
    /** @brief WAKE1 event flag - TRUE = event occurred. */
    boolean bWk1Flag;
    /** @brief WAKE2 event flag - TRUE = event occurred. */
    boolean bWk2Flag;
    /** @brief GPIO1 event flag - TRUE = event occurred. */
    boolean bGpio1Flag;
    /** @brief GPIO2 event flag - TRUE = event occurred. */
    boolean bGpio2Flag;
    /** @brief LDT expire event flag - TRUE = event occurred. */
    boolean bLdtFlag;
    /** @brief Wake up event source. */
    uint8 u8WuEvent;
} Sbc_fs26_WuReasonType;
#endif /* STD_ON == SBC_FS26_WAKEUP_API */

/**
* @brief SPI configuration for access.
*/
typedef struct
{
    /** @brief SPI External Device (non-AUTOSAR) / SPI sequence (AUTOSAR). */
#ifdef SBC_FS26_USE_IPV_DSPI
    const Spi_Ip_ExternalDeviceType * pExt;
    Dspi_Ip_CallbackType Callback;
#elif defined(SBC_FS26_USE_IPV_LPSPI)
    const Lpspi_Ip_ExternalDeviceType * pExt;
    Lpspi_Ip_CallbackType Callback;
#elif defined (SBC_FS26_USE_IPV_FLEXIO_SPI)
    const Flexio_Spi_Ip_ExternalDeviceType * pExt;
    Flexio_Spi_Ip_CallbackType Callback;
#else
    /** @brief SPI channel (AUTOSAR). */
    Spi_ChannelType uSpiChannel;
    const Spi_SequenceType * pExt;
#endif
} Sbc_fs26_SpiConfigType;

/**
* @brief Initialization structure with FS_I_OVUV_SAFE_REACTION1 content. Use register map values.
*/
typedef struct
{
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of OV detection on VMON_PRE. */
    uint16 u16VmonPreOvFs;
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of UV detection on VMON_PRE. */
    uint16 u16VmonPreUvFs;
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of OV detection on VMON_CORE. */
    uint16 u16VmonCoreOvFs;
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of UV detection on VMON_CORE. */
    uint16 u16VmonCoreUvFs;
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of OV detection on VMON_LDO1. */
    uint16 u16VmonLdo1OvFs;
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of UV detection on VMON_LDO1. */
    uint16 u16VmonLdo1UvFs;
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of OV detection on VMON_LDO2. */
    uint16 u16VmonLdo2OvFs;
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of UV detection on VMON_LDO2. */
    uint16 u16VmonLdo2UvFs;
} Sbc_fs26_OvuvSafe1RegType;

/**
* @brief Initialization structure with FS_I_OVUV_SAFE_REACTION2 content. Use register map values.
*/
typedef struct
{
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of OV detection on VMON_EXT. */
    uint16 u16VmonExtOvFs;
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of UV detection on VMON_EXT. */
    uint16 u16VmonExtUvFs;
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of OV detection on VMON_REF. */
    uint16 u16VmonRefOvFs;
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of UV detection on VMON_REF. */
    uint16 u16VmonRefUvFs;
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of OV detection on VMON_TRK2. */
    uint16 u16VmonTrk2OvFs;
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of UV detection on VMON_TRK2. */
    uint16 u16VmonTrk2UvFs;
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of OV detection on VMON_TRK1. */
    uint16 u16VmonTrk1OvFs;
    /** @brief Reaction on RSTB or FAIL SAFE outputs in case of UV detection on VMON_TRK1. */
    uint16 u16VmonTrk1UvFs;
} Sbc_fs26_OvuvSafe2RegType;

#if (STD_OFF == SBC_FS26_EXTERNAL_WDG_USED)
/**
* @brief Initialization structure with FS_I_WD_CFG content. Use register map values.
*/
typedef struct
{
    /** @brief Watchdog error counter configuration. */
    uint16 u16WdErrLimit;
    /** @brief Watchdog refresh counter configuration. */
    uint16 u16WdRfrLimit;
    /** @brief Reaction on RSTB or FAIL SAFE output in case of BAD Watchdog (data or timing). */
    uint16 u16WdFs;
} Sbc_fs26_WdCfgRegType;

/**
* @brief Initialization structure with FS_WDW_DURATION content. Use register map values.
*/
typedef struct
{
    /** @brief Watchdog window period configuration. */
    uint16 u16WdwPeriod;
    /** @brief Watchdog Window Duty cycle. */
    uint16 u16WdwDc;
    /** @brief Watchdog window period configuration. */
    uint16 u16WdwRecovery;
} Sbc_fs26_WdwDurationRegType;
#endif /* (STD_OFF == SBC_FS26_EXTERNAL_WDG_USED) */
/**
* @brief Initialization structure with FS_I_SAFE_INPUTS content. Use register map values.
*/
typedef struct
{
    /** @brief FCCU monitoring configuration. */
    uint16 u16FccuCfg;
    /** @brief FCCU12 fault polarity. */
    uint16 u16Fccu12FltPol;
    /** @brief FCCU1 fault polarity. */
    uint16 u16Fccu1FltPol;
    /** @brief FCCU2 fault polarity. */
    uint16 u16Fccu2FltPol;
    /** @brief Reaction on RSTB or FAIL SAFE output in case of fault detection on FCCU12. */
    uint16 u16Fccu12Fs;
    /** @brief Reaction on RSTB or FAIL SAFE output in case of fault detection on FCCU1. */
    uint16 u16Fccu1Fs;
    /** @brief Reaction on RSTB or FAIL SAFE output in case of fault detection on FCCU2. */
    uint16 u16Fccu2Fs;
    /** @brief WAKE2 Low Power mode request polarity. */
    uint16 u16Wake2LpPol;
    /** @brief ERRORMON Fault Polarity. */
    uint16 u16ErrmonFaultPol;
    /** @brief Acknowledge timing following a fault detection on ERRMON. */
    uint16 u16ErrmonAckTime;
    /** @brief Reaction on RSTb or Fail Safe output in case of fault detection on ERRMON. */
    uint16 u16ErrmonFs;
    /** @brief FCCU pin filtering time settings. */
    uint16 u16Fccu12Filt;
} Sbc_fs26_SafeInputsRegType;

/**
* @brief Initialization structure with FS_I_FSSM content. Use register map values.
*/
typedef struct
{
    /** @brief Configure the maximum level of the fault counter. */
    uint16 u16FltErrCntLimit;
    /** @brief Configure the RSTB and FS0b behavior when fault error counter is higher than/equals intermediate value. */
    uint16 u16FltErrFs;
    /** @brief Reset duration configuration. */
    uint16 u16RstbDur;
    /** @brief Assert RSTB in case a short to high is detected on FS0b. */
    uint16 u16BackupFs0b;
    /** @brief Assert RSTb in case a short to high is detected on FS1b. */
    uint16 u16BackupFs1b;
    /** @brief Disable CLK Monitoring. */
    uint16 u16ClkMonDis;
    /** @brief Disable 8s RSTb timer. */
    uint16 u16Dis8s;
} Sbc_fs26_FssmRegType;

/**
* @brief Structure for FS26 initialization.
*/
typedef struct
{
    /*
    * Configuration values for fail-safe logic registers written during INIT_FS phase.
    * Following registers can be configured:
    *  - FS_I_OVUV_SAFE_REACTION1
    *  - FS_I_OVUV_SAFE_REACTION2
    *  - FS_I_WD_CFG
    *  - FS_I_SAFE_INPUTS
    *  - FS_I_FSSM
    *  - FS_WDW_DURATION
    */
    /** @brief FS_I_OVUV_SAFE_REACTION1 register. */
    Sbc_fs26_OvuvSafe1RegType xOvuvSafe1Reg;
    /** @brief FS_I_OVUV_SAFE_REACTION2 register. */
    Sbc_fs26_OvuvSafe2RegType xOvuvSafe2Reg;
#if (STD_OFF == SBC_FS26_EXTERNAL_WDG_USED)
    /** @brief FS_I_WD_CFG register. */
    Sbc_fs26_WdCfgRegType xWdCfgReg;
    /** @brief FS_WDW_DURATION register. */
    Sbc_fs26_WdwDurationRegType xWdwDurationReg;
#endif /* (STD_OFF == SBC_FS26_EXTERNAL_WDG_USED) */
    /** @brief FS_I_SAFE_INPUTS register. */
    Sbc_fs26_SafeInputsRegType xSafeInputsReg;
    /** @brief FS_I_FSSM register. */
    Sbc_fs26_FssmRegType xFssmReg;
    /** @brief Value to write to FS_INTB_MASK register. */
    uint16 u16IntbMaskValue;
    /** @brief Value to write to FS_ABIST_ON_DEMAND register.
    It is the responsibility of the system integrator to run and check the ABIST On Demand on safety-related regulators
    is PASS before releasing FSxB pins */
    uint16 u16Abist2Value;
} Sbc_fs26_InitConfigType;
#if (STD_OFF == SBC_FS26_DISABLE_DEM_ERROR_REPORT)
/**
* @brief Typedef for DEM error management implemented by MCAL drivers
*/
typedef struct
{
    uint32 state;            /**< enabling/disabling the DEM error: Active=STD_ON/ Inactive=STD_OFF */
    Dem_EventIdType id ;     /**< ID of DEM error (0 if STD_OFF)*/
}Sbc_fs26_DemErrorType;
/**
* @brief This data structure contains a configuration of the DEM report for FS26 device error.
*/
typedef struct
{
    const Sbc_fs26_DemErrorType xTimeError;
    const Sbc_fs26_DemErrorType xDeviceStatusError;
} Sbc_fs26_DemConfigType;
#endif /* STD_OFF == SBC_FS26_DISABLE_DEM_ERROR_REPORT */
/**
* @brief This data structure contains a configuration of the FS26 device.
* @details This structure is used as a parameter for Sbc_fs26_Init function.
*
* @implements Sbc_fs26_ConfigType_struct
*/
typedef struct
{
    /* Device related configuration. */
    /** @brief Pointer to fail-safe registers configuration. */
    const Sbc_fs26_InitConfigType *pInitConfig;
    /** @brief Watchdog type - simple or challenger. */
    Sbc_fs26_WatchdogType eWatchdogType;
    /** @brief Actual watchdog token value. See Sbc_fs26_WdChangeToken for details. */
    uint16 u16WatchdogToken;
    /** @brief ASIL level - TRUE if ASIL D, FALSE if ASIL B. */
    boolean bAsilDLevel;
#if (STD_ON == SBC_FS26_RELEASE_SAFETY_OUTPUTS_ENABLED)
    /** @brief Safety Output pins to be released */
    Sbc_fs26_FsOutputType eSafetyOutput;
#endif /*(STD_ON == SBC_FS26_RELEASE_SAFETY_OUTPUTS_ENABLED*/
    /* SPI configuration. */
    /** @brief Pointer to SPI configuration. */
    const Sbc_fs26_SpiConfigType *pSpi;
#if (STD_OFF == SBC_FS26_DISABLE_DEM_ERROR_REPORT)
    /* Dem configuration. */
    const Sbc_fs26_DemConfigType *pDemConfig;
#endif /* STD_OFF == SBC_FS26_DISABLE_DEM_ERROR_REPORT */
    /** @brief Function pointer will be called if RSTB path check is needed */
    void (*pRstbCheckNotification)(void);
    /** @brief Function pointer will be called if need watchdog trigger in a certain period.
        The first input parameter is used for watchdog period and the second one is used for watchdog duty cycle. */
    void (*pfWdgNotification)(const uint8 u8WindowPeriod, const uint8 u8WindowDc);
    /** @brief Function pointer will be called follow by each watchdog refresh.
        The API will get the FS_G_FLAG register value and user can take the activities base on each status of register value. */
    void (*pfWdRefreshFaultNotification)(const uint16 u16RegValue);
} Sbc_fs26_ConfigType;

/*==================================================================================================
*                                  GLOBAL VARIABLE DECLARATIONS
==================================================================================================*/

/*==================================================================================================
*                                      FUNCTION PROTOTYPES
==================================================================================================*/

#ifdef __cplusplus
}
#endif

#endif    /*CDD_SBC_FS26_TYPES_H*/

/** @} */
