stanleyhuangyc / Freematics

Official source code repository for Freematics
https://freematics.com
419 stars 345 forks source link

Non-effective critical sections on SPI send/receive methods #161

Open ankostis opened 2 years ago

ankostis commented 2 years ago

From my rough understanding of FreeRTOS, i believe that the critical-sections on CLink_SPI::receive() and CLink_SPI::send() methods are non-effective, because they exclusion-lock created inside the stack of each method, so it's impossible to share it with any other code;
maybe the original intention of the code for them lock to become an instance-member of the CLink_SPI::class, correct?