yoneken / rosserial_stm32

This is a part of [rosserial](https://github.com/ros-drivers/rosserial) repository to communicate with ROS system through a USART for STM32 embedded system.
BSD 2-Clause "Simplified" License
218 stars 72 forks source link

Question about function read() of Class STM32Hardware #5

Closed wangjiefjj closed 5 years ago

wangjiefjj commented 6 years ago

thank you for your sharing! I try to transplant this code to F4, I can not understand how the function read() get data from Uart, your code just Receive data one time in function init(), does the function init() run more than one time and is there any other function which can Receive data from Uart?

yoneken commented 6 years ago

Hi! Thank you for your comment!! In this project, I use DMA (Direct Memory Access) feature of STM32. Thanks to the feature, received USART data is automatically reserved to the memory.