Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
card10
firmware
Commits
88bc3ea3
Commit
88bc3ea3
authored
Aug 24, 2019
by
swym
Browse files
Merge branch 'rahix/fix-serial' into 'master'
Perform serial prints in a critical section See merge request
!240
parents
61599d4d
32681478
Pipeline
#3348
passed with stages
in 1 minute and 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
epicardium/modules/serial.c
View file @
88bc3ea3
...
...
@@ -27,7 +27,21 @@ static QueueHandle_t read_queue;
*/
void
epic_uart_write_str
(
const
char
*
str
,
intptr_t
length
)
{
uint32_t
basepri
=
__get_BASEPRI
();
if
(
xPortIsInsideInterrupt
())
{
taskENTER_CRITICAL_FROM_ISR
();
}
else
{
taskENTER_CRITICAL
();
}
UART_Write
(
ConsoleUart
,
(
uint8_t
*
)
str
,
length
);
if
(
xPortIsInsideInterrupt
())
{
taskEXIT_CRITICAL_FROM_ISR
(
basepri
);
}
else
{
taskEXIT_CRITICAL
();
}
cdcacm_write
((
uint8_t
*
)
str
,
length
);
ble_uart_write
((
uint8_t
*
)
str
,
length
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment