encapsulation
This commit is contained in:
parent
12e0473e19
commit
364fc3915d
|
@ -103,8 +103,6 @@ using floatus_t = float;
|
|||
*/
|
||||
using percent_t = float;
|
||||
|
||||
typedef void (*Void)(void);
|
||||
|
||||
using lua_script_t = char[LUA_SCRIPT_SIZE];
|
||||
|
||||
using warning_message_t = char[WARNING_BUFFER_SIZE];
|
||||
|
@ -127,25 +125,3 @@ using brain_input_pin_e = brain_pin_e;
|
|||
using switch_input_pin_e = brain_pin_e;
|
||||
using sent_input_pin_e = brain_pin_e;
|
||||
using output_pin_e = brain_pin_e;
|
||||
|
||||
typedef void (*VoidPtr)(void*);
|
||||
|
||||
typedef void (*VoidInt)(int);
|
||||
typedef void (*VoidIntVoidPtr)(int, void*);
|
||||
typedef void (*VoidFloat)(float);
|
||||
typedef void (*VoidFloatFloat)(float, float);
|
||||
typedef void (*VoidFloatFloatFloat)(float, float, float);
|
||||
typedef void (*VoidFloatFloatFloatFloat)(float, float, float, float);
|
||||
typedef void (*VoidFloatFloatVoidPtr)(float, float, void*);
|
||||
typedef void (*VoidIntInt)(int, int);
|
||||
typedef void (*VoidIntIntVoidPtr)(int, int, void*);
|
||||
typedef void (*VoidIntFloat)(int, float);
|
||||
|
||||
typedef void (*VoidCharPtr)(const char *);
|
||||
typedef void (*VoidCharPtrVoidPtr)(const char *, void*);
|
||||
|
||||
typedef void (*VoidCharPtrCharPtr)(const char *, const char *);
|
||||
typedef void (*VoidCharPtrCharPtrVoidPtr)(const char *, const char *, void*);
|
||||
|
||||
typedef void (*VoidCharPtrCharPtrCharPtr)(const char *, const char *, const char *);
|
||||
typedef void (*VoidCharPtrCharPtrCharPtrCharPtrCharPtr)(const char *, const char *, const char *, const char *, const char *);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "efistringutil.h"
|
||||
|
||||
#include "backup_ram.h"
|
||||
#include "error_handling_led.h"
|
||||
|
|
|
@ -15,12 +15,11 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include <cstring>
|
||||
#include "efiprintf.h"
|
||||
#include "efistringutil.h"
|
||||
#include "cli_registry.h"
|
||||
|
||||
#if ! EFI_UNIT_TEST
|
||||
#include "eficonsole.h"
|
||||
#endif /* ! EFI_UNIT_TEST */
|
||||
|
||||
/* for isspace() */
|
||||
#include <ctype.h>
|
||||
|
||||
|
@ -40,7 +39,7 @@ void resetConsoleActions(void) {
|
|||
|
||||
static void doAddAction(const char *token, action_type_e type, Void callback, void *param) {
|
||||
#if !defined(EFI_DISABLE_CONSOLE_ACTIONS)
|
||||
for (uint32_t i = 0; i < efiStrlen(token);i++) {
|
||||
for (uint32_t i = 0; i < strlen(token);i++) {
|
||||
char ch = token[i];
|
||||
if (isupper(ch)) {
|
||||
firmwareError(ObdCode::CUSTOM_ERR_COMMAND_LOWER_CASE_EXPECTED, "lowerCase expected [%s]", token);
|
||||
|
|
|
@ -49,6 +49,28 @@ extern "C"
|
|||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
typedef void (*Void)(void);
|
||||
typedef void (*VoidPtr)(void*);
|
||||
typedef void (*VoidInt)(int);
|
||||
typedef void (*VoidIntVoidPtr)(int, void*);
|
||||
typedef void (*VoidFloat)(float);
|
||||
typedef void (*VoidFloatFloat)(float, float);
|
||||
typedef void (*VoidFloatFloatFloat)(float, float, float);
|
||||
typedef void (*VoidFloatFloatFloatFloat)(float, float, float, float);
|
||||
typedef void (*VoidFloatFloatVoidPtr)(float, float, void*);
|
||||
typedef void (*VoidIntInt)(int, int);
|
||||
typedef void (*VoidIntIntVoidPtr)(int, int, void*);
|
||||
typedef void (*VoidIntFloat)(int, float);
|
||||
|
||||
typedef void (*VoidCharPtr)(const char *);
|
||||
typedef void (*VoidCharPtrVoidPtr)(const char *, void*);
|
||||
|
||||
typedef void (*VoidCharPtrCharPtr)(const char *, const char *);
|
||||
typedef void (*VoidCharPtrCharPtrVoidPtr)(const char *, const char *, void*);
|
||||
|
||||
typedef void (*VoidCharPtrCharPtrCharPtr)(const char *, const char *, const char *);
|
||||
typedef void (*VoidCharPtrCharPtrCharPtrCharPtrCharPtr)(const char *, const char *, const char *, const char *, const char *);
|
||||
|
||||
void resetConsoleActions(void);
|
||||
void helpCommand(void);
|
||||
void initConsoleLogic();
|
||||
|
|
|
@ -57,10 +57,10 @@ const char * boolToString(bool value);
|
|||
|
||||
char * efiTrim(char *param);
|
||||
int mytolower(const char c);
|
||||
// todo: do we even need? does 'strlen' just work like we use it in cli_registry?
|
||||
uint32_t efiStrlen(const char *param);
|
||||
int efiPow10(int param);
|
||||
bool startsWith(const char *line, const char *prefix);
|
||||
int indexOf(const char *string, char ch);
|
||||
float atoff(const char *string);
|
||||
int atoi(const char *string);
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
#include "loggingcentral.h"
|
|
@ -0,0 +1 @@
|
|||
int indexOf(const char *string, char ch);
|
Loading…
Reference in New Issue