From 762fd2e58b51a811dada2a19f13fd8ed3142ad15 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Fri, 1 Apr 2016 20:02:26 -0400 Subject: [PATCH] auto-sync --- firmware/util/util.mk | 2 +- win32_functional_tests/main.c | 14 ++++++------- .../simulator/efifeatures.h | 1 + win32_functional_tests/simulator/global.h | 20 +++++++++++-------- .../simulator/rusEfiFunctionalTest.cpp | 2 +- 5 files changed, 22 insertions(+), 17 deletions(-) diff --git a/firmware/util/util.mk b/firmware/util/util.mk index fffd062735..8e96c74d07 100644 --- a/firmware/util/util.mk +++ b/firmware/util/util.mk @@ -1,7 +1,7 @@ UTILSRC = $(PROJECT_DIR)/util/crc.c \ $(PROJECT_DIR)/util/data_buffer.c \ - $(PROJECT_DIR)/console_util/rfiutil.c \ + $(PROJECT_DIR)/util/rfiutil.c \ $(PROJECT_DIR)/util/histogram.c UTILSRC_CPP = $(PROJECT_DIR)/util/cyclic_buffer.cpp \ diff --git a/win32_functional_tests/main.c b/win32_functional_tests/main.c index dc2bfe76ac..9d7adf46b3 100644 --- a/win32_functional_tests/main.c +++ b/win32_functional_tests/main.c @@ -22,7 +22,7 @@ #define SHELL_WA_SIZE THD_WA_SIZE(4096) #define CONSOLE_WA_SIZE THD_WA_SIZE(4096) -static Thread *cdtp; +static thread_t *cdtp; //static Thread *shelltp1; //static Thread *shelltp2; @@ -43,10 +43,10 @@ static msg_t console_thread(void *arg) { (void) arg; while (!chThdShouldTerminate()) { - Thread *tp = chMsgWait(); + thread_t *tp = chMsgWait(); puts((char *) chMsgGet(tp)); fflush(stdout); - chMsgRelease(tp, RDY_OK); + chMsgRelease(tp, MSG_OK); } return 0; } @@ -80,7 +80,7 @@ static void termination_handler(eventid_t id) { // } } -static EventListener sd1fel, sd2fel; +static event_listener_t sd1fel, sd2fel; /** * @brief SD1 status change handler. @@ -88,7 +88,7 @@ static EventListener sd1fel, sd2fel; * @param[in] id event id. */ static void sd1_handler(eventid_t id) { - flagsmask_t flags; + eventflags_t flags; (void) id; flags = chEvtGetAndClearFlags(&sd1fel); @@ -112,7 +112,7 @@ static void sd1_handler(eventid_t id) { * @param[in] id event id. */ static void sd2_handler(eventid_t id) { - flagsmask_t flags; + eventflags_t flags; (void) id; flags = chEvtGetAndClearFlags(&sd2fel); @@ -136,7 +136,7 @@ int main(void) { initTestStream(&testStream); - EventListener tel; + event_listener_t tel; /* * System initializations. diff --git a/win32_functional_tests/simulator/efifeatures.h b/win32_functional_tests/simulator/efifeatures.h index 1cdb740274..5b791da918 100644 --- a/win32_functional_tests/simulator/efifeatures.h +++ b/win32_functional_tests/simulator/efifeatures.h @@ -19,6 +19,7 @@ #define CONSOLE_MAX_ACTIONS 256 #define EFI_SIMULATOR TRUE +#define EFI_PROD_CODE FALSE #define EFI_MAP_AVERAGING TRUE diff --git a/win32_functional_tests/simulator/global.h b/win32_functional_tests/simulator/global.h index 7a7348d500..88440ef3cd 100644 --- a/win32_functional_tests/simulator/global.h +++ b/win32_functional_tests/simulator/global.h @@ -13,13 +13,22 @@ #include "efilib.h" #include "efitime.h" +// this stuff is about ChibiOS 2.6 > Migration +typedef VirtualTimer virtual_timer_t; +typedef EventListener event_listener_t; +typedef Thread thread_t; +#define THD_WORKING_AREA WORKING_AREA +#define THD_FUNCTION(tname, arg) void tname(void *arg) +#define MSG_OK RDY_OK +#define eventflags_t flagsmask_t + + #define US_TO_NT_MULTIPLIER 100 #define ALWAYS_INLINE INLINE #define US2NT(x) (US_TO_NT_MULTIPLIER * (x)) -#define THD_FUNCTION(tname, arg) void tname(void *arg) #define NT2US(x) ((x) / US_TO_NT_MULTIPLIER) // need to fight 32bit int overflow @@ -66,10 +75,10 @@ extern "C" void printToWin32Console(char *p); int systicks2ms(int systicks); -int getRemainingStack(Thread *otp); +int getRemainingStack(thread_t *otp); // todo: move somewhere else? -bool_t lockAnyContext(void); +bool lockAnyContext(void); void unlockAnyContext(void); void applyNewConfiguration(void); @@ -85,11 +94,6 @@ void applyNewConfiguration(void); #define hal_lld_get_counter_value() 0 -// this stuff is about ChibiOS 2.6 > Migration -typedef VirtualTimer virtual_timer_t; -typedef EventListener event_listener_t; -#define THD_WORKING_AREA WORKING_AREA - #define EXTERN_ENGINE extern Engine *engine; \ extern engine_configuration_s *engineConfiguration; \ extern board_configuration_s *boardConfiguration; \ diff --git a/win32_functional_tests/simulator/rusEfiFunctionalTest.cpp b/win32_functional_tests/simulator/rusEfiFunctionalTest.cpp index e98e5b93bd..79f3944e84 100644 --- a/win32_functional_tests/simulator/rusEfiFunctionalTest.cpp +++ b/win32_functional_tests/simulator/rusEfiFunctionalTest.cpp @@ -56,7 +56,7 @@ void outputPinRegisterExt2(const char *msg, OutputPin *output, brain_pin_e brain // return true; //} -int getRemainingStack(Thread *otp) { +int getRemainingStack(thread_t *otp) { return 99999; }