![]() |
MCUSW
|
This files defines SPI MCAL configuration structures
Data Structures | |
struct | Spi_ChannelConfigType |
SPI Channel configuration structure. More... | |
struct | Spi_McspiExternalDeviceConfigType |
SPI Job configuration structure specific to McSPI peripheral. More... | |
struct | Spi_ExternalDeviceConfigType |
SPI external device specific configuration structure . More... | |
struct | Spi_JobConfigType |
SPI Job configuration structure. More... | |
struct | Spi_SeqConfigType |
SPI Sequence configuration structure. More... | |
struct | Spi_HwUnitConfigType |
SPI Hardware unit configuration structure. More... | |
struct | Spi_ConfigType |
SPI config structure. More... | |
struct | Spi_ChannelConfigType_PC |
SPI channel config structure parameters Pre-Compile only. More... | |
struct | Spi_JobConfigType_PC |
SPI job config structure parameters Pre-Compile only. More... | |
struct | Spi_SeqConfigType_PC |
SPI sequence config structure parameters Pre-Compile only. More... | |
struct | Spi_RegisterReadbackType |
SPI register readback structure. More... | |
Variables | |
const struct Spi_ConfigType_s | SpiDriver |
SPI Configuration struct declaration. More... | |
const struct Spi_ChannelConfigType_PC_s | Spi_ChannelConfig_PC [SPI_MAX_CHANNELS] |
SPI Channel PC Configuration struct declaration. More... | |
const struct Spi_JobConfigType_PC_s | Spi_JobConfig_PC [SPI_MAX_JOBS] |
SPI Job PC Configuration struct declaration. More... | |
const struct Spi_SeqConfigType_PC_s | Spi_SeqConfig_PC [SPI_MAX_SEQ] |
SPI Sequence PC Configuration struct declaration. More... | |
Enumerations | |
enum | Spi_StatusType { SPI_UNINIT = 0U, SPI_IDLE = 1U, SPI_BUSY = 2U } |
This type defines a range of specific status for SPI Handler/Driver. More... | |
enum | Spi_HwUnitType { CSIB0 = 0U, CSIB1, CSIB2, CSIB3, CSIB4, CSIB5, CSIB6, CSIB7, CSIB8, CSIB9, CSIB10 } |
This type defines a range of HW SPI Hardware microcontroller peripheral allocated to this Job. More... | |
enum | Spi_JobResultType { SPI_JOB_OK = 0U, SPI_JOB_PENDING = 1U, SPI_JOB_FAILED = 2U, SPI_JOB_QUEUED = 3U } |
This type defines a range of specific Jobs status for SPI Handler/Driver. More... | |
enum | Spi_SeqResultType { SPI_SEQ_OK = 0U, SPI_SEQ_PENDING = 1U, SPI_SEQ_FAILED = 2U, SPI_SEQ_CANCELLED = 3U } |
This type defines a range of specific Sequences status for SPI Handler/Driver. More... | |
enum | Spi_HwUnitResultType { SPI_HW_UNIT_OK = 0U, SPI_HW_UNIT_PENDING = 1U, SPI_HW_UNIT_FAILED = 2U } |
This type defines a range of specific HW unit status for SPI Handler/Driver. More... | |
enum | Spi_AsyncModeType { SPI_POLLING_MODE = 0U, SPI_INTERRUPT_MODE = 1U } |
Specifies the asynchronous mechanism mode for SPI busses handled asynchronously in LEVEL 2. More... | |
enum | Spi_TransferType { SPI_MSB = 0U, SPI_LSB = 1U } |
Word transfer order - MSB first or LSB first. More... | |
enum | Spi_LevelType { SPI_LOW = STD_LOW, SPI_HIGH } |
Type for SPI Chip Select Polarity and Clock Idle Level. More... | |
enum | Spi_CsPinType { SPI_CS0 = 0U, SPI_CS1, SPI_CS2, SPI_CS3 } |
SPI Chip Select Pin. More... | |
enum | Spi_ClkMode { SPI_CLK_MODE_0 = 0x00U, SPI_CLK_MODE_1 = 0x01U, SPI_CLK_MODE_2 = 0x02U, SPI_CLK_MODE_3 = 0x03U } |
SPI Clock Mode - sets the clock polarity and phase. Note: These values are a direct register mapping. So don't change value. More... | |
enum | Spi_TxRxMode { SPI_TX_RX_MODE_BOTH = 0x00U, SPI_TX_RX_MODE_TX_ONLY = 0x02U } |
SPI TX/RX Mode. More... | |
enum | Spi_JobPriorityType { SPI_JOB_PRIORITY_0 = 0U, SPI_JOB_PRIORITY_1, SPI_JOB_PRIORITY_2, SPI_JOB_PRIORITY_3 } |
SPI Job Priority. More... | |
enum | Spi_CsModeType { SPI_SINGLE = 0U, SPI_CONTINUOUS = 1U } |
SPI Chip Select Mode. More... | |
enum | Spi_DataDelayType { SPI_DATADELAY_0 = 0U, SPI_DATADELAY_1 = 1U, SPI_DATADELAY_2 = 2U, SPI_DATADELAY_3 = 3U } |
Spi_DataDelayType defines the number of interface clock cycles between CS toggling and first or last edge of MCSPI clock. More... | |
enum | Spi_DataLineReceiveType { DATA_LINE_0_RECEPTION = 0U, DATA_LINE_1_RECEPTION = 1U } |
Spi_DataLineReceiveType defines the lines selected for reception. More... | |
enum | Spi_DataLineTransmitType { DATA_LINE_NO_TRANSMISSION = 0x3U, DATA_LINE_0_TRANSMISSION = 0x2U, DATA_LINE_1_TRANSMISSION = 0x1U, DATA_LINE_BOTH_TRANSMISSION = 0x0U } |
Spi_DataLineTransmitType defines the lines selected for transmission. More... | |
Macros | |
#define | SPI_VARIANT_POST_BUILD (STD_ON) |
SPI Build Variant. Build variants.(i.e Pre Compile,Post Build or Link time) More... | |
#define | SPI_CHANNELBUFFERS (SPI_IB_EB) |
Pre Compile config macro name. More... | |
#define | SPI_IB_MAX_LENGTH (64U) |
Internal Buffer length in bytes - applicable only for SPI_IB. More... | |
#define | SPI_DEV_ERROR_DETECT (STD_ON) |
Enable/disable SPI dev detect error. More... | |
#define | SPI_JOB_LOG (STD_ON) |
Enable/disable SPI job log. More... | |
#define | SPI_MAX_JOB_LOG (100U) |
Maximum job log entries when logging is ON. More... | |
#define | SPI_LEVEL_0 (0U) |
Basic Synchronous functions. More... | |
#define | SPI_LEVEL_1 (1U) |
Basic Asynchronous functions. More... | |
#define | SPI_LEVEL_2 (2U) |
Synchronous and Asynchronous functions. More... | |
#define | SPI_SUPPORT_CONCURRENT_SYNC_TRANSMIT (STD_OFF) |
Concurrent sync transmit support - by defualt this is off. More... | |
#define | SPI_SCALEABILITY (SPI_LEVEL_2) |
Scalability level. More... | |
#define | SPI_VERSION_INFO_API (STD_ON) |
Enable/disable SPI get version info API. More... | |
#define | SPI_HW_STATUS_API (STD_ON) |
Enable/disable SPI HW Status API. More... | |
#define | SPI_CANCEL_API (STD_ON) |
Enable/disable SPI cancel API. More... | |
#define | SPI_MAX_CHANNELS_PER_JOB (1U) |
Maximum channels allowed per job. More... | |
#define | SPI_MAX_JOBS_PER_SEQ (1U) |
Maximum jobs allowed per sequence. More... | |
#define | SPI_MAX_CHANNELS (1U) |
Maximum channels across all jobs/sequence/hwunit. More... | |
#define | SPI_MAX_JOBS (1U) |
Maximum jobs across all sequence/hwunit. More... | |
#define | SPI_MAX_SEQ (1U) |
Maximum sequence across all hwunit. More... | |
#define | SPI_MAX_HW_UNIT (8U) |
Maximum HW unit - This should match the sum for the below units ISR which are ON. More... | |
#define | SPI_MAX_EXT_DEV (11U) |
Maximum external device cfg. More... | |
#define | SPI_UNIT_MCU_MCSPI0_ACTIVE (STD_ON) |
Enable/disable SPI MCU MCSPI0 unit ISR. More... | |
#define | SPI_UNIT_MCU_MCSPI1_ACTIVE (STD_ON) |
Enable/disable SPI MCU MCSPI1 unit ISR. More... | |
#define | SPI_UNIT_MCU_MCSPI2_ACTIVE (STD_ON) |
Enable/disable SPI MCU MCSPI2 unit ISR. More... | |
#define | SPI_UNIT_MCSPI0_ACTIVE (STD_ON) |
Enable/disable SPI MCSPI0 unit ISR. More... | |
#define | SPI_UNIT_MCSPI1_ACTIVE (STD_ON) |
Enable/disable SPI MCSPI1 unit ISR. More... | |
#define | SPI_UNIT_MCSPI2_ACTIVE (STD_ON) |
Enable/disable SPI MCSPI2 unit ISR. More... | |
#define | SPI_UNIT_MCSPI3_ACTIVE (STD_ON) |
Enable/disable SPI MCSPI3 unit ISR. More... | |
#define | SPI_UNIT_MCSPI4_ACTIVE (STD_ON) |
Enable/disable SPI MCSPI4 unit ISR. More... | |
#define | SPI_UNIT_MCSPI5_ACTIVE (STD_OFF) |
Enable/disable SPI MCSPI5 unit ISR. More... | |
#define | SPI_UNIT_MCSPI6_ACTIVE (STD_OFF) |
Enable/disable SPI MCSPI6 unit ISR. More... | |
#define | SPI_UNIT_MCSPI7_ACTIVE (STD_OFF) |
Enable/disable SPI MCSPI7 unit ISR. More... | |
#define | SPI_ISR_TYPE (SPI_ISR_CAT1) |
ISR type. More... | |
#define | SPI_OS_COUNTER_ID ((CounterType)OsCounter_0) |
OS counter ID - used for timeout in case of error. More... | |
#define | SPI_TIMEOUT_DURATION (32000U) |
SPI timeout - used in McSPI IP reset Each tick is 31.25us (for 32K Counter). Wait for 100ms which comes to below value. More... | |
#define | SPI_REGISTER_READBACK_API (STD_ON) |
Enable/disable SPI register read back API. More... | |
#define | SpiConf_SpiChannel_SpiChannel_0 (0U) |
Symbolic Name Channel Id - 0 SpiChannel_0. More... | |
#define | SpiConf_SpiExternalDevice_CS0 (SPI_CS0) |
Symbolic Name Chip Select - 0. More... | |
#define | SpiConf_SpiJob_SpiJob_0 (0U) |
Symbolic Name Job Id - 0 SpiJob_0. More... | |
#define | SpiConf_SpiSequence_SpiSequence_0 (0U) |
Symbolic Name Sequence Id - 0 SpiSequence_0. More... | |
#define | SpiConf_SpiExternalDevice_HwUnitId0 (CSIB0) |
Symbolic Name HW Unit - 0. More... | |
#define | SpiConf_SpiExternalDevice_HwUnitId1 (CSIB1) |
Symbolic Name HW Unit - 1. More... | |
#define | SpiConf_SpiExternalDevice_HwUnitId2 (CSIB2) |
Symbolic Name HW Unit - 2. More... | |
#define | SpiConf_SpiExternalDevice_HwUnitId3 (CSIB3) |
Symbolic Name HW Unit - 3. More... | |
#define | SpiConf_SpiExternalDevice_HwUnitId4 (CSIB4) |
Symbolic Name HW Unit - 4. More... | |
#define | SpiConf_SpiExternalDevice_HwUnitId5 (CSIB5) |
Symbolic Name HW Unit - 5. More... | |
#define | SpiConf_SpiExternalDevice_HwUnitId6 (CSIB6) |
Symbolic Name HW Unit - 6. More... | |
#define | SpiConf_SpiExternalDevice_HwUnitId7 (CSIB7) |
Symbolic Name HW Unit - 7. More... | |
SPI DEM Error codes to report | |
#define | DemConf_DemEventParameter_SPI_DEM_NO_EVENT (0xFFFFU) |
#define | SPI_DEM_NO_EVENT DemConf_DemEventParameter_SPI_DEM_NO_EVENT |
#define | SPI_E_HARDWARE_ERROR (DemConf_DemEventParameter_SPI_E_HARDWARE_ERROR) |
Hardware failed. More... | |
#define SPI_VARIANT_POST_BUILD (STD_ON) |
SPI Build Variant. Build variants.(i.e Pre Compile,Post Build or Link time)
#define SPI_CHANNELBUFFERS (SPI_IB_EB) |
Pre Compile config macro name.
Buffer mode - Internal or External or Both
#define SPI_IB_MAX_LENGTH (64U) |
Internal Buffer length in bytes - applicable only for SPI_IB.
#define SPI_DEV_ERROR_DETECT (STD_ON) |
Enable/disable SPI dev detect error.
#define SPI_JOB_LOG (STD_ON) |
Enable/disable SPI job log.
#define SPI_MAX_JOB_LOG (100U) |
Maximum job log entries when logging is ON.
#define SPI_LEVEL_0 (0U) |
Basic Synchronous functions.
#define SPI_LEVEL_1 (1U) |
Basic Asynchronous functions.
#define SPI_LEVEL_2 (2U) |
Synchronous and Asynchronous functions.
#define SPI_SUPPORT_CONCURRENT_SYNC_TRANSMIT (STD_OFF) |
Concurrent sync transmit support - by defualt this is off.
#define SPI_SCALEABILITY (SPI_LEVEL_2) |
Scalability level.
#define SPI_VERSION_INFO_API (STD_ON) |
Enable/disable SPI get version info API.
#define SPI_HW_STATUS_API (STD_ON) |
Enable/disable SPI HW Status API.
#define SPI_CANCEL_API (STD_ON) |
Enable/disable SPI cancel API.
#define SPI_MAX_CHANNELS_PER_JOB (1U) |
Maximum channels allowed per job.
#define SPI_MAX_JOBS_PER_SEQ (1U) |
Maximum jobs allowed per sequence.
#define SPI_MAX_CHANNELS (1U) |
Maximum channels across all jobs/sequence/hwunit.
#define SPI_MAX_JOBS (1U) |
Maximum jobs across all sequence/hwunit.
#define SPI_MAX_SEQ (1U) |
Maximum sequence across all hwunit.
#define SPI_MAX_HW_UNIT (8U) |
Maximum HW unit - This should match the sum for the below units ISR which are ON.
#define SPI_MAX_EXT_DEV (11U) |
Maximum external device cfg.
#define SPI_UNIT_MCU_MCSPI0_ACTIVE (STD_ON) |
Enable/disable SPI MCU MCSPI0 unit ISR.
#define SPI_UNIT_MCU_MCSPI1_ACTIVE (STD_ON) |
Enable/disable SPI MCU MCSPI1 unit ISR.
#define SPI_UNIT_MCU_MCSPI2_ACTIVE (STD_ON) |
Enable/disable SPI MCU MCSPI2 unit ISR.
#define SPI_UNIT_MCSPI0_ACTIVE (STD_ON) |
Enable/disable SPI MCSPI0 unit ISR.
#define SPI_UNIT_MCSPI1_ACTIVE (STD_ON) |
Enable/disable SPI MCSPI1 unit ISR.
#define SPI_UNIT_MCSPI2_ACTIVE (STD_ON) |
Enable/disable SPI MCSPI2 unit ISR.
#define SPI_UNIT_MCSPI3_ACTIVE (STD_ON) |
Enable/disable SPI MCSPI3 unit ISR.
#define SPI_UNIT_MCSPI4_ACTIVE (STD_ON) |
Enable/disable SPI MCSPI4 unit ISR.
#define SPI_UNIT_MCSPI5_ACTIVE (STD_OFF) |
Enable/disable SPI MCSPI5 unit ISR.
#define SPI_UNIT_MCSPI6_ACTIVE (STD_OFF) |
Enable/disable SPI MCSPI6 unit ISR.
#define SPI_UNIT_MCSPI7_ACTIVE (STD_OFF) |
Enable/disable SPI MCSPI7 unit ISR.
#define SPI_ISR_TYPE (SPI_ISR_CAT1) |
ISR type.
#define SPI_OS_COUNTER_ID ((CounterType)OsCounter_0) |
OS counter ID - used for timeout in case of error.
#define SPI_TIMEOUT_DURATION (32000U) |
SPI timeout - used in McSPI IP reset Each tick is 31.25us (for 32K Counter). Wait for 100ms which comes to below value.
#define SPI_REGISTER_READBACK_API (STD_ON) |
Enable/disable SPI register read back API.
#define SpiConf_SpiChannel_SpiChannel_0 (0U) |
Symbolic Name Channel Id - 0 SpiChannel_0.
#define SpiConf_SpiExternalDevice_CS0 (SPI_CS0) |
Symbolic Name Chip Select - 0.
#define SpiConf_SpiJob_SpiJob_0 (0U) |
Symbolic Name Job Id - 0 SpiJob_0.
#define SpiConf_SpiSequence_SpiSequence_0 (0U) |
Symbolic Name Sequence Id - 0 SpiSequence_0.
#define SpiConf_SpiExternalDevice_HwUnitId0 (CSIB0) |
Symbolic Name HW Unit - 0.
#define SpiConf_SpiExternalDevice_HwUnitId1 (CSIB1) |
Symbolic Name HW Unit - 1.
#define SpiConf_SpiExternalDevice_HwUnitId2 (CSIB2) |
Symbolic Name HW Unit - 2.
#define SpiConf_SpiExternalDevice_HwUnitId3 (CSIB3) |
Symbolic Name HW Unit - 3.
#define SpiConf_SpiExternalDevice_HwUnitId4 (CSIB4) |
Symbolic Name HW Unit - 4.
#define SpiConf_SpiExternalDevice_HwUnitId5 (CSIB5) |
Symbolic Name HW Unit - 5.
#define SpiConf_SpiExternalDevice_HwUnitId6 (CSIB6) |
Symbolic Name HW Unit - 6.
#define SpiConf_SpiExternalDevice_HwUnitId7 (CSIB7) |
Symbolic Name HW Unit - 7.
#define DemConf_DemEventParameter_SPI_DEM_NO_EVENT (0xFFFFU) |
#define SPI_DEM_NO_EVENT DemConf_DemEventParameter_SPI_DEM_NO_EVENT |
#define SPI_E_HARDWARE_ERROR (DemConf_DemEventParameter_SPI_E_HARDWARE_ERROR) |
Hardware failed.
enum Spi_StatusType |
enum Spi_HwUnitType |
This type defines a range of HW SPI Hardware microcontroller peripheral allocated to this Job.
enum Spi_JobResultType |
This type defines a range of specific Jobs status for SPI Handler/Driver.
enum Spi_SeqResultType |
This type defines a range of specific Sequences status for SPI Handler/Driver.
enum Spi_HwUnitResultType |
enum Spi_AsyncModeType |
Specifies the asynchronous mechanism mode for SPI busses handled asynchronously in LEVEL 2.
enum Spi_TransferType |
enum Spi_LevelType |
enum Spi_CsPinType |
enum Spi_ClkMode |
SPI Clock Mode - sets the clock polarity and phase. Note: These values are a direct register mapping. So don't change value.
enum Spi_TxRxMode |
SPI TX/RX Mode.
Note:
Enumerator | |
---|---|
SPI_TX_RX_MODE_BOTH | Both TX and RX are enabled |
SPI_TX_RX_MODE_TX_ONLY | Only TX is enabled |
enum Spi_JobPriorityType |
enum Spi_CsModeType |
enum Spi_DataDelayType |
Spi_DataLineTransmitType defines the lines selected for transmission.
const struct Spi_ConfigType_s SpiDriver |
SPI Configuration struct declaration.
const struct Spi_ChannelConfigType_PC_s Spi_ChannelConfig_PC[SPI_MAX_CHANNELS] |
SPI Channel PC Configuration struct declaration.
const struct Spi_JobConfigType_PC_s Spi_JobConfig_PC[SPI_MAX_JOBS] |
SPI Job PC Configuration struct declaration.
const struct Spi_SeqConfigType_PC_s Spi_SeqConfig_PC[SPI_MAX_SEQ] |
SPI Sequence PC Configuration struct declaration.