alejoseb / Modbus-STM32-HAL-FreeRTOS

Modbus TCP and RTU, Master and Slave for STM32 using Cube HAL and FreeRTOS
GNU Lesser General Public License v2.1
560 stars 188 forks source link

Rearrange UART interrupt callbacks #10

Closed djuseeq closed 3 years ago

djuseeq commented 3 years ago

Hi. I mean is it possible to unify the two callback functions, put them in one file (RxCpltCallback is in Modbus.c)? This is not a vital problem, i have already make it for myself, because i use it with another library where i made it that way and i think it`s easier to exclude from build these source files and create a project related source file where we merge the two callback functions or do it in the main.c, and that way we don't have to touch the original source files. (UARTCallback.c). This is just my opinion, if for some reason is not right for You, then please let ignore it. Thanks

alejoseb commented 3 years ago

Hi, Yes I think that helps. I moved the RX callback. TX and RX callbacks are now in the UARTCallback.c file. I also added the portYIELD_FROM_ISR( xHigherPriorityTaskWoken ) line that was missed in the RX callback, you can check my latest commit.