SPI_MASTER: SPI_MASTER.h File Reference

SPI_MASTER

SPI_MASTER.h File Reference

Detailed Description

Date
2016-06-20

NOTE: This file is generated by DAVE. Any manual modification done to this file will be lost when the code is regenerated.

Definition in file SPI_MASTER.h.

#include <xmc_gpio.h> #include <xmc_scu.h>
#include <xmc_spi.h>
#include <DAVE_Common.h>
#include "spi_master_conf.h"
#include "spi_master_extern.h"

Data Structures

struct  SPI_MASTER_GPIO
 Port pin selection for communication. More...
 
struct  SPI_MASTER_GPIO_CONFIG
 Pin configuration for the selected pins. More...
 
struct  SPI_MASTER_CONFIG
 Configuration parameters of SPI_MASTER APP. More...
 
struct  SPI_MASTER_RUNTIME
 Structure to hold the dynamic variables for the SPI_MASTER communication. More...
 
struct  SPI_MASTER
 Initialization parameters of SPI_MASTER APP. More...
 

Typedefs

typedef struct SPI_MASTER_GPIO SPI_MASTER_GPIO_t
 Port pin selection for communication.
 
typedef struct
SPI_MASTER_GPIO_CONFIG 
SPI_MASTER_GPIO_CONFIG_t
 Pin configuration for the selected pins.
 
typedef struct SPI_MASTER_CONFIG SPI_MASTER_CONFIG_t
 Configuration parameters of SPI_MASTER APP.
 
typedef struct SPI_MASTER_RUNTIME SPI_MASTER_RUNTIME_t
 Structure to hold the dynamic variables for the SPI_MASTER communication.
 
typedef struct SPI_MASTER SPI_MASTER_t
 Initialization parameters of SPI_MASTER APP.
 

Functions

DAVE_APP_VERSION_t SPI_MASTER_GetAppVersion (void)
 Get SPI_MASTER APP version. More...
 
SPI_MASTER_STATUS_t SPI_MASTER_Init (SPI_MASTER_t *const handle)
 Initialize the SPI channel as per the configuration made in GUI. More...
 
SPI_MASTER_STATUS_t SPI_MASTER_SetMode (SPI_MASTER_t *const handle, const XMC_SPI_CH_MODE_t mode)
 Set the communication mode along with required port configuration. More...
 
SPI_MASTER_STATUS_t SPI_MASTER_SetBaudRate (SPI_MASTER_t *const handle, const uint32_t baud_rate)
 Set the required baud rate during runtime. More...
 
SPI_MASTER_STATUS_t SPI_MASTER_Transmit (const SPI_MASTER_t *const handle, uint8_t *dataptr, uint32_t count)
 Transmits the specified number of data words and execute the callback defined in GUI, if enabled. More...
 
SPI_MASTER_STATUS_t SPI_MASTER_Receive (const SPI_MASTER_t *const handle, uint8_t *dataptr, uint32_t count)
 Receives the specified number of data words and execute the callback defined in GUI, if enabled. More...
 
SPI_MASTER_STATUS_t SPI_MASTER_Transfer (const SPI_MASTER_t *const handle, uint8_t *tx_dataptr, uint8_t *rx_dataptr, uint32_t count)
 Transmits and Receives the specified number of data words and execute the receive callback if it is enabled in GUI. More...
 
__STATIC_INLINE uint32_t SPI_MASTER_GetFlagStatus (const SPI_MASTER_t *handle, const uint32_t flag)
 Returns the state of the specified interrupt flag. More...
 
__STATIC_INLINE void SPI_MASTER_ClearFlag (const SPI_MASTER_t *handle, const uint32_t flag_mask)
 Clears the status of the specified interrupt flags. More...
 
__STATIC_INLINE bool SPI_MASTER_IsTxBusy (const SPI_MASTER_t *const handle)
 return the txbusy flag state More...
 
__STATIC_INLINE bool SPI_MASTER_IsRxBusy (const SPI_MASTER_t *const handle)
 return the rxbusy flag state More...
 
__STATIC_INLINE void SPI_MASTER_EnableSlaveSelectSignal (const SPI_MASTER_t *handle, const SPI_MASTER_SS_SIGNAL_t slave)
 Enables the specified slave select line. More...
 
__STATIC_INLINE void SPI_MASTER_DisableSlaveSelectSignal (const SPI_MASTER_t *handle)
 Disables the all the slave select lines. More...
 
__STATIC_INLINE uint16_t SPI_MASTER_GetReceivedWord (const SPI_MASTER_t *const handle)
 Provides data received in the receive buffer. More...
 
__STATIC_INLINE void SPI_MASTER_TransmitWord (const SPI_MASTER_t *const handle, const uint16_t data)
 Transmits a word of data. More...
 
__STATIC_INLINE void SPI_MASTER_EnableEvent (const SPI_MASTER_t *const handle, const uint32_t event_mask)
 Enables the selected protocol events for interrupt generation. More...
 
__STATIC_INLINE void SPI_MASTER_DisableEvent (const SPI_MASTER_t *const handle, const uint32_t event_mask)
 Disables selected events from generating interrupt. More...
 
__STATIC_INLINE void SPI_MASTER_SetTXFIFOTriggerLimit (const SPI_MASTER_t *const handle, const uint32_t limit)
 Configures trigger limit for the transmit FIFO. More...
 
