Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
marlin-anet-a8
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
12ce051b
Commit
12ce051b
authored
Apr 28, 2017
by
Scott Lahteine
Committed by
teemuatlut
Apr 29, 2017
Browse files
Options
Downloads
Patches
Plain Diff
Add a function to output spaces to serial
parent
42f4c532
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Marlin/serial.cpp
+2
-0
2 additions, 0 deletions
Marlin/serial.cpp
Marlin/serial.h
+5
-0
5 additions, 0 deletions
Marlin/serial.h
with
7 additions
and
0 deletions
Marlin/serial.cpp
+
2
−
0
View file @
12ce051b
...
...
@@ -32,3 +32,5 @@ void serial_echopair_P(const char* s_P, long v) { serialprintPGM(s_P);
void
serial_echopair_P
(
const
char
*
s_P
,
float
v
)
{
serialprintPGM
(
s_P
);
SERIAL_ECHO
(
v
);
}
void
serial_echopair_P
(
const
char
*
s_P
,
double
v
)
{
serialprintPGM
(
s_P
);
SERIAL_ECHO
(
v
);
}
void
serial_echopair_P
(
const
char
*
s_P
,
unsigned
long
v
)
{
serialprintPGM
(
s_P
);
SERIAL_ECHO
(
v
);
}
void
serial_spaces
(
uint8_t
count
)
{
while
(
count
--
)
MYSERIAL
.
write
(
' '
);
}
This diff is collapsed.
Click to expand it.
Marlin/serial.h
+
5
−
0
View file @
12ce051b
...
...
@@ -84,6 +84,11 @@ FORCE_INLINE void serial_echopair_P(const char* s_P, uint16_t v) { serial_echopa
FORCE_INLINE
void
serial_echopair_P
(
const
char
*
s_P
,
bool
v
)
{
serial_echopair_P
(
s_P
,
(
int
)
v
);
}
FORCE_INLINE
void
serial_echopair_P
(
const
char
*
s_P
,
void
*
v
)
{
serial_echopair_P
(
s_P
,
(
unsigned
long
)
v
);
}
void
serial_spaces
(
uint8_t
count
);
#define SERIAL_ECHO_SP(C) serial_spaces(C)
#define SERIAL_ERROR_SP(C) serial_spaces(C)
#define SERIAL_PROTOCOL_SP(C) serial_spaces(C)
//
// Functions for serial printing from PROGMEM. (Saves loads of SRAM.)
//
...
...
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