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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Marek
firmware
Commits
545e849d
Commit
545e849d
authored
5 years ago
by
schneider
Browse files
Options
Downloads
Patches
Plain Diff
hack(ble): Also print stuff on USB uart
parent
e38234a1
Branches
schneider/bonding
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/sdk/Libraries/Boards/Source/stdio.c
+4
-0
4 additions, 0 deletions
lib/sdk/Libraries/Boards/Source/stdio.c
with
4 additions
and
0 deletions
lib/sdk/Libraries/Boards/Source/stdio.c
+
4
−
0
View file @
545e849d
...
...
@@ -170,6 +170,7 @@ int __read(int file, unsigned char *ptr, size_t len)
return
num
;
}
__attribute__
((
weak
))
void
cdcacm_write
(
uint8_t
*
data
,
int
len
);
/* newlib/libc printf() will eventually call write() to get the data to the stdout */
#if defined ( __GNUC__ )
// GNUC _write function prototype
...
...
@@ -190,7 +191,10 @@ int __write(int file, const unsigned char *ptr, size_t len)
for
(
n
=
0
;
n
<
len
;
n
++
)
{
if
(
*
ptr
==
'\n'
)
{
UART_WriteByte
(
MXC_UARTn
,
'\r'
);
uint8_t
tmp
=
'\r'
;
cdcacm_write
(
&
tmp
,
1
);
}
cdcacm_write
(
ptr
,
1
);
UART_WriteByte
(
MXC_UARTn
,
*
ptr
++
);
}
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment