30 lines
1.1 KiB
C++
Raw Normal View History

2023-03-06 21:21:00 +01:00
/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#include <simulator/mainBase.hpp>
#include <platform/hal/simulator/sdl2/HALSDL2.hpp>
#include <common/TouchGFXInit.hpp>
#include <platform/driver/lcd/LCD16bpp.hpp>
#include <string.h>
#ifdef __GNUC__
#define fopen_s(pFile, filename, mode) (((*(pFile)) = fopen((filename), (mode))) == NULL)
#endif
touchgfx::LCD16bpp lcd;
void setupSimulator(int argc, char** argv, touchgfx::HAL& hal)
{
// Simulate hardware running at 60Hz generating a vsync every 16.6667 ms
static_cast<touchgfx::HALSDL2&>(hal).setVsyncInterval(16.6667f);
2023-05-22 05:59:36 +02:00
static_cast<touchgfx::HALSDL2&>(hal).setWindowTitle("SteeringWheel");
2023-03-06 21:21:00 +01:00
// Initialize SDL
bool sdl_init_result = static_cast<touchgfx::HALSDL2&>(hal).sdl_init(argc, argv);
assert(sdl_init_result && "Error during SDL initialization");
}
touchgfx::LCD& setupLCD()
{
return lcd;
}