logging: [#54] Removed UART from ISR
*No reason to remove definition, since it is still usable. For some reason, powered from my PC it works fine. Yet, it is bad to call UART from ISR anyway, our rotary queue will overflow from time to time, so it's better not to slow down processing.
This commit is contained in:
parent
f9a1066cd8
commit
dfa34d9d16
@ -117,6 +117,10 @@ static void create_log_line_nots(const char * _status,
|
||||
#define LOG_DEBUG(fmt, ...) \
|
||||
create_log_line(global_clock->getTimeFromStart(), C_DEBUG, __FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__);
|
||||
|
||||
/*
|
||||
* Even though it doesn't call timer, it still can cause a softlock on the UART transaction.
|
||||
* Left only for short-term debugging purposes.
|
||||
*/
|
||||
#define LOG_DEBUG_ISR(fmt, ...) \
|
||||
create_log_line_nots(C_DEBUG_ISR, __FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__);
|
||||
#else
|
||||
|
||||
@ -21,10 +21,6 @@ extern "C"
|
||||
portBASE_TYPE xHigherPriorityWoken = pdFALSE;
|
||||
uint8_t data = ThreadCommon::RotaryAction::Right;
|
||||
xQueueSendFromISR (*p_rotary_isr_q, &data, &xHigherPriorityWoken);
|
||||
if(!xHigherPriorityWoken)
|
||||
{
|
||||
LOG_DEBUG_ISR("[PIN_INT0_IRQn] portEND_SWITCHING_ISR called with False value");
|
||||
}
|
||||
portEND_SWITCHING_ISR(xHigherPriorityWoken);
|
||||
}
|
||||
|
||||
@ -35,10 +31,6 @@ extern "C"
|
||||
portBASE_TYPE xHigherPriorityWoken = pdFALSE;
|
||||
uint8_t data = ThreadCommon::RotaryAction::Left;
|
||||
xQueueSendFromISR (*p_rotary_isr_q, &data, &xHigherPriorityWoken);
|
||||
if(!xHigherPriorityWoken)
|
||||
{
|
||||
LOG_DEBUG_ISR("[PIN_INT1_IRQn] portEND_SWITCHING_ISR called with False value");
|
||||
}
|
||||
portEND_SWITCHING_ISR(xHigherPriorityWoken);
|
||||
}
|
||||
|
||||
@ -49,10 +41,6 @@ extern "C"
|
||||
portBASE_TYPE xHigherPriorityWoken = pdFALSE;
|
||||
uint8_t data = ThreadCommon::RotaryAction::Press;
|
||||
xQueueSendFromISR (*p_rotary_isr_q, &data, &xHigherPriorityWoken);
|
||||
if(!xHigherPriorityWoken)
|
||||
{
|
||||
LOG_DEBUG_ISR("[PIN_INT2_IRQn] portEND_SWITCHING_ISR called with False value");
|
||||
}
|
||||
portEND_SWITCHING_ISR(xHigherPriorityWoken);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user