Hierodule 1.6.2
Utility module set for STM32 MCUs
Loading...
Searching...
No Matches
hierodule_spi.c File Reference

: Source file for the SPI module. More...

Go to the source code of this file.

Functions

static uint8_t ReceiveData (HIERODULE_SPI_Wrapper *Wrapper)
 Reads and returns the data register content of the SPI peripheral.
 
void Enable (HIERODULE_SPI_Wrapper *Wrapper)
 Enables the SPI peripheral.
 
static void Disable (HIERODULE_SPI_Wrapper *Wrapper)
 Disables the SPI peripheral.
 
uint8_t HIERODULE_SPI_GetNextByte (HIERODULE_SPI_Wrapper *Wrapper)
 Fetches the next byte in the RX ring buffer.
 
void HIERODULE_SPI_TransmitByte (HIERODULE_SPI_Wrapper *Wrapper, uint8_t Byte)
 Writes a byte into the data register of the SPI peripheral.
 
HIERODULE_SPI_Wrapper ** HIERODULE_SPI_InitWrapper (SPI_TypeDef *_SPI, uint8_t Mode, uint16_t RX_BufferSize, void(*TC_Handler)(void))
 Initializes a wrapper for the specified SPI peripheral.
 
void HIERODULE_SPI_ReleaseWrapper (HIERODULE_SPI_Wrapper *Wrapper)
 Frees the memory allocated to an SPI wrapper.
 
void HIERODULE_SPI_TransmitPackage (HIERODULE_SPI_Wrapper *Wrapper, uint8_t *TX_Buffer, uint32_t Size)
 Starts a transmission as the master.
 
void SPI_IRQ_Handler (HIERODULE_SPI_Wrapper *Wrapper)
 The base IRQ body to be used for all SPI IRQs.
 
void SPI1_IRQHandler (void)
 SPI1 IRQ implementation.
 
void SPI2_IRQHandler (void)
 SPI2 IRQ implementation.
Requires the device specific macro __STM32F103xB_H or __STM32F401xC_H to be defined.
 
void SPI3_IRQHandler (void)
 SPI3 IRQ implementation.
Requires the device specific macro __STM32F401xC_H to be defined.
 

Variables

static HIERODULE_SPI_WrapperSPI1_Wrapper
 SPI wrapper pointer meant for SPI1.
 
static HIERODULE_SPI_WrapperSPI2_Wrapper
 SPI wrapper pointer meant for SPI2.
Requires the device specific macro __STM32F103xB_H or __STM32F401xC_H to be defined.
 
static HIERODULE_SPI_WrapperSPI3_Wrapper
 SPI wrapper pointer meant for SPI3.
Requires the device specific macro __STM32F401xC_H to be defined.
 

Detailed Description

Author
: ushumgigal
Attention
: Copyrighted (2024) by ushumgigal under MIT License, a copy of which may be found in the root folder of the repository.

Definition in file hierodule_spi.c.