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.h File Reference

fsl_i2c_hal.h defines structures and types for the i2c master HAL layer. More...

#include "isf_types.h"
Include dependency graph for fsl_i2c_hal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum _i2c_status i2c_status_t
 I2C status return codes. More...
 

Enumerations

enum  _i2c_status {
  kStatus_I2C_Success = 0, kStatus_I2C_OutOfRange, kStatus_I2C_InvalidArgument, kStatus_I2C_Fail,
  kStatus_I2C_Busy, kStatus_I2C_Timeout, kStatus_I2C_ReceivedNak, kStatus_I2C_SlaveTxUnderrun,
  kStatus_I2C_SlaveRxOverrun, kStatus_I2C_AribtrationLost
}
 I2C status return codes. More...
 

Functions

void i2c_hal_enable (uint32 instance)
 This function enables the HAL. More...
 
void i2c_hal_disable (uint32 instance)
 This function disables the HAL. More...
 

Detailed Description

fsl_i2c_hal.h defines structures and types for the i2c master HAL layer.

File: fsl_i2c_hal.h

Copyright (c) 2014, Freescale Semiconductor, Inc.

Definition in file fsl_i2c_hal.h.

Typedef Documentation

typedef enum _i2c_status i2c_status_t

I2C status return codes.

Enumeration Type Documentation

I2C status return codes.

Enumerator
kStatus_I2C_Success 

The operation is success.

kStatus_I2C_OutOfRange 

The value computed is out of range.

kStatus_I2C_InvalidArgument 

An invalid argument passed.

kStatus_I2C_Fail 

The operation is faild.

kStatus_I2C_Busy 

The master is already performing a transfer.

kStatus_I2C_Timeout 

The transfer timed out.

kStatus_I2C_ReceivedNak 

The slave device sent a NAK in response to a byte.

kStatus_I2C_SlaveTxUnderrun 

I2C Slave TX Underrun error.

kStatus_I2C_SlaveRxOverrun 

I2C Slave RX Overrun error.

kStatus_I2C_AribtrationLost 

I2C Arbitration Lost error.

Definition at line 16 of file fsl_i2c_hal.h.

Function Documentation

void i2c_hal_disable ( uint32  instance)

This function disables the HAL.

This allows to perform dynamic OFF the bus.

Parameters
[in]instanceThe instance ID/ ID of the bus to disable.
Returns
:None
Constraints:
None
Reentrant: Yes
Link Libraries:
None

Definition at line 40 of file fsl_i2c_hal.c.

References i2c_instance_PEx::fnI2CLLDdeviceDis, i2c_Master_BusHandle_struct::master, and I2CMasterState::pDeviceHandle.

Referenced by i2c_master_adapter_stop().

Here is the caller graph for this function:

void i2c_hal_enable ( uint32  instance)

This function enables the HAL.

This allows to perform dynamic ON of the bus.

Parameters
[in]instanceThe instance ID/ ID of the bus to enable.
Returns
:None
Constraints:
None
Reentrant: Yes
Link Libraries:
None

Definition at line 27 of file fsl_i2c_hal.c.

References i2c_instance_PEx::fnI2CLLDdeviceEn, i2c_Master_BusHandle_struct::master, and I2CMasterState::pDeviceHandle.

Referenced by i2c_master_adapter_start().

Here is the caller graph for this function: