-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShared.h
More file actions
42 lines (37 loc) · 1018 Bytes
/
Shared.h
File metadata and controls
42 lines (37 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef _SHARED
#define _SHARED
#ifdef DEBUG
#define DebugPrintf(...) Serial.printf(__VA_ARGS__)
#define DebugPrintln(...) Serial.println(__VA_ARGS__)
#else
#define DebugPrintln(...)
#define DebugPrintf(...)
#endif
// ESP32-S3 pins
#define ILI9341_SCK SCK
#define ILI9341_MOSI MOSI
#define ILI9341_MISO GFX_NOT_DEFINED
#define ILI9341_CS SS
#define ILI9341_DC MISO
#define ILI9341_BL D0
#define ILI9341_RST D1
#define MOSFET_GATE D2
#define FT6336_INT D3
#define SN65HVD230_RXPin D4
#define SN65HVD230_TXPin D5
#define FT6336_RST D6
// Car data needed for the information to be displayed on LCD
struct CarData
{
int32_t EngineRPM;
int32_t CurrentGear;
int32_t GearboxMode;
int32_t VehicleSpeed;
int32_t TurboBoostPSI;
int32_t DayNightStatus;
};
// This data is shared between two ESP32-S3 cores
CarData g_CurrentCarData { 0 };
SemaphoreHandle_t g_SemaphoreCarData = nullptr;
TaskHandle_t g_TaskDisplayInfo = nullptr;
#endif // _SHARED