S32K 144 ADC0 11111111
立即下载
资源介绍:
11111111111111111111111
/**
* @file Can_FlexCan.c
* @version 1.0.1
*
* @brief AUTOSAR Can - LLD module implementation.
* @details Low Level Driver implementation.
*
* @addtogroup CAN_DRIVER
* @{
*/
/*==================================================================================================
* Project : AUTOSAR 4.3 MCAL
* Platform : ARM
* Peripheral : FLEXCAN
* Dependencies :
*
* Autosar Version : 4.3.1
* Autosar Revision : ASR_REL_4_3_REV_0001
* Autosar Conf.Variant :
* SW Version : 1.0.1
* Build Version : S32K14x_MCAL_1_0_1_RTM_ASR_REL_4_3_REV_0001_20190621
*
* (c) Copyright 2006-2016 Freescale Semiconductor, Inc.
* Copyright 2017-2019 NXP
* All Rights Reserved.
==================================================================================================*/
/*==================================================================================================
==================================================================================================*/
#ifdef __cplusplus
extern "C"{
#endif
/**
* @page misra_violations MISRA-C:2004 violations
*
* @section [global]
* Violates MISRA 2004 Required Rule 5.1, Identifiers (internal and external) shall not rely
* on the significance of more than 31 characters. The used compilers use more than 31 chars for
* identifiers.
*
* @section [global]
* Violates MISRA 2004 Required Rule 1.4, The compiler/linker shall be checked to ensure that 31 character
* signifiance and case sensitivity are supported for external identifiers.
* The used compilers use more than 31 chars for identifiers.
*
* @section Can_Flexcan_c_REF_1
* Violates MISRA 2004 Advisory Rule 19.1,#include preceded by non preproc directives.
* This violation is not fixed since the inclusion of MemMap.h is as per Autosar requirement MEMMAP003.
* This violation is not fixed since the inclusion of MemMap.h is as per Autosar requirement MEMMAP003.
*
* @section Can_Flexcan_c_REF_2
* Violates MISRA 2004 Required Rule 11.1, cast from unsigned long to pointer.
* This macro compute the address of any register by using the hardware ofsset of the controller. The address calculated as an unsigned int
* is passed to a macro for initializing the pointer with that address. (ex: see REG_WRITE32 macro).
*
* @section Can_Flexcan_c_REF_3
* Violates MISRA 2004 Required Rule 19.15, Repeated include file MemMap.h
* There are different kinds of execution code sections.
*
* @section Can_Flexcan_c_REF_4
* Violates MISRA 2004 Required Rule 1.2, Taking address of near auto variable
* The code is not dynamically linked. An absolute stack address is obtained when taking the address of the near auto variable.
* A source of error in writing dynamic code is that the stack segment may be different from the data segment.
*
* @section Can_Flexcan_c_REF_6
* Violates MISRA 2004 Required Rule 17.4, Pointer arithmetic other than array indexing used
* This violation is due to the structure of the types used.
*
* @section Can_Flexcan_c_REF_7
* Violates MISRA 2004 Required Rule 8.10, external ... could be made static
* The respective code could not be made static because of layers architecture design of the driver.
*
* @section Can_Flexcan_c_REF_8
* Violates MISRA 2004 Required Rule 13.7, Results boolean operations whose results are maybe variant.
*
* @section Can_Flexcan_c_REF_9
* Violates MISRA 2004 Advisory Rule 11.3, A cast should not be performed between a pointer type and an integral type.
*
*
* @section Can_Flexcan_c_REF_10
* Violates MISRA 2004 Required Rule 8.7, Global variables containing the generated configuration
* shall be defined in a separate source file and can't be defined inside a function although it is accessed
* by a single function.
*
* @section Can_Flexcan_c_REF_11
* Violates MISRA 2004 Advisory Rule 12.6 , The operands of logical operators (&&, || and !) should be
* effectively Boolean. Expressions that are effectively Boolean
* should not be used as operands to operators other than (&&, ||, !, =, ==, != and ?:).
*
* @section Can_Flexcan_c_REF_12
* Violates MISRA 2004 Required Rule 10.1 , The value of an expression of integer type shall not be implicitly
* converted to a different underlying type if:
* (a) it is not a conversion to a wider integer type of the samesignedness, or
* (b) the expression is complex, or
* (c) the expression is not constant and is a function argument, or
* (d) the expression is not constant and is a return expression
*
* @section Can_Flexcan_c_REF_13
* Violates MISRA 2004 Advisory Rule 11.4 , A cast should not be performed between a pointer to object type
* and a different pointer to object type.
*
* @section Can_Flexcan_c_REF_14
* Violates MISRA 2004 Required Rule 17.1 , Pointer arithmetic shall only be applied to pointers that address
* an array or array element.
*
*/
/*==================================================================================================
* INCLUDE FILES
* 1) system and project includes
* 2) needed interfaces from external units
* 3) internal and external interfaces from this unit
==================================================================================================*/
#include "Can.h"
#include "Can_IPW.h"
#include "CanIf_Cbk.h"
#if (CAN_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif
#ifdef CAN_ENABLE_USER_MODE_SUPPORT
#if CAN_ENABLE_USER_MODE_SUPPORT == STD_ON
#ifndef USER_MODE_REG_PROT_ENABLED
#define USER_MODE_REG_PROT_ENABLED (STD_ON)
#endif
#include "RegLockMacros.h"
#endif
#endif
/*
* @violates @ref Can_Flexcan_c_REF_3 Violates MISRA 2004 Required Rule 19.15, Repeated include file MemMap.h
*/
#include "SchM_Can.h"
#include "Mcal.h"
#ifndef CAN_TIMEOUT_AS_LOOP
#include "Os.h"
#endif
/*==================================================================================================
* SOURCE FILE VERSION INFORMATION
==================================================================================================*/
/**
* @file Can_FlexCan.c
*/
#define CAN_FLEXCAN_VENDOR_ID_C 43
#define CAN_FLEXCAN_MODULE_ID_C 80
#define CAN_FLEXCAN_AR_RELEASE_MAJOR_VERSION_C 4
#define CAN_FLEXCAN_AR_RELEASE_MINOR_VERSION_C 3
#define CAN_FLEXCAN_AR_RELEASE_REVISION_VERSION_C 1
#define CAN_FLEXCAN_SW_MAJOR_VERSION_C 1
#define CAN_FLEXCAN_SW_MINOR_VERSION_C 0
#define CAN_FLEXCAN_SW_PATCH_VERSION_C 1
/*==================================================================================================
* FILE VERSION CHECKS
==================================================================================================*/
/* Check if current file and CAN header file are of the same vendor */
#if (CAN_FLEXCAN_VENDOR_ID_C != CAN_FLEXCAN_VENDOR_ID_H)
#error "Can_FlexCan.c and Can_FlexCan.h have different vendor ids"
#endif
/* Check if current file and CAN header file are of the same module */
#if (CAN_FLEXCAN_MODULE_ID_C != CAN_FLEXCAN_MODULE_ID_H)
#error "Can_FlexCan.c and Can_FlexCan.h have different module ids"
#endif
/* Check if current file and CAN header file are of the same Autosar version */
#if ((CAN_FLEXCAN_AR_RELEASE_MAJOR_VERSION_C != CAN_FLEXCAN_AR_RELEASE_MAJOR_VERSION_H) || \
(CAN_FLEXCAN_AR_RELEASE_MINOR_VERSION_C != CAN_FLEXCAN_AR_RELEASE_MINOR_VERSION_H) || \
(CAN_FLEXCAN_AR_RELEASE_REVISION_VERSION_C != CAN_FLEXCAN_AR_RELEASE_REVISION_VERSION_H))
#error "AutoSar Version Numbers of Can_FlexCan.c and Can_FlexCan.h are different"
#endif
/* Check if current file and CAN header file are of the same Software version */
#if ((CAN_FLEXCAN_SW_MAJOR_VERSION_C != CAN_FLEXCAN_SW_MAJOR_
资源文件列表:
MCAL_ADC0.zip 大约有744个文件