mirror of
https://github.com/Dev-KATECH/ADM.git
synced 2026-05-17 09:53:59 +09:00
129 lines
3.7 KiB
C
129 lines
3.7 KiB
C
/*==================================================================================================
|
|
* Project : RTD AUTOSAR 4.4
|
|
* Platform : CORTEXM
|
|
* Peripheral : LPI2C
|
|
* Dependencies : none
|
|
*
|
|
* Autosar Version : 4.4.0
|
|
* Autosar Revision : ASR_REL_4_4_REV_0000
|
|
* Autosar Conf.Variant :
|
|
* SW Version : 0.9.0
|
|
* Build Version : S32K3_RTD_0_9_0__ASR_REL_4_4_REV_0000_20210326
|
|
*
|
|
* (c) Copyright 2020 - 2021 NXP Semiconductors
|
|
* All Rights Reserved.
|
|
*
|
|
* NXP Confidential. 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
|
|
*
|
|
* @addtogroup LPI2C_DRIVER Lpi2c Driver
|
|
* @{
|
|
*/
|
|
|
|
/*!
|
|
* @Lpi2c_Ip_Irq.c
|
|
*
|
|
* @page misra_violations MISRA-C:2012 violations
|
|
*
|
|
* @section [global]
|
|
* Violates MISRA 2012 Required Rule 5.1, Identifier clash
|
|
* The supported compilers use more than 31 significant characters for identifiers.
|
|
*
|
|
* @section [global]
|
|
* Violates MISRA 2012 Required Rule 5.2, Identifier clash
|
|
* The supported compilers use more than 31 significant characters for identifiers.
|
|
*
|
|
* @section [global]
|
|
* Violates MISRA 2012 Required Rule 5.4, Identifier clash
|
|
* The supported compilers use more than 31 significant characters for identifiers.
|
|
*
|
|
* @section [global]
|
|
* Violates MISRA 2012 Required Rule 5.5, Identifier clash
|
|
* The supported compilers use more than 31 significant characters for identifiers.
|
|
*
|
|
* @section [global]
|
|
* Violates MISRA 2012 Required Rule 8.4, A compatible declaration shall be
|
|
* visible when an object or function with external linkage is defined.
|
|
*
|
|
* @section [global]
|
|
* Violates MISRA 2012 Advisory Rule 8.7, External could be made static.
|
|
* Function is defined for usage by application code.
|
|
*/
|
|
|
|
#include "Lpi2c_Ip.h"
|
|
#include "Lpi2c_Ip_Irq.h"
|
|
|
|
#define I2C_START_SEC_CODE
|
|
#include "I2c_MemMap.h"
|
|
/*******************************************************************************
|
|
* Code
|
|
******************************************************************************/
|
|
|
|
#if defined (LPI2C_COMMON_IRQ_MASTER_AND_SLAVE)
|
|
|
|
#if (LPI2C_INSTANCE_COUNT > 0u)
|
|
/* Implementation of LPI2C0 master and slave handler named in startup code. */
|
|
ISR(LPI2C0_Master_Slave_IRQHandler)
|
|
{
|
|
Lpi2c_Ip_ModuleIRQHandler(0);
|
|
}
|
|
|
|
#if (LPI2C_INSTANCE_COUNT == 2u)
|
|
ISR(LPI2C1_Master_Slave_IRQHandler)
|
|
{
|
|
Lpi2c_Ip_ModuleIRQHandler(1);
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
#else
|
|
#if (LPI2C_INSTANCE_COUNT > 0u)
|
|
/* Implementation of LPI2C0 master handler named in startup code. */
|
|
ISR(LPI2C0_Master_IRQHandler)
|
|
{
|
|
Lpi2c_Ip_MasterIRQHandler(0);
|
|
}
|
|
|
|
/* Implementation of LPI2C0 slave handler named in startup code. */
|
|
ISR(LPI2C0_Slave_IRQHandler)
|
|
{
|
|
Lpi2c_Ip_SlaveIRQHandler(0);
|
|
}
|
|
|
|
#if(LPI2C_INSTANCE_COUNT == 2u)
|
|
|
|
/* Implementation of LPI2C1 master handler named in startup code. */
|
|
ISR(LPI2C1_Master_IRQHandler)
|
|
{
|
|
Lpi2c_Ip_MasterIRQHandler(1U);
|
|
}
|
|
|
|
/* Implementation of LPI2C1 slave handler named in startup code. */
|
|
ISR(LPI2C1_Slave_IRQHandler)
|
|
{
|
|
Lpi2c_Ip_SlaveIRQHandler(1U);
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#define I2C_STOP_SEC_CODE
|
|
#include "I2c_MemMap.h"
|
|
|
|
/** @} */
|
|
/*******************************************************************************
|
|
* EOF
|
|
******************************************************************************/
|