Search found 1 match
- Fri Dec 15, 2023 4:42 pm
- Forum: ESP-IDF
- Topic: TWAI_TRANSMIT thread safety
- Replies: 1
- Views: 22762
TWAI_TRANSMIT thread safety
Is it safe to use twai_transmit() from multiple tasks? If not, are critical sections appropriate like so: //Disables interrupts and context-switching during twai_transmit void threadSafeTwaiTransmit(twai_message_t message){ taskENTER_CRITICAL(&my_spinlock); twai_transmit(&message, pdMS_TO_TICKS(0));...