rusefi/simulator/simulator/global.h

70 lines
1.1 KiB
C
Raw Normal View History

2018-09-16 17:28:23 -07:00
/*
* @file global.h
*
* Global header file for win32 or posix simulator
*
* @date May 27, 2013
2020-01-13 18:57:43 -08:00
* @author Andrey Belomutskiy, (c) 2012-2020
2018-09-16 17:28:23 -07:00
*/
2020-02-13 20:25:09 -08:00
#pragma once
2015-07-10 06:01:56 -07:00
#include <hal.h>
2018-09-16 17:28:23 -07:00
#include <stdlib.h>
2015-07-10 06:01:56 -07:00
#include <time.h>
2018-09-16 20:10:06 -07:00
#include "common_headers.h"
2024-02-16 15:59:09 -08:00
#include "signal_executor_sleep.h"
2017-03-31 01:36:51 -07:00
2015-07-10 06:01:56 -07:00
#include "boards.h"
2018-09-16 19:00:14 -07:00
#ifdef __cplusplus
#include "chprintf.h"
#include "cli_registry.h"
#include "eficonsole.h"
#include <ch.hpp>
2018-09-16 19:00:14 -07:00
#endif /* __cplusplus */
2020-03-28 18:28:32 -07:00
#define hasOsPanicError() (FALSE)
2016-04-01 17:02:26 -07:00
2015-07-10 06:01:56 -07:00
#define US_TO_NT_MULTIPLIER 100
// need to fight 32bit int overflow
#define MY_US2ST(x) ((x) / 10)
#define EFI_ERROR_CODE 0xffffffff
#define DL_OUTPUT_BUFFER 9000
#define CCM_OPTIONAL
2020-04-13 06:12:45 -07:00
#define NO_CACHE
2015-07-10 06:01:56 -07:00
#define EFI_CUSTOM_PANIC_METHOD 1
// project-wide default thread stack size
#define UTILITY_THREAD_STACK_SIZE 1384
#define UNIT_TEST_BUSY_WAIT_CALLBACK() {}
2015-07-10 06:01:56 -07:00
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
2023-07-01 22:54:57 -07:00
void printToConsole(const char *p);
2018-09-16 19:00:14 -07:00
2019-02-23 09:33:49 -08:00
#define getCurrentRemainingStack() getRemainingStack(chThdGetSelfX())
2016-04-01 17:02:26 -07:00
int getRemainingStack(thread_t *otp);
2015-07-10 06:01:56 -07:00
void applyNewConfiguration(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#define hal_lld_get_counter_value() 0