Arduino Core for STM32  1.0
SPI advanced methods

Advanced methods can be useful, when you want to extend the functionality of this class using the HAL library or it's macros. They can be used also to control registers directly or can give some useful informations. More...

Functions

static uint32_t HardwareSPI::getSPIIndex (SPI_TypeDef *instance)
 Gets SPI instance index. More...
 
static HardwareSPI ** HardwareSPI::getSPIInstances ()
 Gets array of all created SPI instances (just from this class, not SPI structure). More...
 
static uint8_t HardwareSPI::getAvailableSPIsCount ()
 Gets all available SPIs instances count. More...
 
SPI_HandleTypeDef & HardwareSPI::getHAL_SPI_Struct ()
 Returns SPI structure, that is used for handling SPI. More...
 

Detailed Description

Advanced methods can be useful, when you want to extend the functionality of this class using the HAL library or it's macros. They can be used also to control registers directly or can give some useful informations.

Function Documentation

◆ getSPIIndex()

uint32_t HardwareSPI::getSPIIndex ( SPI_TypeDef *  instance)
static

Gets SPI instance index.

Parameters
instanceInstance of SPI to get index of. (e.g. SPI1, SPI2, ...)
Returns
Returns index of SPI instance that starts from 0. SPI instances that are not available in this chip are skipped.

◆ getSPIInstances()

static HardwareSPI** HardwareSPI::getSPIInstances ( )
static

Gets array of all created SPI instances (just from this class, not SPI structure).

Returns
Returns array of all created SPI instances (just from this class, not SPI structure).

◆ getAvailableSPIsCount()

static uint8_t HardwareSPI::getAvailableSPIsCount ( )
static

Gets all available SPIs instances count.

Returns
Returns all available SPIs instances count.

◆ getHAL_SPI_Struct()

SPI_HandleTypeDef& HardwareSPI::getHAL_SPI_Struct ( )
inline

Returns SPI structure, that is used for handling SPI.

Returns
Returns SPI structure, that is used for handling SPI