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

STM32F410CBU6 on-chip SPI1 bus master module class. More...

#include <SPI1_STM32F410CBU6.h>

Inheritance diagram for TSPI1_STM32F410CBU6:
Inheritance graph
Collaboration diagram for TSPI1_STM32F410CBU6:
Collaboration graph

Public Member Functions

 TSPI1_STM32F410CBU6 ()
 Class constructor method. More...
 
virtual ~TSPI1_STM32F410CBU6 ()
 Class destructor method. More...
 
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 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...
 
virtual VOID Set_Transmit_Mode ()
 Set transmit mode method. More...
 
virtual VOID Set_Receive_Mode ()
 Set receive mode method. 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...
 
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...
 
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_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...
 

Additional Inherited Members

- Protected Attributes inherited from TSPI_Master_Base
BOOL bool_Initialised = (BOOL)false
 Object initialisation status. More...
 

Detailed Description

STM32F410CBU6 on-chip SPI1 bus master module class.

Constructor & Destructor Documentation

◆ TSPI1_STM32F410CBU6()

TSPI1_STM32F410CBU6::TSPI1_STM32F410CBU6 ( )

Class constructor method.


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

◆ ~TSPI1_STM32F410CBU6()

TSPI1_STM32F410CBU6::~TSPI1_STM32F410CBU6 ( )
virtual

Class destructor method.


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

Member Function Documentation

◆ Init()

VOID TSPI1_STM32F410CBU6::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().

Here is the call graph for this function:

◆ Receive_Byte()

VOID TSPI1_STM32F410CBU6::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

Implements TSPI_Master_Base.

References TSPI_Master_Base::Clear_Clock(), TSPI_Master_Base::Get_MISO(), TSPI_Master_Base::Set_Clock(), Set_Receive_Mode(), and Set_Transmit_Mode().

Referenced by Verify_Byte().

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

◆ Send_Byte()

VOID TSPI1_STM32F410CBU6::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: This method is not allowed for unidirectional mode

Implements TSPI_Master_Base.

References TSPI_Master_Base::Clear_Clock(), TSPI_Master_Base::Clear_MOSI(), TSPI_Master_Base::Set_Clock(), TSPI_Master_Base::Set_MOSI(), and Set_Transmit_Mode().

Here is the call graph for this function:

◆ Set_Receive_Mode()

VOID TSPI1_STM32F410CBU6::Set_Receive_Mode ( )
virtual

Set receive mode method.


Note
None
Returns
None
Override
Not allowed
Attention
None

Reimplemented from TSPI_Master_Base.

Referenced by Receive_Byte().

Here is the caller graph for this function:

◆ Set_Transmit_Mode()

VOID TSPI1_STM32F410CBU6::Set_Transmit_Mode ( )
virtual

Set transmit mode method.


Note
None
Returns
None
Override
Not allowed
Attention
None

Reimplemented from TSPI_Master_Base.

Referenced by Receive_Byte(), and Send_Byte().

Here is the caller graph for this function:

◆ Start()

VOID TSPI1_STM32F410CBU6::Start ( )
virtual

Start SPI bus operation method.


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

Implements TSPI_Master_Base.

◆ Stop()

VOID TSPI1_STM32F410CBU6::Stop ( )
virtual

Stop SPI bus operation method.


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

Implements TSPI_Master_Base.

◆ Verify_Byte()

BOOL TSPI1_STM32F410CBU6::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

Implements TSPI_Master_Base.

References Receive_Byte().

Here is the call graph for this function:

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