ConOpSys V2970  P004.07
ANVILEX control operating system
Public Member Functions | Protected Attributes | List of all members
TSPI_Master_Base Class Referenceabstract

SPI master base class. More...

#include <SPI_Master_Base.h>

Inheritance diagram for TSPI_Master_Base:
Inheritance graph
Collaboration diagram for TSPI_Master_Base:
Collaboration graph

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...
 

Detailed Description

SPI master base class.

Constructor & Destructor Documentation

◆ TSPI_Master_Base()

TSPI_Master_Base::TSPI_Master_Base ( )

Class constructor method.


Note
None
Override
Not allowed
Attention
Don't call this method directly.

◆ ~TSPI_Master_Base()

TSPI_Master_Base::~TSPI_Master_Base ( )
virtual

Class destructor method.


Note
None
Override
Not allowed
Attention
Don't call this method directly.

Member Function Documentation

◆ Clear_Clock()

VOID TSPI_Master_Base::Clear_Clock ( )
virtual

Set clock in low state.


Note
None
Returns
None
Override
Requered
Attention
None

Reimplemented in TSPI1_P016_05_PUC2.

Referenced by TSPI1_STM32F410CBU6::Receive_Byte(), and TSPI1_STM32F410CBU6::Send_Byte().

Here is the caller graph for this function:

◆ Clear_MOSI()

VOID TSPI_Master_Base::Clear_MOSI ( )
virtual

Set MOSI in low state.


Note
None
Returns
None
Override
Requered
Attention
None

Reimplemented in TSPI1_P016_05_PUC2.

Referenced by TSPI1_STM32F410CBU6::Send_Byte().

Here is the caller graph for this function:

◆ CS_Activate()

virtual VOID TSPI_Master_Base::CS_Activate ( )
pure virtual

◆ CS_Deactivate()

virtual VOID TSPI_Master_Base::CS_Deactivate ( )
pure virtual

◆ Done()

VOID TSPI_Master_Base::Done ( )

SPI bus finalisation method.


Note
Override method must initialise hardware dependent SPI bus unit and related GPIO.
Returns
None
Override
Requered
Attention
None

References bool_Initialised, CS_Deactivate(), PIO_Done(), and Stop().

Here is the call graph for this function:

◆ Get_MISO()

BOOL TSPI_Master_Base::Get_MISO ( )
virtual

Get MISO pin state.


Note
None
Returns
None
Override
Requered
Attention
None

Reimplemented in TSPI1_P016_05_PUC2.

Referenced by TSPI1_STM32F410CBU6::Receive_Byte().

Here is the caller graph for this function:

◆ Init()

virtual VOID TSPI_Master_Base::Init ( )
pure virtual

SPI bus initialisation method.


Note
None
Returns
None
Override
Requered
Attention
None

Implemented in TSPI5_STM32F429, TSPI4_STM32F429, TSPI2_STM32F429, and TSPI1_STM32F410CBU6.

Referenced by TApplication_Base::Init(), and TBootloader_Base::Init().

Here is the caller graph for this function:

◆ PIO_Done()

virtual VOID TSPI_Master_Base::PIO_Done ( )
pure virtual

PIO reinitialisation as GPIO method.


Note
None
Returns
None
Override
Not allowed
Attention
None

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().

Here is the caller graph for this function:

◆ PIO_Init()

virtual VOID TSPI_Master_Base::PIO_Init ( )
pure virtual

◆ Receive_Byte()

virtual VOID TSPI_Master_Base::Receive_Byte ( U8 u8_Byte_To_Receive)
pure virtual

Receive byte over SPI bus.


Note
Function sent 0x00 over SPI bus during receiving.
Parameters
[in]*u8_Byte_To_Receive- Pointer to the byte to receive
Returns
None
Override
Requered
Attention
None

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().

Here is the caller graph for this function:

◆ Send_Byte()

virtual VOID TSPI_Master_Base::Send_Byte ( U8  u8_Byte_To_Send)
pure virtual

