mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 03:20:00 +03:00
Refactor missing prototypes 2 (#14170)
This commit is contained in:
parent
25f65cbc01
commit
b277364b2c
192 changed files with 487 additions and 410 deletions
|
@ -339,31 +339,37 @@ static void cliWriterFlush(void)
|
|||
cliWriterFlushInternal(cliWriter);
|
||||
}
|
||||
|
||||
void cliPrint(const char *str)
|
||||
#ifdef USE_CLI_DEBUG_PRINT
|
||||
#define CLI_DEBUG_EXPORT /* empty */
|
||||
#else
|
||||
#define CLI_DEBUG_EXPORT static
|
||||
#endif
|
||||
|
||||
CLI_DEBUG_EXPORT void cliPrint(const char *str)
|
||||
{
|
||||
cliPrintInternal(cliWriter, str);
|
||||
}
|
||||
|
||||
void cliPrintLinefeed(void)
|
||||
CLI_DEBUG_EXPORT void cliPrintLinefeed(void)
|
||||
{
|
||||
cliPrint("\r\n");
|
||||
}
|
||||
|
||||
void cliPrintLine(const char *str)
|
||||
CLI_DEBUG_EXPORT void cliPrintLine(const char *str)
|
||||
{
|
||||
cliPrint(str);
|
||||
cliPrintLinefeed();
|
||||
}
|
||||
|
||||
#ifdef MINIMAL_CLI
|
||||
#define cliPrintHashLine(str)
|
||||
#else
|
||||
static void cliPrintHashLine(const char *str)
|
||||
{
|
||||
#ifndef MINIMAL_CLI
|
||||
cliPrint("\r\n# ");
|
||||
cliPrintLine(str);
|
||||
}
|
||||
#else
|
||||
UNUSED(str);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void cliPutp(void *p, char ch)
|
||||
{
|
||||
|
@ -415,7 +421,7 @@ static bool cliDefaultPrintLinef(dumpFlags_t dumpMask, bool equalsDefault, const
|
|||
}
|
||||
}
|
||||
|
||||
void cliPrintf(const char *format, ...)
|
||||
CLI_DEBUG_EXPORT void cliPrintf(const char *format, ...)
|
||||
{
|
||||
va_list va;
|
||||
va_start(va, format);
|
||||
|
@ -423,7 +429,7 @@ void cliPrintf(const char *format, ...)
|
|||
va_end(va);
|
||||
}
|
||||
|
||||
void cliPrintLinef(const char *format, ...)
|
||||
CLI_DEBUG_EXPORT void cliPrintLinef(const char *format, ...)
|
||||
{
|
||||
va_list va;
|
||||
va_start(va, format);
|
||||
|
@ -3228,7 +3234,7 @@ static void cliManufacturerId(const char *cmdName, char *cmdline)
|
|||
}
|
||||
|
||||
#if defined(USE_SIGNATURE)
|
||||
static void writeSignature(char *signatureStr, uint8_t *signature)
|
||||
static void writeSignature(char *signatureStr, const uint8_t *signature)
|
||||
{
|
||||
for (unsigned i = 0; i < SIGNATURE_LENGTH; i++) {
|
||||
tfp_sprintf(&signatureStr[2 * i], "%02x", signature[i]);
|
||||
|
@ -4269,7 +4275,7 @@ static bool prepareSave(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool tryPrepareSave(const char *cmdName)
|
||||
static bool tryPrepareSave(const char *cmdName)
|
||||
{
|
||||
bool success = prepareSave();
|
||||
#if defined(USE_CLI_BATCH)
|
||||
|
@ -4443,7 +4449,7 @@ static uint8_t getWordLength(const char *bufBegin, const char *bufEnd)
|
|||
return bufEnd - bufBegin;
|
||||
}
|
||||
|
||||
uint16_t cliGetSettingIndex(const char *name, size_t length)
|
||||
STATIC_UNIT_TESTED uint16_t cliGetSettingIndex(const char *name, size_t length)
|
||||
{
|
||||
for (uint32_t i = 0; i < valueTableEntryCount; i++) {
|
||||
const char *settingName = valueTable[i].name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue