Arduino Core for STM32  1.0
SPI callback methods for event handling

Those methods are for setting callback functions, that are called when interrupt from SPI periphery occurs (error interrupt, half or done interrupt caused by NonBlocking transaction methods) and for handling those interrupts. More...

Functions

void HardwareSPI::setWriteDoneCallback (void(*WriteDoneCallback_)())
 Sets callback function, that will be called when all data using writeBytesNonBlocking() method were send. More...
 
void HardwareSPI::setTransferDoneCallback (void(*TransferDoneCallback_)())
 Sets callback function, that will be called when all data using transferBytesNonBlocking() method were transfered. More...
 
void HardwareSPI::setReceiveDoneCallback (void(*ReceiveDoneCallback_)())
 Sets callback function, that will be called when all data using receiveBytesNonBlocking() method were received. More...
 
void HardwareSPI::setWriteHalfCallback (void(*WriteHalfCallback_)())
 Sets callback function, that will be called when half of data using writeBytesNonBlocking() method were send. More...
 
void HardwareSPI::setTransferHalfCallback (void(*TransferHalfCallback_)())
 Sets callback function, that will be called when half of data using transferBytesNonBlocking() method were transfered. More...
 
void HardwareSPI::setReceiveHalfCallback (void(*ReceiveHalfCallback_)())
 Sets callback function, that will be called when half of data using receiveBytesNonBlocking() method were received. More...
 
void HardwareSPI::setErrorCallback (void(*ErrorCallback_)(SPI_ErrorCode))
 Sets callback function, that will be called when an error has occurred. More...
 
static void HardwareSPI::handleWriteDoneCallback (SPI_TypeDef *instance)
 Handles WriteDone callback function. More...
 
static void HardwareSPI::handleTransferDoneCallback (SPI_TypeDef *instance)
 Handles TransferDone callback function. More...
 
static void HardwareSPI::handleReceiveDoneCallback (SPI_TypeDef *instance)
 Handles ReceiveDone callback function. More...
 
static void HardwareSPI::handleWriteHalfCallback (SPI_TypeDef *instance)
 Handles WriteHalf callback function. More...
 
static void HardwareSPI::handleTransferHalfCallback (SPI_TypeDef *instance)
 Handles TransferHalf callback function. More...
 
static void HardwareSPI::handleReceiveHalfCallback (SPI_TypeDef *instance)
 Handles ReceiveHalf callback function. More...
 
static void HardwareSPI::handleErrorCallback (SPI_TypeDef *instance)
 Handles Error callback function. More...
 

Detailed Description

Those methods are for setting callback functions, that are called when interrupt from SPI periphery occurs (error interrupt, half or done interrupt caused by NonBlocking transaction methods) and for handling those interrupts.

Function Documentation

◆ setWriteDoneCallback()

void HardwareSPI::setWriteDoneCallback ( void(*)()  WriteDoneCallback_)
inline

Sets callback function, that will be called when all data using writeBytesNonBlocking() method were send.

Parameters
WriteDoneCallback_Callback function. When set to NULL, callback is disabled.

◆ setTransferDoneCallback()

void HardwareSPI::setTransferDoneCallback ( void(*)()  TransferDoneCallback_)
inline

Sets callback function, that will be called when all data using transferBytesNonBlocking() method were transfered.

Parameters
TransferDoneCallback_Callback function. When set to NULL, callback is disabled.

◆ setReceiveDoneCallback()

void HardwareSPI::setReceiveDoneCallback ( void(*)()  ReceiveDoneCallback_)
inline

Sets callback function, that will be called when all data using receiveBytesNonBlocking() method were received.

Parameters
ReceiveDoneCallback_Callback function. When set to NULL, callback is disabled.

◆ setWriteHalfCallback()

void HardwareSPI::setWriteHalfCallback ( void(*)()  WriteHalfCallback_)
inline

Sets callback function, that will be called when half of data using writeBytesNonBlocking() method were send.

Parameters
WriteHalfCallback_Callback function. When set to NULL, callback is disabled.

◆ setTransferHalfCallback()

void HardwareSPI::setTransferHalfCallback ( void(*)()  TransferHalfCallback_)
inline

Sets callback function, that will be called when half of data using transferBytesNonBlocking() method were transfered.

Parameters
TransferHalfCallback_Callback function. When set to NULL, callback is disabled.

◆ setReceiveHalfCallback()

void HardwareSPI::setReceiveHalfCallback ( void(*)()  ReceiveHalfCallback_)
inline

Sets callback function, that will be called when half of data using receiveBytesNonBlocking() method were received.

Parameters
ReceiveHalfCallback_Callback function. When set to NULL, callback is disabled.

◆ setErrorCallback()

void HardwareSPI::setErrorCallback ( void(*)(SPI_ErrorCode ErrorCallback_)
inline

Sets callback function, that will be called when an error has occurred.

Parameters
ErrorCallback_Callback function. When set to NULL, callback is disabled.

◆ handleWriteDoneCallback()

void HardwareSPI::handleWriteDoneCallback ( SPI_TypeDef *  instance)
inlinestatic

Handles WriteDone callback function.

This method have to be included in HAL WriteDone callback function.

Parameters
instanceSPI instance which callback function will be called. (values: SPI1, SPI2, SPI3, ...)
Here is the call graph for this function:

◆ handleTransferDoneCallback()

void HardwareSPI::handleTransferDoneCallback ( SPI_TypeDef *  instance)
inlinestatic

Handles TransferDone callback function.

This method have to be included in HAL TransferDone callback function.

Parameters
instanceSPI instance which callback function will be called. (values: SPI1, SPI2, SPI3, ...)
Here is the call graph for this function:

◆ handleReceiveDoneCallback()

void HardwareSPI::handleReceiveDoneCallback ( SPI_TypeDef *  instance)
inlinestatic

Handles ReceiveDone callback function.

This method have to be included in HAL ReceiveDone callback function.

Parameters
instanceSPI instance which callback function will be called. (values: SPI1, SPI2, SPI3, ...)
Here is the call graph for this function:

◆ handleWriteHalfCallback()

void HardwareSPI::handleWriteHalfCallback ( SPI_TypeDef *  instance)
inlinestatic

Handles WriteHalf callback function.

This method have to be included in HAL WriteHalf callback function.

Parameters
instanceSPI instance which callback function will be called. (values: SPI1, SPI2, SPI3, ...)
Here is the call graph for this function:

◆ handleTransferHalfCallback()

void HardwareSPI::handleTransferHalfCallback ( SPI_TypeDef *  instance)
inlinestatic

Handles TransferHalf callback function.

This method have to be included in HAL TransferHalf callback function.

Parameters
instanceSPI instance which callback function will be called. (values: SPI1, SPI2, SPI3, ...)
Here is the call graph for this function:

◆ handleReceiveHalfCallback()

void HardwareSPI::handleReceiveHalfCallback ( SPI_TypeDef *  instance)
inlinestatic

Handles ReceiveHalf callback function.

This method have to be included in HAL ReceiveHalf callback function.

Parameters
instanceSPI instance which callback function will be called. (values: SPI1, SPI2, SPI3, ...)
Here is the call graph for this function:

◆ handleErrorCallback()

void HardwareSPI::handleErrorCallback ( SPI_TypeDef *  instance)
inlinestatic

Handles Error callback function.

This method have to be included in HAL Error callback function.

Parameters
instanceSPI instance which callback function will be called. (values: SPI1, SPI2, SPI3, ...)
Here is the call graph for this function: