|
ConOpSys V2970
P004.07
ANVILEX control operating system
|
STM32F429 on-chip SPI2 bus master module class. More...
#include <SPI2_STM32F429.h>


Public Member Functions | |
| virtual VOID | Init () |
| SPI bus initialisation method. More... | |
| virtual VOID | Start () |
| Start SPI bus operation method. More... | |
| virtual VOID | Stop () |
| Stop SPI bus operation method. More... | |
| virtual VOID | Transfer_Byte (U8 u8_Byte_To_Send, U8 *u8_Byte_To_Receive) |
| Send byte and receive byte over SPI bus at some time. More... | |
| virtual VOID | Send_Byte (U8 u8_Byte_To_Send) |
| Send byte over SPI bus. More... | |
| virtual VOID | Receive_Byte (U8 *u8_Byte_To_Receive) |
| Receive byte over SPI bus. More... | |
| virtual BOOL | Verify_Byte (U8 u8_Byte_To_Verify) |
| Verify byte over SPI bus. More... | |
Public Member Functions inherited from TSPI_Master_Base | |
| TSPI_Master_Base () | |
| Class constructor method. More... | |
| virtual | ~TSPI_Master_Base () |
| Class destructor method. More... | |
| VOID | Done () |
| SPI bus finalisation method. More... | |
| virtual VOID | PIO_Init ()=0 |
| PIO initialisation method. More... | |
| virtual VOID | PIO_Done ()=0 |
| PIO reinitialisation as GPIO method. More... | |
| virtual VOID | CS_Activate ()=0 |
| Activate (set to 0) SPI bus chip select signal. More... | |
| virtual VOID | CS_Deactivate ()=0 |
| Deactivate (set to 1) SPI bus chip select signal. More... | |
| VOID | Transfer_Buffer (U8 *u8_Buffer_To_Send, U8 *u8_Buffer_To_Receive, U16 u16_Length) |
| Send buffer and receive buffer over SPI bus at some time. More... | |
| virtual VOID | Set_Transmit_Mode () |
| Set transmit mode method. More... | |
| virtual VOID | Set_Receive_Mode () |
| Set receive mode method. More... | |
| virtual VOID | Set_MOSI () |
| Set MOSI in high state. More... | |
| virtual VOID | Clear_MOSI () |
| Set MOSI in low state. More... | |
| virtual VOID | Clear_Clock () |
| Set clock in low state. More... | |
| virtual VOID | Set_Clock () |
| Set clock in high state. More... | |
| virtual BOOL | Get_MISO () |
| Get MISO pin state. More... | |
Private Attributes | |
| const U32 | u32_Send_Byte_Timeout = (U32)5 |
| Timeout for byte sending 5 ms. More... | |
Additional Inherited Members | |
Protected Attributes inherited from TSPI_Master_Base | |
| BOOL | bool_Initialised = (BOOL)false |
| Object initialisation status. More... | |
STM32F429 on-chip SPI2 bus master module class.
|
virtual |
SPI bus initialisation method.
Implements TSPI_Master_Base.
References TSPI_Master_Base::bool_Initialised, TSPI_Master_Base::CS_Deactivate(), and TSPI_Master_Base::PIO_Init().

Receive byte over SPI bus.
| [in] | *u8_Byte_To_Receive | - Pointer to the byte to receive |
Implements TSPI_Master_Base.
References TSystem_Timer_Base::Get_Actual_Time(), TSystem_Timer_Base::Is_Timeout_ms(), object_System_Timer, and u32_Send_Byte_Timeout.

Send byte over SPI bus.
| [in] | u8_Byte_To_Send | - Byte to send |
Implements TSPI_Master_Base.
References TSystem_Timer_Base::Get_Actual_Time(), TSystem_Timer_Base::Is_Timeout_ms(), object_System_Timer, and u32_Send_Byte_Timeout.

|
virtual |
Start SPI bus operation method.
Implements TSPI_Master_Base.
|
virtual |
Stop SPI bus operation method.
Implements TSPI_Master_Base.
Send byte and receive byte over SPI bus at some time.
| [in] | u8_Byte_To_Send | - Byte to send |
| [in] | *u8_Byte_To_Receive | - Pointer to the byte to receive |
Reimplemented from TSPI_Master_Base.
References TSystem_Timer_Base::Get_Actual_Time(), TSystem_Timer_Base::Is_Timeout_ms(), object_System_Timer, and u32_Send_Byte_Timeout.

Verify byte over SPI bus.
| [in] | u8_Byte_To_Verify | - Byte to verify |
| false | - Verification error, bytes is different |
| true | - Verification cuccessed, bytes is equal |
Implements TSPI_Master_Base.
References TSystem_Timer_Base::Get_Actual_Time(), TSystem_Timer_Base::Is_Timeout_ms(), object_System_Timer, and u32_Send_Byte_Timeout.

Timeout for byte sending 5 ms.
Referenced by Receive_Byte(), Send_Byte(), Transfer_Byte(), and Verify_Byte().