STM32F0xx Standard Peripherals Firmware Library
|
Functions | |
static TestStatus | Buffercmp (uint8_t *pBuffer1, uint8_t *pBuffer2, uint16_t BufferLength) |
Compares two buffers. | |
static void | Fill_Buffer (uint8_t *pBuffer, uint16_t BufferLength) |
Fills buffer. | |
uint8_t | GetVar_NbrOfData (void) |
Returns NbrOfData value. | |
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 JOYState_TypeDef | Read_Joystick (void) |
Reads key from evaluation board. | |
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. | |
static void | USART_Config (void) |
Configures the USART Peripheral. | |
void | USARTx_IRQHandler (void) |
This function handles USART interrupt request. | |
Variables | |
uint8_t | AckBuffer [] |
uint8_t | AckBuffer [0x02] = {0x00, 0x00} |
uint8_t | CmdBuffer [] |
uint8_t | CmdBuffer [0x02] = {0x00, 0x00} |
__IO uint8_t | Counter = 0x00 |
__IO JOYState_TypeDef | PressedButton = JOY_NONE |
uint8_t | RxBuffer [RXBUFFERSIZE] |
uint8_t | RxBuffer [] |
__IO uint8_t | RxIndex = 0x00 |
__IO uint8_t | RxIndex |
__IO uint32_t | TimeOut = 0x00 |
__IO uint32_t | TimeOut |
uint8_t | TxBuffer [] = "USART Interrupt Example: Communication between two USART using Interrupt" |
uint8_t | TxBuffer [] |
__IO uint8_t | TxIndex = 0x00 |
__IO uint8_t | TxIndex |
__IO uint8_t | UsartMode = USART_MODE_TRANSMITTER |
__IO uint8_t | UsartMode |
__IO uint8_t | UsartTransactionType = USART_TRANSACTIONTYPE_CMD |
__IO uint8_t | UsartTransactionType |
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 484 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
References FAILED, and PASSED.
Referenced by main().
static void Fill_Buffer | ( | uint8_t * | pBuffer, |
uint16_t | BufferLength | ||
) | [static] |
Fills buffer.
- Parameters:
-
pBuffer,: pointer on the Buffer to fill BufferLength,: size of the buffer to fill
- Return values:
-
None
Definition at line 513 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
Referenced by main().
uint8_t GetVar_NbrOfData | ( | void | ) |
Returns NbrOfData value.
Returns NbrOfDataToTransfer value.
- Parameters:
-
None
- Return values:
-
Tx Buffer Size (NbrOfDataToTransfer).
Definition at line 503 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
void HardFault_Handler | ( | void | ) |
This function handles Hard Fault exception.
- Parameters:
-
None
- Return values:
-
None
Definition at line 80 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/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 71 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
References AckBuffer, Buffercmp(), 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, CmdBuffer, FAILED, Fill_Buffer(), GetVar_NbrOfData(), PressedButton, Read_Joystick(), RxBuffer, RxIndex, SysTickConfig(), TimeOut, TimeOut_UserCallback(), TxBuffer, TXBUFFERSIZE, TxIndex, USART_Config(), USART_MODE_RECEIVER, USART_MODE_TRANSMITTER, USART_TRANSACTIONTYPE_CMD, USART_TRANSACTIONTYPE_DATA, UsartMode, UsartTransactionType, USARTx, and USER_TIMEOUT.
void NMI_Handler | ( | void | ) |
This function handles NMI exception.
- Parameters:
-
None
- Return values:
-
None
Definition at line 71 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/stm32f0xx_it.c.
void PendSV_Handler | ( | void | ) |
This function handles PendSVC exception.
- Parameters:
-
None
- Return values:
-
None
Definition at line 102 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/stm32f0xx_it.c.
static JOYState_TypeDef Read_Joystick | ( | void | ) | [static] |
Reads key from evaluation board.
- Parameters:
-
None
- Return values:
-
Return JOY_RIGHT, JOY_LEFT, JOY_SEL, JOY_UP, JOY_DOWN or JOY_NONE
Definition at line 433 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
Referenced by main().
void SVC_Handler | ( | void | ) |
This function handles SVCall exception.
- Parameters:
-
None
- Return values:
-
None
Definition at line 93 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/stm32f0xx_it.c.
void SysTick_Handler | ( | void | ) |
This function handles SysTick Handler.
- Parameters:
-
None
- Return values:
-
None
Definition at line 111 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/stm32f0xx_it.c.
static void SysTickConfig | ( | void | ) | [static] |
Configure a SysTick Base time to 10 ms.
- Parameters:
-
None
- Return values:
-
None
Definition at line 416 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/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 340 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
Referenced by main().
static void USART_Config | ( | void | ) | [static] |
Configures the USART Peripheral.
- Parameters:
-
None
- Return values:
-
None
Definition at line 354 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
References GPIO_InitStructure, NVIC_InitStructure, USART_InitStructure, USARTx, USARTx_APBPERIPHCLOCK, USARTx_CLK, USARTx_IRQn, USARTx_RX_AF, USARTx_RX_GPIO_CLK, USARTx_RX_GPIO_PORT, USARTx_RX_PIN, USARTx_RX_SOURCE, USARTx_TX_AF, USARTx_TX_GPIO_CLK, USARTx_TX_GPIO_PORT, USARTx_TX_PIN, and USARTx_TX_SOURCE.
Referenced by main().
void USARTx_IRQHandler | ( | void | ) |
This function handles USART interrupt request.
This function handles USRAT interrupt request.
- Parameters:
-
None
- Return values:
-
None
Definition at line 138 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/stm32f0xx_it.c.
References AckBuffer, CmdBuffer, ComputedCRC, GetVar_NbrOfData(), RxBuffer, RxIndex, TxBuffer, TxIndex, USART_MODE_TRANSMITTER, USART_TRANSACTIONTYPE_CMD, UsartMode, UsartTransactionType, and USARTx.
Variable Documentation
uint8_t AckBuffer[] |
Definition at line 49 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeDMA/main.c.
Referenced by main(), and USARTx_IRQHandler().
uint8_t AckBuffer[0x02] = {0x00, 0x00} |
Definition at line 54 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
uint8_t CmdBuffer[] |
Definition at line 48 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeDMA/main.c.
Referenced by GetVar_NbrOfData(), main(), and USARTx_IRQHandler().
uint8_t CmdBuffer[0x02] = {0x00, 0x00} |
Definition at line 52 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
__IO uint8_t Counter = 0x00 |
Definition at line 56 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/stm32f0xx_it.c.
__IO JOYState_TypeDef PressedButton = JOY_NONE |
Definition at line 48 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
uint8_t RxBuffer[RXBUFFERSIZE] |
Definition at line 44 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
uint8_t RxBuffer[] |
Definition at line 41 of file STM32F0xx_StdPeriph_Examples/CRC/CRC_TwoBoards/main.c.
Referenced by main(), SPI1_IRQHandler(), USART2_IRQHandler(), and USARTx_IRQHandler().
__IO uint8_t RxIndex = 0x00 |
Definition at line 45 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
__IO uint8_t RxIndex |
Definition at line 44 of file STM32F0xx_StdPeriph_Examples/CRC/CRC_TwoBoards/main.c.
Referenced by main(), and USARTx_IRQHandler().
__IO uint32_t TimeOut = 0x00 |
Definition at line 56 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
__IO uint32_t TimeOut |
Definition at line 48 of file STM32F0xx_StdPeriph_Examples/CRC/CRC_TwoBoards/stm32f0xx_it.c.
Referenced by main(), and SysTick_Handler().
uint8_t TxBuffer[] = "USART Interrupt Example: Communication between two USART using Interrupt" |
Definition at line 43 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
uint8_t TxBuffer[] |
Definition at line 40 of file STM32F0xx_StdPeriph_Examples/CRC/CRC_TwoBoards/main.c.
Referenced by main(), SPI1_IRQHandler(), USART2_IRQHandler(), and USARTx_IRQHandler().
__IO uint8_t TxIndex = 0x00 |
Definition at line 46 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
__IO uint8_t TxIndex |
Definition at line 45 of file STM32F0xx_StdPeriph_Examples/CRC/CRC_TwoBoards/main.c.
Referenced by main(), and USARTx_IRQHandler().
__IO uint8_t UsartMode = USART_MODE_TRANSMITTER |
Definition at line 49 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
Referenced by main(), and USARTx_IRQHandler().
__IO uint8_t UsartMode |
Definition at line 49 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
Referenced by main(), and USARTx_IRQHandler().
__IO uint8_t UsartTransactionType = USART_TRANSACTIONTYPE_CMD |
Definition at line 50 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
Referenced by main(), and USARTx_IRQHandler().
__IO uint8_t UsartTransactionType |
Definition at line 50 of file STM32F0xx_StdPeriph_Examples/USART/USART_TwoBoards/DataExchangeInterrupt/main.c.
Referenced by main(), and USARTx_IRQHandler().