rusefi-1/win32_functional_tests/simulator/global.h

94 lines
1.7 KiB
C
Raw Normal View History

2014-08-29 07:52:33 -07:00
#include <ch.h>
#include <hal.h>
#include <time.h>
#include <math.h>
#include "rusefi_enums.h"
2014-09-04 15:02:56 -07:00
#include "enum_strings.h"
2014-10-12 15:02:54 -07:00
#include "auto_generated_enums.h"
2014-08-29 07:52:33 -07:00
#include "obd_error_codes.h"
#include "error_handling.h"
#include "boards.h"
#include "eficonsole.h"
#include "efilib.h"
#include "datalogging.h"
#include "efitime.h"
2014-09-12 20:04:25 -07:00
#define US_TO_NT_MULTIPLIER 100
#define US2NT(x) (US_TO_NT_MULTIPLIER * (x))
#define NT2US(x) ((x) / US_TO_NT_MULTIPLIER)
2014-08-29 07:52:33 -07:00
#ifndef GLOBAL_FT_H_
#define GLOBAL_FT_H_
#define EFI_ERROR_CODE 0xffffffff
#define DL_OUTPUT_BUFFER 9000
#define CCM_OPTIONAL
#include "cli_registry.h"
#include "rusefi_enums.h"
#define EFI_CUSTOM_PANIC_METHOD 1
// project-wide default thread stack size
#define UTILITY_THREAD_STACK_SIZE 1384
/**
* @brief @p Win32TestStream virtual methods table.
*/
struct Win32TestStreamVMT {
_base_channel_methods
};
typedef struct {
const struct Win32TestStreamVMT *vmt;
} TestStream;
extern TestStream testStream;
//##define TRUE 1
//#define FALSE 0
#endif /* GLOBAL_FT_H_ */
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
void printToWin32Console(char *p);
int systicks2ms(int systicks);
int getRemainingStack(Thread *otp);
// todo: move somewhere else?
bool_t lockAnyContext(void);
void unlockAnyContext(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
/**
* number of SysClock ticks in one ms
*/
#define TICKS_IN_MS (CH_FREQUENCY / 1000)
#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
2014-11-07 19:04:45 -08:00
2014-11-07 20:03:53 -08:00
#define EXTERN_ENGINE extern Engine *engine; \
extern engine_configuration_s *engineConfiguration;
2014-11-07 19:04:45 -08:00
#define DECLATE_ENGINE_PARAMETER
#define PASS_ENGINE_PARAMETER