close #30 added overwritable help command parameter and fixed some compiler issues (some of them only appeared when compiling with optimization)
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
static shellmatta_retCode_t writeFct(const char* data, uint32_t length)
|
||||
{
|
||||
(void)data;
|
||||
(void)length;
|
||||
return SHELLMATTA_OK;
|
||||
}
|
||||
|
||||
|
@@ -9,7 +9,7 @@ static uint32_t write_length;
|
||||
static shellmatta_retCode_t writeFct(const char* data, uint32_t length)
|
||||
{
|
||||
write_callCnt ++;
|
||||
strncpy(write_data, data, length);
|
||||
memcpy(write_data, data, length);
|
||||
write_length = length;
|
||||
return SHELLMATTA_OK;
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ static uint32_t write_length;
|
||||
static shellmatta_retCode_t writeFct(const char* data, uint32_t length)
|
||||
{
|
||||
write_callCnt ++;
|
||||
strncpy(write_data, data, length);
|
||||
memcpy(write_data, data, length);
|
||||
write_length = length;
|
||||
return SHELLMATTA_OK;
|
||||
}
|
||||
|
@@ -3,13 +3,13 @@
|
||||
#include <string.h>
|
||||
|
||||
static uint32_t write_callCnt = 0u;
|
||||
static char write_data[10];
|
||||
static char write_data[10u];
|
||||
static uint32_t write_length;
|
||||
|
||||
static shellmatta_retCode_t writeFct(const char* data, uint32_t length)
|
||||
{
|
||||
write_callCnt ++;
|
||||
strncpy(write_data, data, length);
|
||||
memcpy(write_data, data, length);
|
||||
write_length = length;
|
||||
return SHELLMATTA_OK;
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ static uint32_t write_idx;
|
||||
static shellmatta_retCode_t writeFct(const char* data, uint32_t length)
|
||||
{
|
||||
write_callCnt ++;
|
||||
strncpy(&write_data[write_idx], data, length);
|
||||
memcpy(&write_data[write_idx], data, length);
|
||||
write_idx += length;
|
||||
return SHELLMATTA_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user