|
Hierodule 1.6.2
Utility module set for STM32 MCUs
|
Elements of the module that are confined to the scope of the compilation unit. Perfectly corresponds to the module's source file, except the IRQ handlers. More...
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. | |
| void | SPI_IRQ_Handler (HIERODULE_SPI_Wrapper *Wrapper) |
| The base IRQ body to be used for all SPI IRQs. | |
Variables | |
| static HIERODULE_SPI_Wrapper * | SPI1_Wrapper |
| SPI wrapper pointer meant for SPI1. | |
| static HIERODULE_SPI_Wrapper * | SPI2_Wrapper |
| SPI wrapper pointer meant for SPI2. Requires the device specific macro __STM32F103xB_H or __STM32F401xC_H to be defined. | |
| static HIERODULE_SPI_Wrapper * | SPI3_Wrapper |
| SPI wrapper pointer meant for SPI3. Requires the device specific macro __STM32F401xC_H to be defined. | |
Implements the routines defined in the header file and routines necessary for those in the background. Pointers of SPI wrappers are also defined here.
IRQ definitions with custom ISR implementations are also included at the end of the file.
|
static |
| Wrapper | Pointer to the SPI wrapper. |
Defined as static to avoid the multiple definition error some compilers throw since a function with the same name also exists within another module; that will be fixed in a future release.
Definition at line 77 of file hierodule_spi.c.
References Wrapper.
Referenced by SPI_IRQ_Handler().
| void Enable | ( | HIERODULE_SPI_Wrapper * | Wrapper | ) |
| Wrapper | Pointer to the SPI wrapper. |
Self-explanatory code, nothing to elaborate.
Definition at line 65 of file hierodule_spi.c.
References Wrapper.
Referenced by HIERODULE_SPI_InitWrapper(), and HIERODULE_SPI_TransmitPackage().
|
static |
| Wrapper | Pointer to the SPI wrapper. |
Defined as static to avoid the multiple definition error some compilers throw since a function with the same name also exists within another module; that will be fixed in a future release.
Definition at line 54 of file hierodule_spi.c.
References Wrapper.
Referenced by SPI_IRQ_Handler().
| void SPI_IRQ_Handler | ( | HIERODULE_SPI_Wrapper * | Wrapper | ) |
| Wrapper | Pointer to the SPI wrapper. |
Transmission completion callback routine gets Called at the end of an entire transmission in master mode. As for slave mode, the routine gets invoked at the end of each byte transmission.
Definition at line 230 of file hierodule_spi.c.
References Disable(), HIERODULE_SPI_TransmitByte(), ReceiveData(), HIERODULE_USB_Wrapper::RX_Buffer, HIERODULE_USB_Wrapper::RX_BufferSize, HIERODULE_USB_Wrapper::RX_Index, HIERODULE_USB_Wrapper::RX_New, HIERODULE_USB_Wrapper::TC_Handler, and Wrapper.
Referenced by SPI1_IRQHandler(), SPI2_IRQHandler(), and SPI3_IRQHandler().
|
static |
Definition at line 27 of file hierodule_spi.c.
Referenced by HIERODULE_SPI_InitWrapper(), and SPI1_IRQHandler().
|
static |
Definition at line 34 of file hierodule_spi.c.
Referenced by HIERODULE_SPI_InitWrapper(), and SPI2_IRQHandler().
|
static |
Definition at line 43 of file hierodule_spi.c.
Referenced by HIERODULE_SPI_InitWrapper(), and SPI3_IRQHandler().