ConOpSys V2970
P004.07
ANVILEX control operating system
|
SPI master base class. More...
#include <SPI_Master_Base.h>
Public Member Functions | |
TSPI_Master_Base () | |
Class constructor method. More... | |
virtual | ~TSPI_Master_Base () |
Class destructor method. More... | |
virtual VOID | Init ()=0 |
SPI bus initialisation 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 | Start ()=0 |
Start SPI bus operation method. More... | |
virtual VOID | Stop ()=0 |
Stop SPI bus operation 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... | |
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)=0 |
Send byte over SPI bus. More... | |
virtual VOID | Receive_Byte (U8 *u8_Byte_To_Receive)=0 |
Receive byte over SPI bus. More... | |
virtual BOOL | Verify_Byte (U8 u8_Byte_To_Verify)=0 |
Verify byte over SPI bus. 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... | |
Protected Attributes | |
BOOL | bool_Initialised = (BOOL)false |
Object initialisation status. More... | |
SPI master base class.
TSPI_Master_Base::TSPI_Master_Base | ( | ) |
Class constructor method.
|
virtual |
Class destructor method.
|
virtual |
Set clock in low state.
Reimplemented in TSPI1_P016_05_PUC2.
Referenced by TSPI1_STM32F410CBU6::Receive_Byte(), and TSPI1_STM32F410CBU6::Send_Byte().
|
virtual |
Set MOSI in low state.
Reimplemented in TSPI1_P016_05_PUC2.
Referenced by TSPI1_STM32F410CBU6::Send_Byte().
|
pure virtual |
Activate (set to 0) SPI bus chip select signal.
Implemented in TSPI5_P017_39_KG3_CB, TSPI4_P017_39_KG3_CB, TSPI2_P017_39_KG3_CB, TSPI1_P016_05_PUC2, TSPI5_P015_27_V1_0_CB, TSPI2_P015_27_V1_0_CB, TSPI5_P015_09_CB, TSPI4_P015_09_CB, TSPI2_P015_09_CB, TSPI5_P014_51_CB, and TSPI2_P014_51_CB.
Referenced by TABCC_Base::Bus_Transaction(), TS25FL512::Erase_Block_By_Index(), TFM25V02::Exit_Sleep_Mode(), TS25FL512::Get_Feature(), TS25FL512::Is_Page_In_Cache_Empty(), TFM25V02::Read_Buffer(), TFM25V02::Read_Device_ID(), TS25FL512::Read_Identification(), TFM25V02::Read_Memory(), TS25FL512::Read_Page_From_Cache(), TS25FL512::Read_Page_From_Cache_By_Leniar_Address(), TS25FL512::Read_Page_From_Cells_To_Cache_By_Index(), TFM25V02::Read_Serial_Number(), TFM25V02::Read_Status_Register(), TS25FL512::Read_Status_Register(), TS25FL512::Reset(), TS25FL512::Set_Feature(), TFM25V02::Verify_Buffer(), TS25FL512::Wait_For_Operation_Done(), TFM25V02::Write_Buffer(), TS25FL512::Write_Disable(), TS25FL512::Write_Enable(), TFM25V02::Write_Memory(), TS25FL512::Write_Page_From_Cache_To_Cells(), TS25FL512::Write_Page_From_Cache_To_Cells_By_Page_Index(), TS25FL512::Write_Page_To_Cache(), TS25FL512::Write_Page_To_Cache_By_Leniar_Address(), and TFM25V02::Write_Status_Register().
|
pure virtual |
Deactivate (set to 1) SPI bus chip select signal.
Implemented in TSPI5_P017_39_KG3_CB, TSPI4_P017_39_KG3_CB, TSPI2_P017_39_KG3_CB, TSPI1_P016_05_PUC2, TSPI5_P015_27_V1_0_CB, TSPI2_P015_27_V1_0_CB, TSPI5_P015_09_CB, TSPI4_P015_09_CB, TSPI2_P015_09_CB, TSPI5_P014_51_CB, and TSPI2_P014_51_CB.
Referenced by TABCC_Base::Bus_Transaction(), Done(), TS25FL512::Erase_Block_By_Index(), TFM25V02::Exit_Sleep_Mode(), TS25FL512::Get_Feature(), TSPI1_STM32F410CBU6::Init(), TSPI2_STM32F429::Init(), TSPI4_STM32F429::Init(), TSPI5_STM32F429::Init(), TS25FL512::Is_Page_In_Cache_Empty(), TFM25V02::Read_Buffer(), TFM25V02::Read_Device_ID(), TS25FL512::Read_Identification(), TFM25V02::Read_Memory(), TS25FL512::Read_Page_From_Cache(), TS25FL512::Read_Page_From_Cache_By_Leniar_Address(), TS25FL512::Read_Page_From_Cells_To_Cache_By_Index(), TFM25V02::Read_Serial_Number(), TFM25V02::Read_Status_Register(), TS25FL512::Read_Status_Register(), TS25FL512::Reset(), TS25FL512::Set_Feature(), TFM25V02::Verify_Buffer(), TS25FL512::Wait_For_Operation_Done(), TFM25V02::Write_Buffer(), TS25FL512::Write_Disable(), TS25FL512::Write_Enable(), TFM25V02::Write_Memory(), TS25FL512::Write_Page_From_Cache_To_Cells(), TS25FL512::Write_Page_From_Cache_To_Cells_By_Page_Index(), TS25FL512::Write_Page_To_Cache(), TS25FL512::Write_Page_To_Cache_By_Leniar_Address(), and TFM25V02::Write_Status_Register().
VOID TSPI_Master_Base::Done | ( | ) |
SPI bus finalisation method.
References bool_Initialised, CS_Deactivate(), PIO_Done(), and Stop().
|
virtual |
Get MISO pin state.
Reimplemented in TSPI1_P016_05_PUC2.
Referenced by TSPI1_STM32F410CBU6::Receive_Byte().
|
pure virtual |
SPI bus initialisation method.
Implemented in TSPI5_STM32F429, TSPI4_STM32F429, TSPI2_STM32F429, and TSPI1_STM32F410CBU6.
Referenced by TApplication_Base::Init(), and TBootloader_Base::Init().
|
pure virtual |
PIO reinitialisation as GPIO method.
Implemented in TSPI5_P017_39_KG3_CB, TSPI4_P017_39_KG3_CB, TSPI2_P017_39_KG3_CB, TSPI1_P016_05_PUC2, TSPI5_P015_27_V1_0_CB, TSPI2_P015_27_V1_0_CB, TSPI5_P015_09_CB, TSPI4_P015_09_CB, TSPI2_P015_09_CB, TSPI5_P014_51_CB, and TSPI2_P014_51_CB.
Referenced by Done().
|
pure virtual |
PIO initialisation method.
Implemented in TSPI5_P017_39_KG3_CB, TSPI4_P017_39_KG3_CB, TSPI2_P017_39_KG3_CB, TSPI1_P016_05_PUC2, TSPI5_P015_27_V1_0_CB, TSPI2_P015_27_V1_0_CB, TSPI5_P015_09_CB, TSPI4_P015_09_CB, TSPI2_P015_09_CB, TSPI5_P014_51_CB, and TSPI2_P014_51_CB.
Referenced by TSPI1_STM32F410CBU6::Init(), TSPI2_STM32F429::Init(), TSPI4_STM32F429::Init(), and TSPI5_STM32F429::Init().
Receive byte over SPI bus.
[in] | *u8_Byte_To_Receive | - Pointer to the byte to receive |
Implemented in TSPI5_STM32F429, TSPI4_STM32F429, TSPI2_STM32F429, and TSPI1_STM32F410CBU6.
Referenced by TS25FL512::Get_Feature(), TFM25V02::Read_Buffer(), TFM25V02::Read_Device_ID(), TS25FL512::Read_Identification(), TFM25V02::Read_Memory(), TS25FL512::Read_Page_From_Cache(), TS25FL512::Read_Page_From_Cache_By_Leniar_Address(), TFM25V02::Read_Serial_Number(), TFM25V02::Read_Status_Register(), TS25FL512::Read_Status_Register(), TFM25V02::Verify_Buffer(), and TS25FL512::Wait_For_Operation_Done().
Send byte over SPI bus.
[in] | u8_Byte_To_Send | - Byte to send |
Implemented in TSPI5_STM32F429, TSPI4_STM32F429, TSPI2_STM32F429, and TSPI1_STM32F410CBU6.
Referenced by TS25FL512::Erase_Block_By_Index(), TS25FL512::Get_Feature(), TS25FL512::Is_Page_In_Cache_Empty(), TFM25V02::Read_Buffer(), TFM25V02::Read_Device_ID(), TS25FL512::Read_Identification(), TFM25V02::Read_Memory(), TS25FL512::Read_Page_From_Cache(), TS25FL512::Read_Page_From_Cache_By_Leniar_Address(), TS25FL512::Read_Page_From_Cells_To_Cache_By_Index(), TFM25V02::Read_Serial_Number(), TFM25V02::Read_Status_Register(), TS25FL512::Read_Status_Register(), TS25FL512::Reset(), TS25FL512::Set_Feature(), TFM25V02::Verify_Buffer(), TS25FL512::Wait_For_Operation_Done(), TFM25V02::Write_Buffer(), TS25FL512::Write_Disable(), TS25FL512::Write_Enable(), TFM25V02::Write_Memory(), TS25FL512::Write_Page_From_Cache_To_Cells(), TS25FL512::Write_Page_From_Cache_To_Cells_By_Page_Index(), TS25FL512::Write_Page_To_Cache(), TS25FL512::Write_Page_To_Cache_By_Leniar_Address(), and TFM25V02::Write_Status_Register().
|
virtual |
Set clock in high state.
Reimplemented in TSPI1_P016_05_PUC2.
Referenced by TSPI1_STM32F410CBU6::Receive_Byte(), and TSPI1_STM32F410CBU6::Send_Byte().
|
virtual |
Set MOSI in high state.
Reimplemented in TSPI1_P016_05_PUC2.
Referenced by TSPI1_STM32F410CBU6::Send_Byte().
|
virtual |
Set receive mode method.
Reimplemented in TSPI1_STM32F410CBU6.
|
virtual |
Set transmit mode method.
Reimplemented in TSPI1_STM32F410CBU6.
|
pure virtual |
Start SPI bus operation method.
Implemented in TSPI5_STM32F429, TSPI4_STM32F429, TSPI2_STM32F429, and TSPI1_STM32F410CBU6.
Referenced by TSPI_Memory_Base::Start(), and TFM25V02::Start().
|
pure virtual |
Stop SPI bus operation method.
Implemented in TSPI5_STM32F429, TSPI4_STM32F429, TSPI2_STM32F429, and TSPI1_STM32F410CBU6.
Referenced by Done(), and TSPI_Memory_Base::Stop().
VOID TSPI_Master_Base::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.
[in] | *u8_Buffer_To_Send | - Pointer to the buffer to send |
[in] | *u8_Buffer_To_Receive | - Pointer to the buffer to receive |
[in] | u16_Length | - Length of the send and receive buffer. |
References Transfer_Byte().
Referenced by TABCC_Base::Bus_Transaction().
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 in TSPI5_STM32F429, TSPI4_STM32F429, and TSPI2_STM32F429.
Referenced by Transfer_Buffer().
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 |
Implemented in TSPI5_STM32F429, TSPI4_STM32F429, TSPI2_STM32F429, and TSPI1_STM32F410CBU6.
Referenced by TS25FL512::Is_Page_In_Cache_Empty().
Object initialisation status.
Referenced by Done(), TSPI1_STM32F410CBU6::Init(), TSPI2_STM32F429::Init(), TSPI4_STM32F429::Init(), and TSPI5_STM32F429::Init().