ISF  2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
 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 
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 
fnI2CDeviceEnable_t fnI2CLLDdeviceEn
This structure contains i2c LLD function pointers.
void i2c_hal_disable(uint32 instance)
This function disables the HAL.
Definition: fsl_i2c_hal.c:40
fsl_i2c_master_driver.h defines structures and types for the i2c master driver.
i2c_instance_PEx i2c_instance_tbl[]
Lookup table for the LLD instance.
This structure defines the data bus handle.
unsigned long uint32
This defines uint32 as unsigned long.
Definition: isf_types.h:36
fsl_i2c_hal.h defines structures and types for the i2c master HAL layer.
isf_i2c_master_adapter.h defines the API definitions and types for the i2c master protocol adapter...
Internal driver state information.
void i2c_hal_enable(uint32 instance)
This function enables the HAL.
Definition: fsl_i2c_hal.c:27
fnI2CDeviceDisable_t fnI2CLLDdeviceDis
LDD_TDeviceData * pDeviceHandle
i2c_Master_busHandle_t i2c_master_busHandle[]