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.h
Go to the documentation of this file.
1
/*!
2
********************************************************************************
3
* File: fsl_i2c_hal.h
4
*
5
* Copyright (c) 2014, Freescale Semiconductor, Inc.
6
*
7
*******************************************************************************/
8
/*!
9
* @file fsl_i2c_hal.h
10
* @brief \b fsl_i2c_hal.h defines structures and types for the i2c master HAL layer.
11
*/
12
#ifndef FSL_I2C_HAL_H_
13
#define FSL_I2C_HAL_H_
14
#include "
isf_types.h
"
15
/*! @brief I2C status return codes.*/
16
typedef
enum
_i2c_status
17
{
18
kStatus_I2C_Success
= 0,
/*!< The operation is success.*/
19
kStatus_I2C_OutOfRange
,
/*!< The value computed is out of range.*/
20
kStatus_I2C_InvalidArgument
,
/*!< An invalid argument passed.*/
21
kStatus_I2C_Fail
,
/*!< The operation is faild.*/
22
kStatus_I2C_Busy
,
/*!< The master is already performing a transfer.*/
23
kStatus_I2C_Timeout
,
/*!< The transfer timed out.*/
24
kStatus_I2C_ReceivedNak
,
/*!< The slave device sent a NAK in response to a byte.*/
25
kStatus_I2C_SlaveTxUnderrun
,
/*!< I2C Slave TX Underrun error.*/
26
kStatus_I2C_SlaveRxOverrun
,
/*!< I2C Slave RX Overrun error.*/
27
kStatus_I2C_AribtrationLost
,
/*!< I2C Arbitration Lost error.*/
28
}
i2c_status_t
;
29
/*! @brief This function enables the HAL
30
*
31
* @details This allows to perform dynamic ON of the bus.
32
*
33
* @param[in] instance The instance ID/ ID of the bus to enable.
34
*
35
* @return :None
36
*
37
*
38
* @Constraints None
39
*
40
* @Reentrant Yes
41
* @Libs None
42
*/
43
void
i2c_hal_enable
(
uint32
instance);
44
/*! @brief This function disables the HAL
45
*
46
* @details This allows to perform dynamic OFF the bus.
47
*
48
* @param[in] instance The instance ID/ ID of the bus to disable.
49
*
50
* @return :None
51
*
52
*
53
* @Constraints None
54
*
55
* @Reentrant Yes
56
* @Libs None
57
*/
58
void
i2c_hal_disable
(
uint32
instance);
59
60
#endif
/* FSL_I2C_HAL_H_ */
61
kStatus_I2C_Busy
Definition:
fsl_i2c_hal.h:22
kStatus_I2C_InvalidArgument
Definition:
fsl_i2c_hal.h:20
kStatus_I2C_Fail
Definition:
fsl_i2c_hal.h:21
kStatus_I2C_ReceivedNak
Definition:
fsl_i2c_hal.h:24
uint32
unsigned long uint32
This defines uint32 as unsigned long.
Definition:
isf_types.h:36
isf_types.h
The isf_types.h file contains the ISF data type definitions and some of the globally used macros...
kStatus_I2C_Timeout
Definition:
fsl_i2c_hal.h:23
kStatus_I2C_Success
Definition:
fsl_i2c_hal.h:18
i2c_hal_disable
void i2c_hal_disable(uint32 instance)
This function disables the HAL.
Definition:
fsl_i2c_hal.c:40
i2c_status_t
enum _i2c_status i2c_status_t
I2C status return codes.
kStatus_I2C_SlaveRxOverrun
Definition:
fsl_i2c_hal.h:26
kStatus_I2C_SlaveTxUnderrun
Definition:
fsl_i2c_hal.h:25
kStatus_I2C_AribtrationLost
Definition:
fsl_i2c_hal.h:27
kStatus_I2C_OutOfRange
Definition:
fsl_i2c_hal.h:19
_i2c_status
_i2c_status
I2C status return codes.
Definition:
fsl_i2c_hal.h:16
i2c_hal_enable
void i2c_hal_enable(uint32 instance)
This function enables the HAL.
Definition:
fsl_i2c_hal.c:27
© Freescale Semiconductor, Inc. 2015. All Rights Reserved.