| ISF 2.1 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
fsl_i2c_hal.c
Go to the documentation of this file.
1 /*!
2 ********************************************************************************
3 * File: fsl_i2c_hal.c
4 *
5 * Copyright (c) 2014, Freescale Semiconductor, Inc.
6 *
7 *******************************************************************************/
8 /*!
9 * @file fsl_i2c_hal.c
10 * @brief \b fsl_i2c_hal.c implements i2c HAL Layer interfaces.
11 */
12 #include "fsl_i2c_hal.h"
13 #include "isf_fsl_i2c_PEx.h"
14 #include "PE_Types.h"
15 #include "isf_i2c_master_adapter.h"
16 #include "fsl_i2c_master_driver.h"
17
18 extern i2c_instance_PEx i2c_instance_tbl[];
19 extern i2c_Master_busHandle_t i2c_master_busHandle[];
20 /***********************************************************************
21 *
22 * Function Name : i2c_hal_enable
23 * Description : HAL interfaces for enabling the i2c module.
24 * It enbales the clock and interrupt.
25 *
26 ***************************************************************************/
27 void i2c_hal_enable(uint32 instance)
28 {
29 i2c_master_t *pMaster = &i2c_master_busHandle[instance].master ;
30
31 i2c_instance_tbl[instance].fnI2CLLDdeviceEn(pMaster->pDeviceHandle);
32 }
33 /***********************************************************************
34 *
35 * Function Name : i2c_hal_disable
36 * Description : HAL interface for disabling the i2c module.
37 * It disable the clock and interrupt.
38 *
39 ***************************************************************************/
40 void i2c_hal_disable(uint32 instance)
41 {
42 i2c_master_t *pMaster = &i2c_master_busHandle[instance].master ;
43 i2c_instance_tbl[instance].fnI2CLLDdeviceDis(pMaster->pDeviceHandle);
44
45 }
46
i2c_instance_PEx::fnI2CLLDdeviceEn
fnI2CDeviceEnable_t fnI2CLLDdeviceEn
Definition: isf_fsl_i2c_PEx.h:46
i2c_instance_PEx
This structure contains i2c LLD function pointers.
Definition: isf_fsl_i2c_PEx.h:42
i2c_hal_disable
void i2c_hal_disable(uint32 instance)
This function disables the HAL.
Definition: fsl_i2c_hal.c:40
fsl_i2c_master_driver.h
fsl_i2c_master_driver.h defines structures and types for the i2c master driver.
i2c_instance_tbl
i2c_instance_PEx i2c_instance_tbl[]
Lookup table for the LLD instance.
Definition: isf_fsl_i2c_PEx.c:25
i2c_Master_BusHandle_struct
This structure defines the data bus handle.
Definition: isf_i2c_master_types.h:23
uint32
unsigned long uint32
This defines uint32 as unsigned long.
Definition: isf_types.h:36
fsl_i2c_hal.h
fsl_i2c_hal.h defines structures and types for the i2c master HAL layer.
i2c_Master_BusHandle_struct::master
i2c_master_t master
Definition: isf_i2c_master_types.h:26
isf_i2c_master_adapter.h
isf_i2c_master_adapter.h defines the API definitions and types for the i2c master protocol adapter...
I2CMasterState
Internal driver state information.
Definition: fsl_i2c_master_driver.h:66
isf_fsl_i2c_PEx.h
i2c_hal_enable
void i2c_hal_enable(uint32 instance)
This function enables the HAL.
Definition: fsl_i2c_hal.c:27
i2c_instance_PEx::fnI2CLLDdeviceDis
fnI2CDeviceDisable_t fnI2CLLDdeviceDis
Definition: isf_fsl_i2c_PEx.h:47
I2CMasterState::pDeviceHandle
LDD_TDeviceData * pDeviceHandle
Definition: fsl_i2c_master_driver.h:70
i2c_master_busHandle
i2c_Master_busHandle_t i2c_master_busHandle[]
Definition: isf_sysconf_comms.c:36
- © Freescale Semiconductor, Inc. 2015. All Rights Reserved.