diff --git a/docs/doxygen/html/_e_f___s_p_i_8c.html b/docs/doxygen/html/_e_f___s_p_i_8c.html index 574e7cb..e55d36e 100644 --- a/docs/doxygen/html/_e_f___s_p_i_8c.html +++ b/docs/doxygen/html/_e_f___s_p_i_8c.html @@ -145,6 +145,8 @@
C file for SPI APIs which contains the function Implementations.
@@ -649,6 +651,50 @@EF_DRIVER_STATUS EF_SPI_setICR | +( | +EF_SPI_TYPE_PTR | +spi, | +
+ | + | uint32_t | +mask | +
+ | ) | ++ |
sets the value of the Interrupt Clear Register; which clears the interrupts The mask value is a 6-bit value, where each bit corresponds to a specific interrupt
[in] | spi | An EF_SPI_TYPE pointer, which points to the base memory address of SPI registers. EF_SPI_TYPE is a structure that contains the SPI registers. |
[in] | mask | The required mask value |
+ EF_SPI APIs
+
+ |
+
+ EF_SPI APIs
+
+ |
+
C header file for common driver definitions and types.
+Type | Name |
---|---|
typedef uint32_t | **EF\_DRIVER\_STATUS** +A type that is used to return the status of the driver functions. |
Type | Name |
---|---|
define | **EF\_DRIVER\_ERROR** ((uint32_t)1) +Unspecified error. |
define | **EF\_DRIVER\_ERROR\_BUSY** ((uint32_t)2) +Driver is busy. |
define | **EF\_DRIVER\_ERROR\_PARAMETER** ((uint32_t)5) +Parameter error. |
define | **EF\_DRIVER\_ERROR\_SPECIFIC** ((uint32_t)6) +Start of driver specific errors. |
define | **EF\_DRIVER\_ERROR\_TIMEOUT** ((uint32_t)3) +Timeout occurred. |
define | **EF\_DRIVER\_ERROR\_UNSUPPORTED** ((uint32_t)4) +Operation not supported. |
define | **EF\_DRIVER\_OK** ((uint32_t)0) +Operation succeeded. |
A type that is used to return the status of the driver functions.
Unspecified error.
Driver is busy.
Parameter error.
Start of driver specific errors.
Timeout occurred.
Operation not supported.
Operation succeeded.
C header file for SPI APIs which contains the function prototypes.
+Type | Name |
---|---|
**EF\_DRIVER\_STATUS** | **EF\_SPI\_FifoRxFlush** (**EF\_SPI\_TYPE\_PTR** spi) +flushes the RX FIFO by writing to the RX FIFO FLUSH register |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_assertCs** (**EF\_SPI\_TYPE\_PTR** spi) +asserts the CS line by setting the SS bit in the CTRL register to 1, asserts the CS line to start a transaction with the slave |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_deassertCs** (**EF\_SPI\_TYPE\_PTR** spi) +deasserts the CS line by setting the SS bit in the CTRL register to 0, deasserts the CS line to end a transaction with the slave |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_disable** (**EF\_SPI\_TYPE\_PTR** spi) +disables the SPI by setting the enable bit in the CTRL register to 0, disables spi master pulse generation |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_disableRx** (**EF\_SPI\_TYPE\_PTR** spi) +disables the RX by setting the RX enable bit in the CTRL register to 0, disables storing bytes recieved from slave in RX FIFO |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_enable** (**EF\_SPI\_TYPE\_PTR** spi) +enables the SPI by setting the enable bit in the CTRL register to 1, enables spi master pulse generation |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_enableRx** (**EF\_SPI\_TYPE\_PTR** spi) +enables the RX by setting the RX enable bit in the CTRL register to 1, enables storing bytes recieved from slave in RX FIFO |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_getIM** (**EF\_SPI\_TYPE\_PTR** spi, uint32_t *mask) + |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_getMIS** (**EF\_SPI\_TYPE\_PTR** spi, uint32_t *mask) + |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_getRIS** (**EF\_SPI\_TYPE\_PTR** spi, uint32_t *mask) + |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_readData** (**EF\_SPI\_TYPE\_PTR** spi, uint32_t *data) +reads a byte of data from the RXDATA register |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_readRxFifoEmpty** (**EF\_SPI\_TYPE\_PTR** spi, uint32_t *RXfifo_state) +reads the RX FIFO empty flag from the STATUS register |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_readTxFifoEmpty** (**EF\_SPI\_TYPE\_PTR** spi, uint32_t *TXfifo_state) +reads the TX FIFO empty flag from the STATUS register |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_setGclkEnable** (**EF\_SPI\_TYPE\_PTR** spi, uint32_t value) +sets the GCLK enable bit in the SPI register to a certain value |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_setICR** (**EF\_SPI\_TYPE\_PTR** spi, uint32_t mask) + |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_setIM** (**EF\_SPI\_TYPE\_PTR** spi, uint32_t mask) + |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_waitRxFifoNotEmpty** (**EF\_SPI\_TYPE\_PTR** spi) +waits for the RX FIFO to be not empty by polling the RX FIFO empty flag in the STATUS register |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_waitTxFifoEmpty** (**EF\_SPI\_TYPE\_PTR** spi) +waits for the TX FIFO to be empty by polling the TX FIFO empty flag in the STATUS register |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_writeData** (**EF\_SPI\_TYPE\_PTR** spi, uint32_t data) +writes a byte of data to the TXDATA register |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_writePhase** (**EF\_SPI\_TYPE\_PTR** spi, bool phase) +sets the clock phase of the SPI in the CFG register to a certain value |
**EF\_DRIVER\_STATUS** | **EF\_SPI\_writepolarity** (**EF\_SPI\_TYPE\_PTR** spi, bool polarity) +sets the clock polarity of the SPI in the CFG register to a certain value |
flushes the RX FIFO by writing to the RX FIFO FLUSH register
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.Returns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+asserts the CS line by setting the SS bit in the CTRL register to 1, asserts the CS line to start a transaction with the slave
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.Returns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+deasserts the CS line by setting the SS bit in the CTRL register to 0, deasserts the CS line to end a transaction with the slave
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.Returns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+disables the SPI by setting the enable bit in the CTRL register to 0, disables spi master pulse generation
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.Returns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+disables the RX by setting the RX enable bit in the CTRL register to 0, disables storing bytes recieved from slave in RX FIFO
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.Returns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+enables the SPI by setting the enable bit in the CTRL register to 1, enables spi master pulse generation
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.Returns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+enables the RX by setting the RX enable bit in the CTRL register to 1, enables storing bytes recieved from slave in RX FIFO
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.Returns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+gets the value of the Interrupts Masking Register; which enable and disables interrupts The mask value is a 6-bit value, where each bit corresponds to a specific interrupt
+Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.mask
The required mask valueReturns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+gets the value of the Masked Interrupt Status Register; which shows the status of the interrupts after masking (ANDing) RIS by IM. The mask value is a 6-bit value, where each bit corresponds to a specific interrupt
+Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.mask
The required mask valueReturns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+gets the value of the Raw Interrupt Status Register; which shows the status of the interrupts The mask value is a 6-bit value, where each bit corresponds to a specific interrupt
+Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.mask
The required mask valueReturns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+reads a byte of data from the RXDATA register
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.data
The data read from the RXDATA registerReturns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+reads the RX FIFO empty flag from the STATUS register
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.RXfifo_state
The RX FIFO empty flag valueReturns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+reads the TX FIFO empty flag from the STATUS register
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.TXfifo_state
The TX FIFO empty flag valueReturns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+sets the GCLK enable bit in the SPI register to a certain value
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.value
The value of the GCLK enable bitReturns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+sets the value of the Interrupt Clear Register; which clears the interrupts The mask value is a 6-bit value, where each bit corresponds to a specific interrupt
+Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.mask
The required mask valueReturns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+sets the value of the Interrupts Masking Register; which enable and disables interrupts The mask value is a 6-bit value, where each bit corresponds to a specific interrupt
+Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.mask
The required mask valueReturns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+waits for the RX FIFO to be not empty by polling the RX FIFO empty flag in the STATUS register
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.Returns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+waits for the TX FIFO to be empty by polling the TX FIFO empty flag in the STATUS register
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.Returns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+writes a byte of data to the TXDATA register
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.data
The data to be written to the TXDATA registerReturns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+sets the clock phase of the SPI in the CFG register to a certain value
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.phase
The clock phase valueReturns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+sets the clock polarity of the SPI in the CFG register to a certain value
Parameters:
+spi
An **EF\_SPI\_TYPE** pointer, which points to the base memory address of SPI registers.**EF\_SPI\_TYPE** is a structure that contains the SPI registers.polarity
The clock polarity valueReturns:
+status A value of type **EF\_DRIVER\_STATUS** : returns a success or error code
+Type | Name |
---|---|
typedef struct **\_EF\_SPI\_TYPE\_** | **EF\_SPI\_TYPE** + |
typedef **EF\_SPI\_TYPE** * | **EF\_SPI\_TYPE\_PTR** + |
struct | **\_EF\_SPI\_TYPE\_** + |
Type | Name |
---|---|
define | **EF\_SPI\_CFG\_REG\_CPHA\_BIT** ((uint32_t)1) + |
define | **EF\_SPI\_CFG\_REG\_CPHA\_MASK** ((uint32_t)0x2) + |
define | **EF\_SPI\_CFG\_REG\_CPOL\_BIT** ((uint32_t)0) + |
define | **EF\_SPI\_CFG\_REG\_CPOL\_MASK** ((uint32_t)0x1) + |
define | **EF\_SPI\_CTRL\_REG\_ENABLE\_BIT** ((uint32_t)1) + |
define | **EF\_SPI\_CTRL\_REG\_ENABLE\_MASK** ((uint32_t)0x2) + |
define | **EF\_SPI\_CTRL\_REG\_RX\_EN\_BIT** ((uint32_t)2) + |
define | **EF\_SPI\_CTRL\_REG\_RX\_EN\_MASK** ((uint32_t)0x4) + |
define | **EF\_SPI\_CTRL\_REG\_SS\_BIT** ((uint32_t)0) + |
define | **EF\_SPI\_CTRL\_REG\_SS\_MASK** ((uint32_t)0x1) + |
define | **EF\_SPI\_RXA\_FLAG** ((uint32_t)0x20) + |
define | **EF\_SPI\_RXE\_FLAG** ((uint32_t)0x4) + |
define | **EF\_SPI\_RXF\_FLAG** ((uint32_t)0x8) + |
define | **EF\_SPI\_RX\_FIFO\_FLUSH\_REG\_FLUSH\_BIT** ((uint32_t)0) + |
define | **EF\_SPI\_RX\_FIFO\_FLUSH\_REG\_FLUSH\_MASK** ((uint32_t)0x1) + |
define | **EF\_SPI\_RX\_FIFO\_LEVEL\_REG\_LEVEL\_BIT** ((uint32_t)0) + |
define | **EF\_SPI\_RX\_FIFO\_LEVEL\_REG\_LEVEL\_MASK** ((uint32_t)0xf) + |
define | **EF\_SPI\_RX\_FIFO\_THRESHOLD\_REG\_THRESHOLD\_BIT** ((uint32_t)0) + |
define | **EF\_SPI\_RX\_FIFO\_THRESHOLD\_REG\_THRESHOLD\_MASK** ((uint32_t)0xf) + |
define | **EF\_SPI\_STATUS\_REG\_RX\_A\_BIT** ((uint32_t)5) + |
define | **EF\_SPI\_STATUS\_REG\_RX\_A\_MASK** ((uint32_t)0x20) + |
define | **EF\_SPI\_STATUS\_REG\_RX\_E\_BIT** ((uint32_t)2) + |
define | **EF\_SPI\_STATUS\_REG\_RX\_E\_MASK** ((uint32_t)0x4) + |
define | **EF\_SPI\_STATUS\_REG\_RX\_F\_BIT** ((uint32_t)3) + |
define | **EF\_SPI\_STATUS\_REG\_RX\_F\_MASK** ((uint32_t)0x8) + |
define | **EF\_SPI\_STATUS\_REG\_TX\_B\_BIT** ((uint32_t)4) + |
define | **EF\_SPI\_STATUS\_REG\_TX\_B\_MASK** ((uint32_t)0x10) + |
define | **EF\_SPI\_STATUS\_REG\_TX\_E\_BIT** ((uint32_t)0) + |
define | **EF\_SPI\_STATUS\_REG\_TX\_E\_MASK** ((uint32_t)0x1) + |
define | **EF\_SPI\_STATUS\_REG\_TX\_F\_BIT** ((uint32_t)1) + |
define | **EF\_SPI\_STATUS\_REG\_TX\_F\_MASK** ((uint32_t)0x2) + |
define | **EF\_SPI\_TXB\_FLAG** ((uint32_t)0x10) + |
define | **EF\_SPI\_TXE\_FLAG** ((uint32_t)0x1) + |
define | **EF\_SPI\_TXF\_FLAG** ((uint32_t)0x2) + |
define | **EF\_SPI\_TX\_FIFO\_FLUSH\_REG\_FLUSH\_BIT** ((uint32_t)0) + |
define | **EF\_SPI\_TX\_FIFO\_FLUSH\_REG\_FLUSH\_MASK** ((uint32_t)0x1) + |
define | **EF\_SPI\_TX\_FIFO\_LEVEL\_REG\_LEVEL\_BIT** ((uint32_t)0) + |
define | **EF\_SPI\_TX\_FIFO\_LEVEL\_REG\_LEVEL\_MASK** ((uint32_t)0xf) + |
define | **EF\_SPI\_TX\_FIFO\_THRESHOLD\_REG\_THRESHOLD\_BIT** ((uint32_t)0) + |
define | **EF\_SPI\_TX\_FIFO\_THRESHOLD\_REG\_THRESHOLD\_MASK** ((uint32_t)0xf) + |
define | **IO\_TYPES** + |
define | **\_\_R** volatile const uint32_t + |
define | **\_\_RW** volatile uint32_t + |
define | **\_\_W** volatile uint32_t + |
Variables:
+
+ EF_SPI APIs
+
+ |
+
►API Reference |