__STATIC_INLINE void SPI_MASTER_SetRXFIFOTriggerLimit (const SPI_MASTER_t *const handle, const uint32_t limit)
 Configures trigger limit for the receive FIFO. More...
 
__STATIC_INLINE void SPI_MASTER_TXFIFO_EnableEvent (const SPI_MASTER_t *const handle, const uint32_t event)
 Enables the interrupt events related to transmit FIFO. More...
 
__STATIC_INLINE void SPI_MASTER_TXFIFO_DisableEvent (const SPI_MASTER_t *const handle, const uint32_t event)
 Disables the interrupt events related to transmit FIFO. More...
 
__STATIC_INLINE uint32_t SPI_MASTER_TXFIFO_GetEvent (const SPI_MASTER_t *const handle)
 Gets the transmit FIFO event status. More...
 
__STATIC_INLINE void SPI_MASTER_TXFIFO_ClearEvent (const SPI_MASTER_t *const handle, const uint32_t event)
 Clears the transmit FIFO event flags in the status register. More...
 
__STATIC_INLINE bool SPI_MASTER_IsTxFIFOFull (const SPI_MASTER_t *const handle)
 Checks if the transmit FIFO is full. More...
 
__STATIC_INLINE void SPI_MASTER_RXFIFO_EnableEvent (const SPI_MASTER_t *const handle, const uint32_t event)
 Enables the interrupt events related to transmit FIFO. More...
 
__STATIC_INLINE void SPI_MASTER_RXFIFO_DisableEvent (const SPI_MASTER_t *const handle, const uint32_t event)
 Disables the selected interrupt events related to receive FIFO. More...
 
__STATIC_INLINE uint32_t SPI_MASTER_RXFIFO_GetEvent (const SPI_MASTER_t *const handle)
 Get the receive FIFO events status. More...
 
__STATIC_INLINE void SPI_MASTER_RXFIFO_ClearEvent (const SPI_MASTER_t *const handle, const uint32_t event)
 Clears the receive FIFO event flags in the status register. More...
 
__STATIC_INLINE bool SPI_MASTER_IsRxFIFOEmpty (const SPI_MASTER_t *const handle)
 Checks if receive FIFO is empty. More...
 
SPI_MASTER_STATUS_t SPI_MASTER_AbortTransmit (const SPI_MASTER_t *const handle)
 Aborts the ongoing data transmission. More...
 
SPI_MASTER_STATUS_t SPI_MASTER_AbortReceive (const SPI_MASTER_t *const handle)
 Stops the active data reception request. More...
 
enum  SPI_MASTER_STATUS {
  SPI_MASTER_STATUS_SUCCESS = 0U, SPI_MASTER_STATUS_FAILURE, SPI_MASTER_STATUS_BUSY, SPI_MASTER_STATUS_BUFFER_INVALID,
  SPI_MASTER_STATUS_MODE_MISMATCH
}
 Return status of the SPI_MASTER APP. More...
 
enum  SPI_MASTER_SR_ID {
  SPI_MASTER_SR_ID_0 = 0U, SPI_MASTER_SR_ID_1, SPI_MASTER_SR_ID_2, SPI_MASTER_SR_ID_3,
  SPI_MASTER_SR_ID_4, SPI_MASTER_SR_ID_5
}
 Service ID for Transmit, Receive and Parity events. More...
 
enum  SPI_MASTER_SS_SIGNAL {
  SPI_MASTER_SS_SIGNAL_0 = 0U, SPI_MASTER_SS_SIGNAL_1, SPI_MASTER_SS_SIGNAL_2, SPI_MASTER_SS_SIGNAL_3,
  SPI_MASTER_SS_SIGNAL_4, SPI_MASTER_SS_SIGNAL_5, SPI_MASTER_SS_SIGNAL_6, SPI_MASTER_SS_SIGNAL_7
}
 Slave select signals. More...
 
enum  SPI_MASTER_INPUT {
  SPI_MASTER_INPUT_A = 0U, SPI_MASTER_INPUT_B, SPI_MASTER_INPUT_C, SPI_MASTER_INPUT_D,
  SPI_MASTER_INPUT_E, SPI_MASTER_INPUT_F, SPI_MASTER_INPUT_G, SPI_MASTER_INPUT_INVALID
}
 Enum type which defines Receive input list. More...
 
enum  SPI_MASTER_TRANSFER_MODE { SPI_MASTER_TRANSFER_MODE_INTERRUPT, SPI_MASTER_TRANSFER_MODE_DMA, SPI_MASTER_TRANSFER_MODE_DIRECT }
 Enum used to identify the transfer type used for either transmit or receive function. More...
 
typedef enum SPI_MASTER_STATUS SPI_MASTER_STATUS_t
 Return status of the SPI_MASTER APP.
 
typedef enum SPI_MASTER_SR_ID SPI_MASTER_SR_ID_t
 Service ID for Transmit, Receive and Parity events.
 
typedef enum SPI_MASTER_SS_SIGNAL SPI_MASTER_SS_SIGNAL_t
 Slave select signals.
 
typedef enum SPI_MASTER_INPUT SPI_MASTER_INPUT_t
 Enum type which defines Receive input list.
 
typedef enum
SPI_MASTER_TRANSFER_MODE 
SPI_MASTER_TRANSFER_MODE_t
 Enum used to identify the transfer type used for either transmit or receive function.
 

Go to the source code of this file.