Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
firmware
Merge requests
!104
Display all output on CDC-ACM
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Display all output on CDC-ACM
rahix/cdcacm
into
master
Overview
1
Commits
1
Pipelines
2
Changes
2
Merged
rahix
requested to merge
rahix/cdcacm
into
master
5 years ago
Overview
1
Commits
1
Pipelines
2
Changes
2
Expand
Closes
#67 (closed)
.
0
0
Merge request reports
Compare
master
version 1
3dbb5f96
5 years ago
master (base)
and
latest version
latest version
69775a15
1 commit,
5 years ago
version 1
3dbb5f96
1 commit,
5 years ago
2 files
+
20
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
epicardium/modules/serial.c
+
19
−
1
Options
@@ -49,7 +49,7 @@ int epic_uart_read_char(void)
*/
int
epic_uart_read_str
(
char
*
buf
,
size_t
cnt
)
{
in
t
i
=
0
;
size_
t
i
=
0
;
for
(
i
=
0
;
i
<
cnt
;
i
++
)
{
if
(
xQueueReceive
(
read_queue
,
&
buf
[
i
],
0
)
!=
pdTRUE
)
{
@@ -60,6 +60,24 @@ int epic_uart_read_str(char *buf, size_t cnt)
return
i
;
}
long
_write_epicardium
(
int
fd
,
const
char
*
buf
,
size_t
cnt
)
{
/*
* Only print one line at a time. Insert `\r` between lines so they are
* properly displayed on the serial console.
*/
size_t
i
,
last
=
0
;
for
(
i
=
0
;
i
<
cnt
;
i
++
)
{
if
(
buf
[
i
]
==
'\n'
)
{
epic_uart_write_str
(
&
buf
[
last
],
i
-
last
);
epic_uart_write_str
(
"
\r
"
,
1
);
last
=
i
;
}
}
epic_uart_write_str
(
&
buf
[
last
],
cnt
-
last
);
return
cnt
;
}
/* Interrupt handler needed for SDK UART implementation */
void
UART0_IRQHandler
(
void
)
{
Loading