STM32F0xx Standard Peripherals Firmware Library
|
Functions | |
static TestStatus | Buffercmp (uint8_t *pBuffer1, uint8_t *pBuffer2, uint16_t BufferLength) |
Compares two buffers. | |
static void | GPIO_Config (void) |
Configures the USART Peripheral. | |
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 | RCC_Config (void) |
Configures the USART Peripheral. | |
void | SVC_Handler (void) |
This function handles SVCall exception. | |
void | SysTick_Handler (void) |
This function handles SysTick Handler. | |
Variables | |
DMA_InitTypeDef | DMA_InitStructure |
uint8_t | RxBuffer1 [RXBUFFERSIZE] = {0} |
uint8_t | RxBuffer2 [RXBUFFERSIZE] = {0} |
__IO TestStatus | TransferStatus1 = FAILED |
__IO TestStatus | TransferStatus2 = FAILED |
uint8_t | TxBuffer1 [] = "Communication between USART1-USART2 using DMA2" |
uint8_t | TxBuffer2 [] = "Communication between USART2-USART1 using DMA2" |
USART_InitTypeDef | USART_InitStructure |
Function Documentation
static TestStatus Buffercmp | ( | uint8_t * | pBuffer1, |
uint8_t * | pBuffer2, | ||
uint16_t | BufferLength | ||
) | [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 261 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/main.c.
References FAILED, and PASSED.
Referenced by main().
static void GPIO_Config | ( | void | ) | [static] |
Configures the USART Peripheral.
- Parameters:
-
None
- Return values:
-
None
Definition at line 223 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/main.c.
References GPIO_InitStructure.
Referenced by main().
void HardFault_Handler | ( | void | ) |
This function handles Hard Fault exception.
- Parameters:
-
None
- Return values:
-
None
Definition at line 66 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/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 63 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/main.c.
References Buffercmp(), DMA_InitStructure, GPIO_Config(), RCC_Config(), RxBuffer1, RxBuffer2, RXBUFFERSIZE, TransferStatus1, TransferStatus2, TxBuffer1, TxBuffer2, TXBUFFERSIZE, USART1_RDR_Address, USART1_TDR_Address, USART2_RDR_Address, USART2_TDR_Address, and USART_InitStructure.
void NMI_Handler | ( | void | ) |
This function handles NMI exception.
- Parameters:
-
None
- Return values:
-
None
Definition at line 57 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/stm32f0xx_it.c.
void PendSV_Handler | ( | void | ) |
This function handles PendSVC exception.
- Parameters:
-
None
- Return values:
-
None
Definition at line 88 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/stm32f0xx_it.c.
static void RCC_Config | ( | void | ) | [static] |
Configures the USART Peripheral.
- Parameters:
-
None
- Return values:
-
None
Definition at line 201 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/main.c.
Referenced by main().
void SVC_Handler | ( | void | ) |
This function handles SVCall exception.
- Parameters:
-
None
- Return values:
-
None
Definition at line 79 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/stm32f0xx_it.c.
void SysTick_Handler | ( | void | ) |
This function handles SysTick Handler.
- Parameters:
-
None
- Return values:
-
None
Definition at line 97 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/stm32f0xx_it.c.
Variable Documentation
DMA_InitTypeDef DMA_InitStructure |
Definition at line 49 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/main.c.
uint8_t RxBuffer1[RXBUFFERSIZE] = {0} |
Definition at line 46 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/main.c.
Referenced by main().
uint8_t RxBuffer2[RXBUFFERSIZE] = {0} |
Definition at line 45 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/main.c.
Referenced by main().
__IO TestStatus TransferStatus1 = FAILED |
Definition at line 47 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/main.c.
Referenced by main().
__IO TestStatus TransferStatus2 = FAILED |
Definition at line 47 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/main.c.
Referenced by main().
uint8_t TxBuffer1[] = "Communication between USART1-USART2 using DMA2" |
Definition at line 43 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/main.c.
Referenced by main().
uint8_t TxBuffer2[] = "Communication between USART2-USART1 using DMA2" |
Definition at line 44 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/main.c.
Referenced by main().
USART_InitTypeDef USART_InitStructure |
Definition at line 48 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_USARTTransfer/main.c.
Referenced by main(), and USART_Config().