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

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

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) 2015, 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_dspi_hal.h"
17 #include "fsl_dspi_master_driver.h"
18
19
20 typedef struct spi_master_BusConfig_struct {
21 isf_duration_t timeout; /*!< The bus timeout value to use.*/
22 dspi_device_t device; /*!< The configuration information.*/
23 dspi_master_user_config_t userConfig; /*!< The user configuration information.*/
24 } spi_master_busConfig_t;
25
26 /*! @brief This structure defines the data bus handle. */
27 typedef struct spi_mater_BusHandle_struct
28 {
29 dspi_master_state_t master; /*!< The pointer to the spi_master. */
30 uint32_t instance; /*!< The spi current instance.*/
31 spi_master_busConfig_t busConfig; /*!< The current bus configuration.*/
32 uint8 id; /*!< The unique ID associated with the bus handle. */
33 uint8 busState; /*!< The bus sate.*/
34 }spi_master_busHandle_t;
35 /*! @brief This structure defines the spi slave command format. */
36 typedef struct spi_mater_SlaveCmd
37 {
38
39 uint32 size; /*!< The tranfer size.*/
40 uint8 *pReadBuffer; /*!< The handle the readbuffer.*/
41 uint8 *pWriteBuffer; /*!< The handle the writecommand.*/
42 }spi_mater_slaveCmd_t;
43 /* Function pointer for the slave information*/
44 typedef isf_status_t (*fnslaveinit_t) (void);
45 typedef isf_status_t (*fnwritepreProcessing_t) (void *cmdOut, uint32 offset, uint32 size, void *writebuffer);
46 typedef isf_status_t (*fnwritepostProcossing_t) (void*cmd );
47 typedef isf_status_t (*fnreadpreProcessing_t) (void *cmdout, uint32 offset, uint32 size);
48 typedef isf_status_t (*fnreadpostProcossing_t) (void *cmd, void *dataOut);
49
50 /*! @brief This structure defines the slave specific spi information. */
51 typedef struct spi_mater_slaveInfo
52 {
53 fnslaveinit_t slaveinit; /*!< The slave specific initialisation.*/
54 fnwritepreProcessing_t writepreProcess; /*!< The slave specific pre-processing before write operation. */
55 fnwritepostProcossing_t writepostProcess; /*!< The slave specific post-processing after write operation. */
56 fnreadpreProcessing_t readpreProcess; /*!< The slave specific pre-processing before read operation. */
57 fnreadpostProcossing_t readpostProcess; /*!< The slave specific post-processing after read operation. */
58 }spi_master_slaveInfo_t;
59
60 typedef struct
61 {
62 spi_master_slaveInfo_t *pSlaveInfo; /*!< The slave specific info for Comm Specific device info */
63 spi_master_busConfig_t busConfig; /*!< The slave specific info for Bus initialization */
64 } spi_master_CommSpecificInfo_t;
65 #endif /* ISF_SPI_MASTER_TYPES_H_ */
66
67
68
69
70
71
72
spi_mater_SlaveCmd::size
uint32 size
Definition: isf_spi_master_types.h:39
spi_master_BusConfig_struct::userConfig
dspi_master_user_config_t userConfig
Definition: isf_spi_master_types.h:23
spi_master_busConfig_t
struct spi_master_BusConfig_struct spi_master_busConfig_t
uint8
unsigned char uint8
Definition: isf_types.h:76
spi_mater_slaveInfo::slaveinit
fnslaveinit_t slaveinit
Definition: isf_spi_master_types.h:53
spi_master_CommSpecificInfo_t
Definition: isf_spi_master_types.h:60
spi_mater_BusHandle_struct::busState
uint8 busState
Definition: isf_spi_master_types.h:33
spi_mater_BusHandle_struct::master
dspi_master_state_t master
Definition: isf_spi_master_types.h:29
spi_mater_slaveInfo
This structure defines the slave specific spi information.
Definition: isf_spi_master_types.h:51
spi_master_BusConfig_struct
Definition: isf_spi_master_types.h:20
spi_master_CommSpecificInfo_t::busConfig
spi_master_busConfig_t busConfig
Definition: isf_spi_master_types.h:63
spi_mater_SlaveCmd::pWriteBuffer
uint8 * pWriteBuffer
Definition: isf_spi_master_types.h:41
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::instance
uint32_t instance
Definition: isf_spi_master_types.h:30
spi_mater_slaveInfo::readpreProcess
fnreadpreProcessing_t readpreProcess
Definition: isf_spi_master_types.h:56
fnwritepreProcessing_t
isf_status_t(* fnwritepreProcessing_t)(void *cmdOut, uint32 offset, uint32 size, void *writebuffer)
Definition: isf_spi_master_types.h:45
spi_master_CommSpecificInfo_t::pSlaveInfo
spi_master_slaveInfo_t * pSlaveInfo
Definition: isf_spi_master_types.h:62
spi_mater_slaveInfo::readpostProcess
fnreadpostProcossing_t readpostProcess
Definition: isf_spi_master_types.h:57
spi_mater_SlaveCmd
This structure defines the spi slave command format.
Definition: isf_spi_master_types.h:36
spi_master_slaveInfo_t
struct spi_mater_slaveInfo spi_master_slaveInfo_t
This structure defines the slave specific spi information.
fnwritepostProcossing_t
isf_status_t(* fnwritepostProcossing_t)(void *cmd)
Definition: isf_spi_master_types.h:46
isf_duration_t
uint32 isf_duration_t
ISF time duration in microseconds.
Definition: isf.h:84
spi_mater_slaveInfo::writepreProcess
fnwritepreProcessing_t writepreProcess
Definition: isf_spi_master_types.h:54
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_master_BusConfig_struct::device
dspi_device_t device
Definition: isf_spi_master_types.h:22
fnreadpreProcessing_t
isf_status_t(* fnreadpreProcessing_t)(void *cmdout, uint32 offset, uint32 size)
Definition: isf_spi_master_types.h:47
spi_mater_slaveInfo::writepostProcess
fnwritepostProcossing_t writepostProcess
Definition: isf_spi_master_types.h:55
spi_mater_BusHandle_struct::busConfig
spi_master_busConfig_t busConfig
Definition: isf_spi_master_types.h:31
isf_status_t
int32 isf_status_t
ISF return status type.
Definition: isf.h:76
spi_mater_SlaveCmd::pReadBuffer
uint8 * pReadBuffer
Definition: isf_spi_master_types.h:40
spi_master_busHandle_t
struct spi_mater_BusHandle_struct spi_master_busHandle_t
This structure defines the data bus handle.
fnreadpostProcossing_t
isf_status_t(* fnreadpostProcossing_t)(void *cmd, void *dataOut)
Definition: isf_spi_master_types.h:48
spi_master_BusConfig_struct::timeout
isf_duration_t timeout
Definition: isf_spi_master_types.h:21
uint32
unsigned long int uint32
Definition: isf_types.h:78
spi_mater_BusHandle_struct
This structure defines the data bus handle.
Definition: isf_spi_master_types.h:27
spi_mater_BusHandle_struct::id
uint8 id
Definition: isf_spi_master_types.h:32
fnslaveinit_t
isf_status_t(* fnslaveinit_t)(void)
Definition: isf_spi_master_types.h:44
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.