◆ Set_Clock()

VOID TSPI_Master_Base::Set_Clock ( )
virtual

Set clock in high state.


Note
None
Returns
None
Override
Requered
Attention
None

Reimplemented in TSPI1_P016_05_PUC2.

Referenced by TSPI1_STM32F410CBU6::Receive_Byte(), and TSPI1_STM32F410CBU6::Send_Byte().

Here is the caller graph for this function:

◆ Set_MOSI()

VOID TSPI_Master_Base::Set_MOSI ( )
virtual

Set MOSI in high state.


Note
None
Returns
None
Override
Requered
Attention
None

Reimplemented in TSPI1_P016_05_PUC2.

Referenced by TSPI1_STM32F410CBU6::Send_Byte().

Here is the caller graph for this function:

◆ Set_Receive_Mode()

VOID TSPI_Master_Base::Set_Receive_Mode ( )
virtual

Set receive mode method.


Note
None
Returns
None
Override
Requered
Attention
None

Reimplemented in TSPI1_STM32F410CBU6.

◆ Set_Transmit_Mode()

VOID TSPI_Master_Base::Set_Transmit_Mode ( )
virtual

Set transmit mode method.


Note
None
Returns
None
Override
Requered
Attention
None

Reimplemented in TSPI1_STM32F410CBU6.

◆ Start()

virtual VOID TSPI_Master_Base::Start ( )
pure virtual

Start SPI bus operation method.


Note
Start SPI bus opearation.
Returns
None
Override
Requered
Attention
None

Implemented in TSPI5_STM32F429, TSPI4_STM32F429, TSPI2_STM32F429, and TSPI1_STM32F410CBU6.

Referenced by TSPI_Memory_Base::Start(), and TFM25V02::Start().

Here is the caller graph for this function:

◆ Stop()

virtual VOID TSPI_Master_Base::Stop ( )
pure virtual

Stop SPI bus operation method.


Note
Stops SPI bus operation.
Returns
None
Override
Requered
Attention
None

Implemented in TSPI5_STM32F429, TSPI4_STM32F429, TSPI2_STM32F429, and TSPI1_STM32F410CBU6.

Referenced by Done(), and TSPI_Memory_Base::Stop().

Here is the caller graph for this function:

◆ Transfer_Buffer()

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.


Note
None
Parameters
[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.
Returns
None
Override
Not allowed
Attention
Length of the send and length of the receive buffer must be the equal.

References Transfer_Byte().

Referenced by TABCC_Base::Bus_Transaction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Transfer_Byte()

VOID TSPI_Master_Base::Transfer_Byte ( U8  u8_Byte_To_Send,
U8 u8_Byte_To_Receive 
)
virtual

Send byte and receive byte over SPI bus at some time.


Note
None
Parameters
[in]u8_Byte_To_Send- Byte to send
[in]*u8_Byte_To_Receive- Pointer to the byte to receive
Returns
None
Override
Requered
Attention
None

Reimplemented in TSPI5_STM32F429, TSPI4_STM32F429, and TSPI2_STM32F429.

Referenced by Transfer_Buffer().

Here is the caller graph for this function:

◆ Verify_Byte()

virtual BOOL TSPI_Master_Base::Verify_Byte ( U8  u8_Byte_To_Verify)
pure virtual

Verify byte over SPI bus.


Note
None
Parameters
[in]u8_Byte_To_Verify- Byte to verify
Returns
BOOL - Verify operation status
Return values
false- Verification error, bytes is different
true- Verification cuccessed, bytes is equal
Override
Not allowed
Attention
None

Implemented in TSPI5_STM32F429, TSPI4_STM32F429, TSPI2_STM32F429, and TSPI1_STM32F410CBU6.

Referenced by TS25FL512::Is_Page_In_Cache_Empty().

Here is the caller graph for this function:

Member Data Documentation

◆ bool_Initialised

BOOL TSPI_Master_Base::bool_Initialised = (BOOL)false
protected

The documentation for this class was generated from the following files: