ConOpSys V2970  P004.07
ANVILEX control operating system
Public Member Functions | Private Attributes | List of all members
TSPI4_STM32F429 Class Reference

STM32F429 on-chip SPI4 bus master module class. More...

#include <SPI4_STM32F429.h>

Inheritance diagram for TSPI4_STM32F429:
Inheritance graph
Collaboration diagram for TSPI4_STM32F429:
Collaboration graph

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

Detailed Description

STM32F429 on-chip SPI4 bus master module class.

Member Function Documentation

◆ Init()

VOID TSPI4_STM32F429::Init ( )
virtual

SPI bus initialisation method.


Note
None
Returns
None
Override
Not allowed
Attention
None

Implements TSPI_Master_Base.

References TSPI_Master_Base::bool_Initialised, TSPI_Master_Base::CS_Deactivate(), and TSPI_Master_Base::PIO_Init().

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

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

◆ Receive_Byte()

VOID TSPI4_STM32F429::Receive_Byte ( U8 u8_Byte_To_Receive)
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
Not allowed
Attention
None
Todo:
ANVILEX KM: Implement correct handling of the timeout.
Todo:
ANVILEX KM: Implement correct handling of the timeout.

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.

Here is the call graph for this function:

◆ Send_Byte()

VOID TSPI4_STM32F429::Send_Byte ( U8  u8_Byte_To_Send)
virtual

Send byte over SPI bus.


Note
None
Parameters
[in]u8_Byte_To_Send- Byte to send
Returns
None
Override
Not allowed
Attention
None
Todo:
ANVILEX KM: Implement correct handling of the timeout.
Todo:
ANVILEX KM: Implement correct handling of the timeout.

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.

Here is the call graph for this function:

◆ Start()

VOID TSPI4_STM32F429::Start ( )
virtual

Start SPI bus operation method.


Note
Start SPI bus opearation.
Returns
None
Override
Not allowed
Attention
None

Implements TSPI_Master_Base.

Referenced by TApplication_Base::Init().

Here is the caller graph for this function:

◆ Stop()

VOID TSPI4_STM32F429::Stop ( )
virtual

Stop SPI bus operation method.


Note
Stops SPI bus operation.
Returns
None
Override
Not allowed
Attention
None

Implements TSPI_Master_Base.

◆ Transfer_Byte()

VOID TSPI4_STM32F429::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
Not allowed
Attention
None
Todo:
ANVILEX KM: Implement correct handling of the timeout.
Todo:
ANVILEX KM: Implement correct handling of the timeout.

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.

Here is the call graph for this function:

◆ Verify_Byte()

BOOL TSPI4_STM32F429::Verify_Byte ( U8  u8_Byte_To_Verify)
virtual

Verify byte over SPI bus.


Note
None
Parameters
[in]u8_Byte_To_Verify- Byte to verify
Returns
BOOL - Operation status
Return values
false- Verification error, bytes is different
true- Verification cuccessed, bytes is equal
Override
Not allowed
Attention
None
Todo:
ANVILEX KM: Implement correct handling of the timeout.
Todo:
ANVILEX KM: Implement correct handling of the timeout.

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.

Here is the call graph for this function:

Member Data Documentation

◆ u32_Send_Byte_Timeout

const U32 TSPI4_STM32F429::u32_Send_Byte_Timeout = (U32)5
private

Timeout for byte sending 5 ms.

Referenced by Receive_Byte(), Send_Byte(), Transfer_Byte(), and Verify_Byte().


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