| 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
isf_spi_master_types.h
Go to the documentation of this file.
1 /*!
2 ********************************************************************************
3 * File: isf_spi_master_types.h
4 *
5 * Copyright (c) 2014, Freescale Semiconductor, Inc.
6 *
7 *******************************************************************************/
8 /*!
9 * @file isf_spi_master_types.h
10 * @brief \b isf_spi_master_types.h defines the spi protocol adapter structure and types.
11 */
12 #ifndef ISF_SPI_MASTER_TYPES_H_
13 #define ISF_SPI_MASTER_TYPES_H_
14 #include "isf_types.h"
15 #include "isf.h"
16 #include "fsl_spi_master_driver.h"
17 typedef struct spi_master_BusConfig_struct {
18 isf_duration_t timeout; /*!< The bus timeout value to use.*/
19 spi_user_config_t config; /*!< The configuration information.*/
20 } spi_master_busConfig_t;
21
22 /*! @brief This structure defines the data bus handle. */
23 typedef struct spi_mater_BusHandle_struct
24 {
25 spi_handle_t spiHandle; /*!< The spi current handle.*/
26 spi_master_busConfig_t busConfig; /*!< The current bus configuration.*/
27 uint8 id; /*!< The unique ID associated with the bus handle. */
28 uint8 busState; /*!< The bus sate.*/
29 }spi_master_busHandle_t;
30 /*! @brief This structure defines the spi slave command format. */
31 typedef struct spi_mater_SlaveCmd
32 {
33
34 uint32 size; /*!< The tranfer size.*/
35 uint8 *pReadBuffer; /*!< The handle the readbuffer.*/
36 uint8 *pWriteBuffer; /*!< The handle the writecommand.*/
37 }spi_mater_slaveCmd_t;
38 /* Function pointer for the slave information*/
39 typedef isf_status_t (*fnslaveinit_t) (void);
40 typedef isf_status_t (*fnwritepreProcessing_t) (void *cmdOut, uint32 offset, uint32 size, void *writebuffer);
41 typedef isf_status_t (*fnwritepostProcossing_t) (void*cmd );
42 typedef isf_status_t (*fnreadpreProcessing_t) (void *cmdout, uint32 offset, uint32 size);
43 typedef isf_status_t (*fnreadpostProcossing_t) (void *cmd, void *dataOut);
44
45 /*! @brief This structure defines the slave specific spi information. */
46 typedef struct spi_mater_slaveInfo
47 {
48 fnslaveinit_t slaveinit; /*!< The slave specific initialisation.*/
49 fnwritepreProcessing_t writepreProcess; /*!< The slave specific pre-processing before write operation. */
50 fnwritepostProcossing_t writepostProcess; /*!< The slave specific post-processing after write operation. */
51 fnreadpreProcessing_t readpreProcess; /*!< The slave specific pre-processing before read operation. */
52 fnreadpostProcossing_t readpostProcess; /*!< The slave specific post-processing after read operation. */
53 }spi_master_slaveInfo_t;
54
55 typedef struct
56 {
57 spi_master_busConfig_t busConfig; /*!< The slave specific info for Bus initialization */
58 spi_master_slaveInfo_t *pSlaveInfo; /*!< The slave specific info for Comm Specific device info */
59 } spi_master_CommSpecificInfo_t;
60 #endif /* ISF_SPI_MASTER_TYPES_H_ */
61
62
63
64
spi_mater_SlaveCmd::size
uint32 size
Definition: isf_spi_master_types.h:34
spi_master_busConfig_t
struct spi_master_BusConfig_struct spi_master_busConfig_t
uint8
unsigned char uint8
This defines uint8 as unsigned char.
Definition: isf_types.h:18
spi_mater_slaveInfo::slaveinit
fnslaveinit_t slaveinit
Definition: isf_spi_master_types.h:48
spi_master_CommSpecificInfo_t
Definition: isf_spi_master_types.h:55
fnreadpostProcossing_t
isf_status_t(* fnreadpostProcossing_t)(void *cmd, void *dataOut)
Definition: isf_spi_master_types.h:43
spi_mater_BusHandle_struct::busState
uint8 busState
Definition: isf_spi_master_types.h:28
fnwritepreProcessing_t
isf_status_t(* fnwritepreProcessing_t)(void *cmdOut, uint32 offset, uint32 size, void *writebuffer)
Definition: isf_spi_master_types.h:40
fnwritepostProcossing_t
isf_status_t(* fnwritepostProcossing_t)(void *cmd)
Definition: isf_spi_master_types.h:41
spi_master_BusConfig_struct::config
spi_user_config_t config
Definition: isf_spi_master_types.h:19
fsl_spi_master_driver.h
fsl_spi_master_driver.h defines structures and types for the spi master driver.
spi_mater_slaveInfo
This structure defines the slave specific spi information.
Definition: isf_spi_master_types.h:46
spi_master_BusConfig_struct
Definition: isf_spi_master_types.h:17
uint32
unsigned long uint32
This defines uint32 as unsigned long.
Definition: isf_types.h:36
spi_master_CommSpecificInfo_t::busConfig
spi_master_busConfig_t busConfig
Definition: isf_spi_master_types.h:57
fnslaveinit_t
isf_status_t(* fnslaveinit_t)(void)
Definition: isf_spi_master_types.h:39
spi_mater_SlaveCmd::pWriteBuffer
uint8 * pWriteBuffer
Definition: isf_spi_master_types.h:36
isf_types.h
The isf_types.h file contains the ISF data type definitions and some of the globally used macros...
spi_mater_BusHandle_struct::spiHandle
spi_handle_t spiHandle
Definition: isf_spi_master_types.h:25
fnreadpreProcessing_t
isf_status_t(* fnreadpreProcessing_t)(void *cmdout, uint32 offset, uint32 size)
Definition: isf_spi_master_types.h:42
spi_mater_slaveInfo::readpreProcess
fnreadpreProcessing_t readpreProcess
Definition: isf_spi_master_types.h:51
spi_master_CommSpecificInfo_t::pSlaveInfo
spi_master_slaveInfo_t * pSlaveInfo
Definition: isf_spi_master_types.h:58
spi_mater_slaveInfo::readpostProcess
fnreadpostProcossing_t readpostProcess
Definition: isf_spi_master_types.h:52
spi_mater_SlaveCmd
This structure defines the spi slave command format.
Definition: isf_spi_master_types.h:31
spi_master_slaveInfo_t
struct spi_mater_slaveInfo spi_master_slaveInfo_t
This structure defines the slave specific spi information.
isf_duration_t
uint32 isf_duration_t
ISF time duration in microseconds.
Definition: isf.h:59
spi_mater_slaveInfo::writepreProcess
fnwritepreProcessing_t writepreProcess
Definition: isf_spi_master_types.h:49
isf.h
Main ISF header file. Contains code common to all ISF components.
spi_mater_slaveCmd_t
struct spi_mater_SlaveCmd spi_mater_slaveCmd_t
This structure defines the spi slave command format.
spi_mater_slaveInfo::writepostProcess
fnwritepostProcossing_t writepostProcess
Definition: isf_spi_master_types.h:50
spi_mater_BusHandle_struct::busConfig
spi_master_busConfig_t busConfig
Definition: isf_spi_master_types.h:26
isf_status_t
int32 isf_status_t
ISF return status type.
Definition: isf.h:51
spi_mater_SlaveCmd::pReadBuffer
uint8 * pReadBuffer
Definition: isf_spi_master_types.h:35
spi_master_busHandle_t
struct spi_mater_BusHandle_struct spi_master_busHandle_t
This structure defines the data bus handle.
spi_master_BusConfig_struct::timeout
isf_duration_t timeout
Definition: isf_spi_master_types.h:18
SPIHandle
Definition: fsl_spi_master_driver.h:42
spi_mater_BusHandle_struct
This structure defines the data bus handle.
Definition: isf_spi_master_types.h:23
SPIUserConfig
Information about a device on the SPI bus.
Definition: fsl_spi_master_driver.h:35
spi_mater_BusHandle_struct::id
uint8 id
Definition: isf_spi_master_types.h:27
- © Freescale Semiconductor, Inc. 2015. All Rights Reserved.