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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
192db2ab
Commit
192db2ab
authored
8 years ago
by
bgort
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #6666 from bgort/M100fix
Fix compiler complaint related to M100
parents
59ab971f
3b0127cf
Branches
Branches containing commit
Tags
Tags containing commit
Loading
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Marlin/M100_Free_Mem_Chk.cpp
+6
-7
6 additions, 7 deletions
Marlin/M100_Free_Mem_Chk.cpp
with
6 additions
and
7 deletions
Marlin/M100_Free_Mem_Chk.cpp
+
6
−
7
View file @
192db2ab
...
...
@@ -153,15 +153,14 @@ void M100_dump_routine(const char * const title, const char *start, const char *
* Return the number of free bytes in the memory pool,
* with other vital statistics defining the pool.
*/
void
free_memory_pool_report
(
char
*
const
ptr
,
const
uint16_t
size
)
{
int16_t
max_cnt
=
-
1
;
uint16_t
block_cnt
=
0
;
void
free_memory_pool_report
(
char
*
const
ptr
,
const
int16_t
size
)
{
int16_t
max_cnt
=
-
1
,
block_cnt
=
0
;
char
*
max_addr
=
NULL
;
// Find the longest block of test bytes in the buffer
for
(
u
int16_t
i
=
0
;
i
<
size
;
i
++
)
{
for
(
int16_t
i
=
0
;
i
<
size
;
i
++
)
{
char
*
addr
=
ptr
+
i
;
if
(
*
addr
==
TEST_BYTE
)
{
const
u
int16_t
j
=
count_test_bytes
(
addr
);
const
int16_t
j
=
count_test_bytes
(
addr
);
if
(
j
>
8
)
{
SERIAL_ECHOPAIR
(
"Found "
,
j
);
SERIAL_ECHOLNPAIR
(
" bytes free at "
,
hex_address
(
addr
));
...
...
@@ -225,8 +224,8 @@ void init_free_memory(char *ptr, int16_t size) {
SERIAL_ECHO
(
size
);
SERIAL_ECHOLNPGM
(
" bytes of memory initialized.
\n
"
);
for
(
u
int16_t
i
=
0
;
i
<
size
;
i
++
)
{
if
(
(
char
)
ptr
[
i
]
!=
TEST_BYTE
)
{
for
(
int16_t
i
=
0
;
i
<
size
;
i
++
)
{
if
(
ptr
[
i
]
!=
TEST_BYTE
)
{
SERIAL_ECHOPAIR
(
"? address : "
,
hex_address
(
ptr
+
i
));
SERIAL_ECHOLNPAIR
(
"="
,
hex_byte
(
ptr
[
i
]));
SERIAL_EOL
;
...
...
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