Current library uses SPL functions on the initialization stage and CMSIS definitions inside main code in order to get access to MCU registers directly. This approach provides the best performance and saves CPU free time.
How does the MCU know when a data frame sent from the transceiver is ready to be read? At the moment, the project implements 4 methods for obtaining data:
- Receive until line idle status is detected
- Receive until RX timeout for ReadBufferSize is elapsed
- Receive until "\r\n" escape sequence is detected
- Receive until RX buffer is full
- Copy
USART.handUSART.cfrom PROJ_DIR\Libraries\USART to your project - Write the line
#include "USART.h"in your main header file - In
USART.huncomment USARTx_Enable needed by your project - Choose only one way to receive the data
- Define maximum read and write buffer sizes
The library is tested on:
- BluePill board
- STM32F407VGT6 (STM32F4XX_M board)
- STM32F107RCT6