/*!
* @file     Platform_Types.h
*
* @version  1.0.0
*
* @brief    This file contains the platform dependent type definitions
*
* @attention
*
* Project Name      : AUTOSAR MCAL
*
* Platform          : Arm
*
* Autosar Standard  : Classic Platform 4.4.0
*
* Compiled Version  : G32A10xx_MCAL_1_0_0_01-Otc-25
*
* Copyright (C) 2026 Geehy Semiconductor
*
* You may not use this file except in compliance with the
* GEEHY COPYRIGHT NOTICE (Geehy Semiconductor Software License Agreement).
*
* The program is only for reference, which is distributed in the hope
* that it will be usefull and instructional for customers to develop
* their software. Unless required by applicable law or agreed to in
* writing, the program is distributed on an "AS IS" BASIS, WITHOUT
* ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
* See the Geehy Semiconductor Software License Agreement for the governing permissions
* and limitations under the License.
*/

#ifndef PLATFORM_TYPES_H
#define PLATFORM_TYPES_H

#ifdef __cplusplus
extern "C"{
#endif

/** @addtogroup G32A10xx_StdPeriphDriver
  @{
*/

/** @defgroup PLATFORM_Driver
  * @brief PLATFORM driver modules
  @{
*/

/** @defgroup PLATFORM_Macros
  @{
*/
/*******************************************************************************
                    VENDOR ID & AUTOSAR VERSION INFO
*******************************************************************************/
/** Vendor ID (vendorId) of the dedicated implementation of this module according to the AUTOSAR vendor list. */
#define PLATFORM_TYPES_H_VENDOR_ID                       0x00C1U
/** Major version number of AUTOSAR release on which the appropriate implementation is based on. */
#define PLATFORM_TYPES_H_AR_RELEASE_MAJOR_VERSION        0x04U
/** Minor version number of AUTOSAR release on which the appropriate implementation is based on. */
#define PLATFORM_TYPES_H_AR_RELEASE_MINOR_VERSION        0x04U
/** Revision version number of AUTOSAR release on which the appropriate implementation is based on. */
#define PLATFORM_TYPES_H_AR_RELEASE_REVISION_VERSION     0x00U
/** Major version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define PLATFORM_TYPES_H_SW_MAJOR_VERSION                0x01U
/** Minor version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define PLATFORM_TYPES_H_SW_MINOR_VERSION                0x00U
/** Patch level version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define PLATFORM_TYPES_H_SW_PATCH_VERSION                0x00U

/*******************************************************************************
                            DEFINES AND MACROS
*******************************************************************************/
/** Boolean false value */
#ifndef FALSE
#define FALSE   ((boolean)0u)
#endif

/** Boolean true value */
#ifndef TRUE
#define TRUE    ((boolean)1u)
#endif

#define LSE_VALUE   ((uint32_t)32768)
#define LSI_VALUE   ((uint32_t)40000)

#ifndef  HSI_VALUE
#define  HSI_VALUE              ((uint32_t)8000000)
#endif

/**@} end of group PLATFORM_Macros */

/** @defgroup PLATFORM_Enumerations
  @{
*/

enum {BIT_RESET, BIT_SET};

enum {RESET = 0, SET = 1};

enum {DISABLE = 0, ENABLE = 1};

enum {ERROR = 0, SUCCESS = 1};

/**@} end of group PLATFORM_Enumerations */

/** @defgroup PLATFORM_Macros
  @{
*/

/** CPU bit orders */
#define MSB_FIRST           0
#define LSB_FIRST           1
#define CPU_BIT_ORDER       (LSB_FIRST)

/** CPU byte orders */
#define HIGH_BYTE_FIRST     0
#define LOW_BYTE_FIRST      1
#define CPU_BYTE_ORDER      (LOW_BYTE_FIRST)

/** CPU types */
#define CPU_TYPE_8_BIT      8
#define CPU_TYPE_16_BIT     16
#define CPU_TYPE_32_BIT     32
#define CPU_TYPE_64_BIT     64
#define CPU_TYPE            (CPU_TYPE_32_BIT)

/**@} end of group PLATFORM_Macros */

/** @defgroup PLATFORM_Structure
  @{
*/

#if (CPU_TYPE == CPU_TYPE_64_BIT)
    typedef signed char         sint8;
    typedef signed short        sint16;
    typedef signed int          sint32;
    typedef signed long long    sint64;
    typedef unsigned char       uint8;
    typedef unsigned short      uint16;
    typedef unsigned int        uint32;
    typedef unsigned long long  uint64;
    typedef signed int          sint8_least;
    typedef signed int          sint16_least;
    typedef signed int          sint32_least;
    typedef unsigned int        uint8_least;
    typedef unsigned int        uint16_least;
    typedef unsigned int        uint32_least;
    typedef float               float32;
    typedef double              float64;
    typedef unsigned char       boolean;
#elif (CPU_TYPE == CPU_TYPE_32_BIT)
    typedef signed char         sint8;
    typedef signed short        sint16;
    typedef signed long         sint32;
    typedef signed long long    sint64;
    typedef unsigned char       uint8;
    typedef unsigned short      uint16;
    typedef unsigned long       uint32;
    typedef unsigned long long  uint64;
    typedef signed long         sint8_least;
    typedef signed long         sint16_least;
    typedef signed long         sint32_least;
    typedef unsigned long       uint8_least;
    typedef unsigned long       uint16_least;
    typedef unsigned long       uint32_least;
    typedef float               float32;
    typedef double              float64;
    typedef unsigned char       boolean;
    typedef int                 int32;
#elif (CPU_TYPE == CPU_TYPE_16_BIT)
    typedef signed char         sint8;
    typedef signed short        sint16;
    typedef signed long         sint32;
    typedef signed long long    sint64;
    typedef unsigned char       uint8;
    typedef unsigned short      uint16;
    typedef unsigned long       uint32;
    typedef unsigned long long  uint64;
    typedef signed long         sint8_least;
    typedef signed long         sint16_least;
    typedef signed long         sint32_least;
    typedef unsigned long       uint8_least;
    typedef unsigned long       uint16_least;
    typedef unsigned long       uint32_least;
    typedef float               float32;
    typedef double              float64;
    typedef unsigned char       boolean;
#endif

#ifdef CPU_TYPE
    #if (CPU_TYPE == CPU_TYPE_64_BIT)
        typedef uint64 Std_PointerSizeType;
    #elif (CPU_TYPE == CPU_TYPE_32_BIT)
        typedef uint32 Std_PointerSizeType;
    #elif (CPU_TYPE == CPU_TYPE_16_BIT)
        typedef uint16 Std_PointerSizeType;
    #endif
#endif

/**@} end of group PLATFORM_Structure */

#ifdef __cplusplus
}
#endif

#endif

/**@} end of group PLATFORM_Driver */
/**@} end of group G32A10xx_StdPeriphDriver */
