rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
global.h
Go to the documentation of this file.
1
/*
2
* @file global.h
3
*
4
* Global utility header file for firmware
5
*
6
* Simulator and unit tests have their own version of this header
7
*
8
* @date May 27, 2013
9
* @author Andrey Belomutskiy, (c) 2012-2020
10
*/
11
12
#pragma once
13
14
// todo: remove this from here and rely on os_access.h. unfortunately hal.h includes ch.h :(
15
#include <hal.h>
16
// *** IMPORTANT *** from painful experience we know that common_headers.h has to be included AFTER hal.h
17
// *** https://github.com/rusefi/rusefi/issues/1007 ***
18
#include "
common_headers.h
"
19
#include "
single_timer_executor.h
"
20
21
// for US_TO_NT_MULTIPLIER
22
#include "
mpu_util.h
"
23
24
#include <sys/types.h>
25
26
#ifdef __cplusplus
27
#include "
eficonsole.h
"
28
#include <ch.hpp>
29
#endif
/* __cplusplus */
30
31
32
/* definition to expand macro then apply to pragma message */
33
#define VALUE_TO_STRING(x) #x
34
#define VALUE(x) VALUE_TO_STRING(x)
35
#define VAR_NAME_VALUE(var) #var "=" VALUE(var)
36
37
// todo: very odd placement for very weird define, do we even need it? used in SENT
38
#define CORE_CLOCK STM32_SYSCLK
39
40
/**
41
* project-wide default thread stack size
42
* See also PORT_INT_REQUIRED_STACK
43
* See getRemainingStack()
44
* See CountFreeStackSpace()
45
* See "threadsinfo" command cmd_threads
46
*/
47
#ifndef UTILITY_THREAD_STACK_SIZE
48
#define UTILITY_THREAD_STACK_SIZE 400
49
#endif
/* UTILITY_THREAD_STACK_SIZE */
50
51
// CH_DBG_ENABLE_STACK_CHECK
52
#define getCurrentRemainingStack() getRemainingStack(chThdGetSelfX())
53
54
#define EFI_ERROR_CODE 0xffffffff
55
56
#include "global_port.h"
57
58
#define UNIT_TEST_BUSY_WAIT_CALLBACK() {}
common_headers.h
eficonsole.h
Console package entry point header.
mpu_util.h
single_timer_executor.h
Generated on Sat Sep 27 2025 00:10:06 for rusEFI by
1.9.8