new configurable option EFI_TEXT_LOGGING
This commit is contained in:
parent
cf5e05e7b9
commit
330c82172b
|
@ -5,8 +5,6 @@
|
|||
* @author Andrey Belomutskiy, (c) 2012-2017
|
||||
*/
|
||||
|
||||
#include "efifeatures.h"
|
||||
|
||||
#ifndef NISSAN_PRIMERA_H_
|
||||
#define NISSAN_PRIMERA_H_
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
#define EFI_FSIO TRUE
|
||||
|
||||
#define EFI_TEXT_LOGGING TRUE
|
||||
|
||||
#define EFI_PWM_TESTER FALSE
|
||||
|
||||
#define HAL_USE_USB_MSD FALSE
|
||||
|
|
|
@ -41,6 +41,7 @@ static char * outputBuffer;
|
|||
* of logging content
|
||||
*/
|
||||
void scheduleLogging(Logging *logging) {
|
||||
#if EFI_TEXT_LOGGING || defined(__DOXYGEN__)
|
||||
// this could be done without locking
|
||||
int newLength = efiStrlen(logging->buffer);
|
||||
|
||||
|
@ -63,6 +64,7 @@ void scheduleLogging(Logging *logging) {
|
|||
unlockOutputBuffer();
|
||||
}
|
||||
resetLogging(logging);
|
||||
#endif /* EFI_TEXT_LOGGING */
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -112,12 +114,14 @@ char * swapOutputBuffers(int *actualOutputBufferSize) {
|
|||
* actual data to console in order to avoid concurrent access to serial hardware.
|
||||
*/
|
||||
void printPending(void) {
|
||||
#if EFI_TEXT_LOGGING || defined(__DOXYGEN__)
|
||||
int actualOutputBufferSize;
|
||||
char *output = swapOutputBuffers(&actualOutputBufferSize);
|
||||
|
||||
if (actualOutputBufferSize > 0) {
|
||||
printWithLength(output);
|
||||
}
|
||||
#endif /* EFI_TEXT_LOGGING */
|
||||
}
|
||||
|
||||
void initLoggingCentral(void) {
|
||||
|
@ -133,6 +137,7 @@ void initLoggingCentral(void) {
|
|||
* in order to reduce memory usage
|
||||
*/
|
||||
void scheduleMsg(Logging *logging, const char *fmt, ...) {
|
||||
#if EFI_TEXT_LOGGING || defined(__DOXYGEN__)
|
||||
if (logging == NULL) {
|
||||
warning(CUSTOM_ERR_LOGGING_NULL, "logging NULL");
|
||||
return;
|
||||
|
@ -151,6 +156,7 @@ void scheduleMsg(Logging *logging, const char *fmt, ...) {
|
|||
if (!wasLocked) {
|
||||
unlockAnyContext();
|
||||
}
|
||||
#endif /* EFI_TEXT_LOGGING */
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#define EFI_FSIO TRUE
|
||||
|
||||
#define EFI_TEXT_LOGGING TRUE
|
||||
|
||||
#define EFI_MEMS FALSE
|
||||
|
||||
#define CONSOLE_MAX_ACTIONS 256
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
#define EFI_FSIO TRUE
|
||||
|
||||
#define EFI_TEXT_LOGGING TRUE
|
||||
|
||||
#define EFI_HISTOGRAMS FALSE
|
||||
|
||||
#define CONSOLE_MAX_ACTIONS 128
|
||||
|
|
Loading…
Reference in New Issue