PSOC E8XXGP Device Support Library

| PSOC E8XXGP Device Support Library

Functions
Interrupt
PDL API Reference » SCB (Serial Communication Block) » SPI (SCB) » Functions

## General Description

## Functions
void | Cy_SCB_SPI_Interrupt (CySCB_Type *base, cy_stc_scb_spi_context_t *context)
| This is the interrupt function for the SCB configured in the SPI mode. More...
__STATIC_INLINE void | Cy_SCB_SPI_RegisterCallback (CySCB_Type const *base, cy_cb_scb_spi_handle_events_t callback, cy_stc_scb_spi_context_t *context)
| Registers a callback function, which notifies that SPI Callback Events occurred in the Cy_SCB_SPI_Interrupt. More...

## Function Documentation

## ◆ Cy_SCB_SPI_Interrupt()

void Cy_SCB_SPI_Interrupt | ( | CySCB_Type * | base,
|  | cy_stc_scb_spi_context_t * | context
| ) |  |

This is the interrupt function for the SCB configured in the SPI mode.

This function must be called inside the user-defined interrupt service routine for Cy_SCB_SPI_Transfer to work.

Parameters

  base | The pointer to the SPI SCB instance.
  context | The pointer to the context structure cy_stc_scb_spi_context_t allocated by the user. The structure is used during the SPI operation for internal configuration and data retention. The user must not modify anything in this structure.

## ◆ Cy_SCB_SPI_RegisterCallback()

__STATIC_INLINE void Cy_SCB_SPI_RegisterCallback | ( | CySCB_Type const * | base,
|  | cy_cb_scb_spi_handle_events_t | callback,
|  | cy_stc_scb_spi_context_t * | context
| ) |  |

Registers a callback function, which notifies that SPI Callback Events occurred in the Cy_SCB_SPI_Interrupt.

Parameters

  base | The pointer to the SPI SCB instance.
  callback | The pointer to the callback function. See cy_cb_scb_spi_handle_events_t for the function prototype.
  context | The pointer to the context structure cy_stc_scb_spi_context_t allocated by the user. The structure is used during the SPI operation for internal configuration and data retention. The user should not modify anything in this structure.

Note
  - To remove the callback, pass NULL as the pointer to the callback function.
  - To get the event notification, the corresponding interrupt mask needs to be set in the interrupt mask register so that interrupt request register can trigger an interrupt event in Cy_SCB_SPI_Interrupt.