STM32F0xx Standard Peripherals Firmware Library
|
Functions | |
static TestStatus | Buffercmp (uint8_t *pBuffer1, uint8_t *pBuffer2, uint16_t BufferLength, uint8_t DataMask) |
Compares two buffers. | |
void | HardFault_Handler (void) |
This function handles Hard Fault exception. | |
int | main (void) |
Main program. | |
void | NMI_Handler (void) |
This function handles NMI exception. | |
void | PendSV_Handler (void) |
This function handles PendSVC exception. | |
static void | SPI_Config (void) |
Configures the SPI Peripheral. | |
void | SVC_Handler (void) |
This function handles SVCall exception. | |
void | SysTick_Handler (void) |
This function handles SysTick Handler. | |
static void | SysTickConfig (void) |
Configure a SysTick Base time to 10 ms. | |
static void | TimeOut_UserCallback (void) |
Basic management of the timeout situation. | |
Variables | |
__IO uint32_t | CommandReceived = 0x00 |
__IO uint32_t | CommandTransmitted = 0x00 |
__IO uint8_t | Counter = 0x00 |
DMA_InitTypeDef | DMA_InitStructure |
__IO uint16_t | NumberOfByte = 0x00 |
__IO uint16_t | PrescalerValue = 0 |
__IO JOYState_TypeDef | PressedButton = JOY_NONE |
uint8_t | RxBuffer [RXBUFFERSIZE] |
SPI_InitTypeDef | SPI_InitStructure |
TIM_OCInitTypeDef | TIM_OCInitStructure |
TIM_TimeBaseInitTypeDef | TIM_TimeBaseStructure |
__IO uint32_t | TimeOut |
__IO uint32_t | TimeOut = 0x0 |
uint8_t | TxBuffer [] = "SPI DMA Example: Communication between two SPI using DMA" |
Function Documentation
static TestStatus Buffercmp | ( | uint8_t * | pBuffer1, |
uint8_t * | pBuffer2, | ||
uint16_t | BufferLength, | ||
uint8_t | DataMask | ||
) | [static] |
Compares two buffers.
- Parameters:
-
pBuffer1,pBuffer2,: buffers to be compared. BufferLength,: buffer's length
- Return values:
-
PASSED,: pBuffer1 identical to pBuffer2 FAILED: pBuffer1 differs from pBuffer2
Definition at line 748 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
References FAILED, and PASSED.
Referenced by main().
void HardFault_Handler | ( | void | ) |
This function handles Hard Fault exception.
- Parameters:
-
None
- Return values:
-
None
Definition at line 69 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/stm32f0xx_it.c.
int main | ( | void | ) |
Main program.
- Parameters:
-
None
- Return values:
-
None
< At this stage the microcontroller clock setting is already configured, this is done through SystemInit() function which is called from startup file (startup_stm32f0xx.s) before to branch to application main. To reconfigure the default setting of SystemInit() function, refer to system_stm32f0xx.c file
Definition at line 75 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
References Buffercmp(), CMD_ACK, CMD_DOWN, CMD_DOWN_SIZE, CMD_LEFT, CMD_LEFT_SIZE, CMD_RIGHT, CMD_RIGHT_SIZE, CMD_SEL, CMD_SEL_SIZE, CMD_UP, CMD_UP_SIZE, CommandReceived, CommandTransmitted, DMA_InitStructure, FAILED, Fill_Buffer(), NumberOfByte, PressedButton, Read_Joystick(), RxBuffer, SPI_Config(), SPI_DATAMASK, SPI_InitStructure, SPIx, SPIx_DR_ADDRESS, SPIx_RX_DMA_CHANNEL, SPIx_RX_DMA_FLAG_GL, SPIx_RX_DMA_FLAG_TC, SPIx_TX_DMA_CHANNEL, SPIx_TX_DMA_FLAG_GL, SPIx_TX_DMA_FLAG_TC, SysTickConfig(), TIM_Config(), TimeOut, TimeOut_UserCallback(), TIMx, TIMx_CHANNEL_DMA_CHANNEL, TIMx_CHANNEL_DMA_FLAG_GL, TIMx_DMA_CHANNEL, TxBuffer, TXBUFFERSIZE, and USER_TIMEOUT.
void NMI_Handler | ( | void | ) |
This function handles NMI exception.
- Parameters:
-
None
- Return values:
-
None
Definition at line 60 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/stm32f0xx_it.c.
void PendSV_Handler | ( | void | ) |
This function handles PendSVC exception.
- Parameters:
-
None
- Return values:
-
None
Definition at line 91 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/stm32f0xx_it.c.
static void SPI_Config | ( | void | ) | [static] |
Configures the SPI Peripheral.
- Parameters:
-
None
- Return values:
-
None
Definition at line 635 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
References DMA_InitStructure, DMAx_CLK, GPIO_InitStructure, SPI_DATASIZE, SPI_InitStructure, SPIx, SPIx_CLK, SPIx_MISO_AF, SPIx_MISO_GPIO_CLK, SPIx_MISO_GPIO_PORT, SPIx_MISO_PIN, SPIx_MISO_SOURCE, SPIx_MOSI_AF, SPIx_MOSI_GPIO_CLK, SPIx_MOSI_GPIO_PORT, SPIx_MOSI_PIN, SPIx_MOSI_SOURCE, SPIx_NSS_AF, SPIx_NSS_GPIO_CLK, SPIx_NSS_GPIO_PORT, SPIx_NSS_PIN, SPIx_NSS_SOURCE, SPIx_SCK_AF, SPIx_SCK_GPIO_CLK, SPIx_SCK_GPIO_PORT, SPIx_SCK_PIN, SPIx_SCK_SOURCE, TIMx_CLK, TIMx_TRIGGER_AF, TIMx_TRIGGER_GPIO_CLK, TIMx_TRIGGER_GPIO_PORT, TIMx_TRIGGER_PIN, and TIMx_TRIGGER_SOURCE.
Referenced by main().
void SVC_Handler | ( | void | ) |
This function handles SVCall exception.
- Parameters:
-
None
- Return values:
-
None
Definition at line 82 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/stm32f0xx_it.c.
void SysTick_Handler | ( | void | ) |
This function handles SysTick Handler.
- Parameters:
-
None
- Return values:
-
None
Definition at line 100 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/stm32f0xx_it.c.
static void SysTickConfig | ( | void | ) | [static] |
Configure a SysTick Base time to 10 ms.
- Parameters:
-
None
- Return values:
-
None
Definition at line 728 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
References SystemCoreClock.
Referenced by main().
static void TimeOut_UserCallback | ( | void | ) | [static] |
Basic management of the timeout situation.
- Parameters:
-
None.
- Return values:
-
None.
Definition at line 714 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
Referenced by main().
Variable Documentation
__IO uint32_t CommandReceived = 0x00 |
Definition at line 52 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
Referenced by main().
__IO uint32_t CommandTransmitted = 0x00 |
Definition at line 51 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
Referenced by main().
__IO uint8_t Counter = 0x00 |
Definition at line 45 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/stm32f0xx_it.c.
DMA_InitTypeDef DMA_InitStructure |
Definition at line 44 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
__IO uint16_t NumberOfByte = 0x00 |
Definition at line 53 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
Referenced by main().
__IO uint16_t PrescalerValue = 0 |
Definition at line 54 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
Referenced by TIM_Config().
__IO JOYState_TypeDef PressedButton = JOY_NONE |
Definition at line 50 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
uint8_t RxBuffer[RXBUFFERSIZE] |
Definition at line 48 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
SPI_InitTypeDef SPI_InitStructure |
Definition at line 43 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
Referenced by main(), and SPI_Config().
TIM_OCInitTypeDef TIM_OCInitStructure |
Definition at line 46 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
Referenced by TIM_Config().
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure |
Definition at line 45 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
Referenced by TIM17_Config(), TIM6_Config(), and TIM_Config().
__IO uint32_t TimeOut |
Definition at line 48 of file STM32F0xx_StdPeriph_Examples/CRC/CRC_TwoBoards/stm32f0xx_it.c.
__IO uint32_t TimeOut = 0x0 |
Definition at line 55 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.
uint8_t TxBuffer[] = "SPI DMA Example: Communication between two SPI using DMA" |
Definition at line 47 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_TwoBoards/DataExchangeDMA/main.c.