auto-sync

This commit is contained in:
rusEfi 2016-04-01 20:02:26 -04:00
parent 8d7b50132f
commit 762fd2e58b
5 changed files with 22 additions and 17 deletions

View File

@ -1,7 +1,7 @@
UTILSRC = $(PROJECT_DIR)/util/crc.c \ UTILSRC = $(PROJECT_DIR)/util/crc.c \
$(PROJECT_DIR)/util/data_buffer.c \ $(PROJECT_DIR)/util/data_buffer.c \
$(PROJECT_DIR)/console_util/rfiutil.c \ $(PROJECT_DIR)/util/rfiutil.c \
$(PROJECT_DIR)/util/histogram.c $(PROJECT_DIR)/util/histogram.c
UTILSRC_CPP = $(PROJECT_DIR)/util/cyclic_buffer.cpp \ UTILSRC_CPP = $(PROJECT_DIR)/util/cyclic_buffer.cpp \

View File

@ -22,7 +22,7 @@
#define SHELL_WA_SIZE THD_WA_SIZE(4096) #define SHELL_WA_SIZE THD_WA_SIZE(4096)
#define CONSOLE_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 *shelltp1;
//static Thread *shelltp2; //static Thread *shelltp2;
@ -43,10 +43,10 @@ static msg_t console_thread(void *arg) {
(void) arg; (void) arg;
while (!chThdShouldTerminate()) { while (!chThdShouldTerminate()) {
Thread *tp = chMsgWait(); thread_t *tp = chMsgWait();
puts((char *) chMsgGet(tp)); puts((char *) chMsgGet(tp));
fflush(stdout); fflush(stdout);
chMsgRelease(tp, RDY_OK); chMsgRelease(tp, MSG_OK);
} }
return 0; 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. * @brief SD1 status change handler.
@ -88,7 +88,7 @@ static EventListener sd1fel, sd2fel;
* @param[in] id event id. * @param[in] id event id.
*/ */
static void sd1_handler(eventid_t id) { static void sd1_handler(eventid_t id) {
flagsmask_t flags; eventflags_t flags;
(void) id; (void) id;
flags = chEvtGetAndClearFlags(&sd1fel); flags = chEvtGetAndClearFlags(&sd1fel);
@ -112,7 +112,7 @@ static void sd1_handler(eventid_t id) {
* @param[in] id event id. * @param[in] id event id.
*/ */
static void sd2_handler(eventid_t id) { static void sd2_handler(eventid_t id) {
flagsmask_t flags; eventflags_t flags;
(void) id; (void) id;
flags = chEvtGetAndClearFlags(&sd2fel); flags = chEvtGetAndClearFlags(&sd2fel);
@ -136,7 +136,7 @@ int main(void) {
initTestStream(&testStream); initTestStream(&testStream);
EventListener tel; event_listener_t tel;
/* /*
* System initializations. * System initializations.

View File

@ -19,6 +19,7 @@
#define CONSOLE_MAX_ACTIONS 256 #define CONSOLE_MAX_ACTIONS 256
#define EFI_SIMULATOR TRUE #define EFI_SIMULATOR TRUE
#define EFI_PROD_CODE FALSE
#define EFI_MAP_AVERAGING TRUE #define EFI_MAP_AVERAGING TRUE

View File

@ -13,13 +13,22 @@
#include "efilib.h" #include "efilib.h"
#include "efitime.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 US_TO_NT_MULTIPLIER 100
#define ALWAYS_INLINE INLINE #define ALWAYS_INLINE INLINE
#define US2NT(x) (US_TO_NT_MULTIPLIER * (x)) #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) #define NT2US(x) ((x) / US_TO_NT_MULTIPLIER)
// need to fight 32bit int overflow // need to fight 32bit int overflow
@ -66,10 +75,10 @@ extern "C"
void printToWin32Console(char *p); void printToWin32Console(char *p);
int systicks2ms(int systicks); int systicks2ms(int systicks);
int getRemainingStack(Thread *otp); int getRemainingStack(thread_t *otp);
// todo: move somewhere else? // todo: move somewhere else?
bool_t lockAnyContext(void); bool lockAnyContext(void);
void unlockAnyContext(void); void unlockAnyContext(void);
void applyNewConfiguration(void); void applyNewConfiguration(void);
@ -85,11 +94,6 @@ void applyNewConfiguration(void);
#define hal_lld_get_counter_value() 0 #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; \ #define EXTERN_ENGINE extern Engine *engine; \
extern engine_configuration_s *engineConfiguration; \ extern engine_configuration_s *engineConfiguration; \
extern board_configuration_s *boardConfiguration; \ extern board_configuration_s *boardConfiguration; \

View File

@ -56,7 +56,7 @@ void outputPinRegisterExt2(const char *msg, OutputPin *output, brain_pin_e brain
// return true; // return true;
//} //}
int getRemainingStack(Thread *otp) { int getRemainingStack(thread_t *otp) {
return 99999; return 99999;
} }