| ISF 2.2 rev 5 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

isf_comm.h
Go to the documentation of this file.
1 /*!
2 ********************************************************************************
3 * File: isf_comm.h
4 *
5 * Copyright (c) 2015, Freescale Semiconductor, Inc.
6 *
7 *******************************************************************************/
8 /*!
9 * @file isf_comm.h
10 * @brief \b isf_comm.h defines the common types for the Communications Service Family of the Intelligent Sensing Framework (ISF).
11 * @details This common types used by components in the ISF
12 * Communications Service Family, including the I2C and Device Messaging
13 * Components. Since the Device Messaging Component abstracts various
14 * communications interfaces (I2C, SPI, RGPIO), it is important to ensure that
15 * all abstracted components use common data types and function prototypes.
16 * These types and prototypes are defined in the header file rather than in the Device
17 * Messaging header file to avoid creating a circular dependency.
18 */
19 #ifndef COMM_H
20 #define COMM_H
21
22 #include <isf.h>
23
24 /*! @brief This enum defines the possible communications channel states. */
25 enum comm_State_vals {
26 COMM_STATE_NO_INIT = 0, /*!< Channel has not been initialized. */
27 COMM_STATE_INIT = 1, /*!< Channel is initialized, but not ready to use because channel is not started or configured.*/
28 COMM_STATE_OK = 2, /*!< Channel is ready to use without errors. */
29 COMM_STATE_STOPPED = 3, /*!< Channel is currently stopped. */
30 COMM_STATE_ERROR = 5, /*!< A null pointer was provided as an argument. */
31 COMM_STATE_ARB_LOST = 6 /*!< Channel arbitration has been lost. */
32 };
33
34 /*! @brief This enum defines the possible communications channel error codes. */
35 enum comm_Error_vals {
36 COMM_ERROR_INIT = 1, /*!< A channel initialization error has occurred. */
37 COMM_ERROR_STOP = 2, /*!< A channel stop-related error has occurred. */
38 COMM_ERROR_LOCK = 3, /*!< A channel lock-related error has occurred. */
39 COMM_ERROR_TIME_OUT = 4, /*!< Channel has timed out. */
40 COMM_ERROR_NULL_PTR = 5, /*!< A null pointer was provided as an argument. */
41 COMM_ERROR_NOEXIST = 6, /*!< The referenced entity does not exist. */
42 COMM_ERROR_BUF_SIZE = 7, /*!< The provided buffer is too small. */
43 COMM_ERROR_NO_ACK = 8, /*!< An acknowledgement was not received. */
44 COMM_ERROR_DEV_CLOSED = 9, /*!< Attempted read/write to a closed device. */
45 COMM_ERROR_OTHER = 10 /*!< An unspecified channel error has occured. */
46 };
47
48 /*! @brief This type is for a numeric channel identifier- index into an array of channels
49 * in the system. */
50 typedef uint32 comm_Id_t;
51
52 /*! @brief This enum holds an enumerated value describing the state of a channel. */
53 typedef enum comm_State_vals comm_State_t;
54
55 /*! @brief This type is for a channel address for both 7-bit and 10-bit addresses. */
56 typedef uint32 comm_Address_t;
57
58 /*! @brief This is a bit array of flags governing device read/write behavior. */
59 typedef uint8 comm_Flags_t;
60
61 #endif /* COMM_H */
62
comm_State_vals
comm_State_vals
This enum defines the possible communications channel states.
Definition: isf_comm.h:25
uint8
unsigned char uint8
Definition: isf_types.h:76
COMM_ERROR_STOP
Definition: isf_comm.h:37
COMM_ERROR_DEV_CLOSED
Definition: isf_comm.h:44
COMM_STATE_NO_INIT
Definition: isf_comm.h:26
COMM_ERROR_NOEXIST
Definition: isf_comm.h:41
comm_Id_t
uint32 comm_Id_t
This type is for a numeric channel identifier- index into an array of channels in the system...
Definition: isf_comm.h:50
COMM_ERROR_BUF_SIZE
Definition: isf_comm.h:42
COMM_STATE_INIT
Definition: isf_comm.h:27
comm_Error_vals
comm_Error_vals
This enum defines the possible communications channel error codes.
Definition: isf_comm.h:35
COMM_ERROR_TIME_OUT
Definition: isf_comm.h:39
COMM_ERROR_NO_ACK
Definition: isf_comm.h:43
comm_Flags_t
uint8 comm_Flags_t
This is a bit array of flags governing device read/write behavior.
Definition: isf_comm.h:59
COMM_STATE_ARB_LOST
Definition: isf_comm.h:31
COMM_STATE_OK
Definition: isf_comm.h:28
comm_Address_t
uint32 comm_Address_t
This type is for a channel address for both 7-bit and 10-bit addresses.
Definition: isf_comm.h:56
COMM_ERROR_LOCK
Definition: isf_comm.h:38
COMM_ERROR_INIT
Definition: isf_comm.h:36
isf.h
Main ISF header file. Contains code common to all ISF components.
COMM_ERROR_NULL_PTR
Definition: isf_comm.h:40
COMM_STATE_ERROR
Definition: isf_comm.h:30
comm_State_t
enum comm_State_vals comm_State_t
This enum holds an enumerated value describing the state of a channel.
Definition: isf_comm.h:53
COMM_STATE_STOPPED
Definition: isf_comm.h:29
uint32
unsigned long int uint32
Definition: isf_types.h:78
COMM_ERROR_OTHER
Definition: isf_comm.h:45
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.