Solved
Send variable from screen1View.cpp to Model.cpp
Hello,
I would like to send the value of a parameter from screen1View.cpp to Model.cpp.
Is there any way to do this?
I work with TouchGFX 4.14 and STM32429-Eval
Thanks!
Hello,
I would like to send the value of a parameter from screen1View.cpp to Model.cpp.
Is there any way to do this?
I work with TouchGFX 4.14 and STM32429-Eval
Thanks!
When you are newbie, star twith simple think and irq use later. Working solution is config I2C in main and too in main create function to pool read state on joystick, no based on interrupt .
// recomm 400kHz I2C
#define I2CREADTIMEOUT 4
uint8_t joystik_GET_state(void)
{
uint8_t joystik_state[] = {0xFF};
HAL_I2C_Mem_Read(&hi2c1, 0x84, 0x0B, I2C_MEMADD_SIZE_8BIT, joystik_state, 1, I2CREADTIMEOUT);
return joystik_state[0];
}in model tick
if (joystik_GET_state() &MASKBIT )
{
static_cast<FrontendApplication*>(Application::getInstance())->handleKeyEvent(88); // keycode from gui interaction
}Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.