![]() |
ISF
1.1
Intelligent Sensing Framework
|
isf_comm.h defines the common types for the Communications Service Family of the Intelligent Sensing Framework (ISF). More...
#include <isf.h>
Go to the source code of this file.
Data Structures | |
struct | comm_MessageBuffer_struct |
This structure defines a buffer to hold data read from or written to a device. More... | |
struct | comm_Command_struct |
This structure defines the command sent to a device. More... | |
Defines | |
#define | COMM_SIZED_BUFFER(bufSize) struct { uint16 size; uint8 buffer[(bufSize)]; } |
This macro is used for creating sized read/write buffers. | |
#define | COMM_CMD_DEFN(cmdLen) struct { uint16 nWrite; uint16 nRead; uint8 cmdWords[(cmdLen)]; } |
This macro is used for creating concretely sized typedefs compatible with type comm_Command_t. | |
Typedefs | |
typedef uint8 | comm_Id_t |
This type is for a numeric channel identifier- index into an array of channels in the system. | |
typedef enum comm_State_vals | comm_State_t |
This enum holds an enumerated value describing the state of a channel. | |
typedef uint16 | comm_Address_t |
This type is for a channel address for both 7-bit and 10-bit addresses. | |
typedef uint32 | comm_Flags_t |
This is a bit array of flags governing device read/write behavior. | |
typedef struct comm_MessageBuffer_struct | comm_MessageBuffer_t |
This structure defines a buffer to hold data read from or written to a device. | |
typedef struct comm_Command_struct | comm_Command_t |
This structure defines the command sent to a device. | |
Enumerations | |
enum | comm_State_vals { COMM_STATE_NO_INIT = 0, COMM_STATE_INIT = 1, COMM_STATE_OK = 2, COMM_STATE_STOPPED = 3, COMM_STATE_LOCKED = 4, COMM_STATE_ERROR = 5, COMM_STATE_ARB_LOST = 6 } |
This enum defines the possible communications channel states. More... | |
enum | comm_Error_vals { COMM_ERROR_INIT = 1, COMM_ERROR_STOP = 2, COMM_ERROR_LOCK = 3, COMM_ERROR_TIME_OUT = 4, COMM_ERROR_NULL_PTR = 5, COMM_ERROR_NOEXIST = 6, COMM_ERROR_BUF_SIZE = 7, COMM_ERROR_NO_ACK = 8, COMM_ERROR_DEV_CLOSED = 9, COMM_ERROR_OTHER = 10 } |
This enum defines the possible communications channel error codes. More... |
isf_comm.h defines the common types for the Communications Service Family of the Intelligent Sensing Framework (ISF).
File: isf_comm.h
Copyright (c) 2012, Freescale Semiconductor, Inc.
This common types used by components in the ISF Communications Service Family, including the I2C and Device Messaging Components. Since the Device Messaging Component abstracts various communications interfaces (I2C, SPI, RGPIO), it is important to ensure that all abstracted components use common data types and function prototypes. These types and prototypes are defined in the header file rather than in the Device Messaging header file to avoid creating a circular dependency.
Definition in file isf_comm.h.
#define COMM_CMD_DEFN | ( | cmdLen | ) | struct { uint16 nWrite; uint16 nRead; uint8 cmdWords[(cmdLen)]; } |
This macro is used for creating concretely sized typedefs compatible with type comm_Command_t.
Definition at line 29 of file isf_comm.h.
#define COMM_SIZED_BUFFER | ( | bufSize | ) | struct { uint16 size; uint8 buffer[(bufSize)]; } |
This macro is used for creating sized read/write buffers.
Definition at line 25 of file isf_comm.h.
typedef uint16 comm_Address_t |
This type is for a channel address for both 7-bit and 10-bit addresses.
Definition at line 65 of file isf_comm.h.
typedef struct comm_Command_struct comm_Command_t |
This structure defines the command sent to a device.
typedef uint32 comm_Flags_t |
This is a bit array of flags governing device read/write behavior.
Definition at line 68 of file isf_comm.h.
This type is for a numeric channel identifier- index into an array of channels in the system.
Definition at line 59 of file isf_comm.h.
typedef struct comm_MessageBuffer_struct comm_MessageBuffer_t |
This structure defines a buffer to hold data read from or written to a device.
typedef enum comm_State_vals comm_State_t |
This enum holds an enumerated value describing the state of a channel.
Definition at line 62 of file isf_comm.h.
enum comm_Error_vals |
This enum defines the possible communications channel error codes.
Definition at line 44 of file isf_comm.h.
enum comm_State_vals |
This enum defines the possible communications channel states.
Definition at line 33 of file isf_comm.h.