TouchGFX: UART to UI WITHOUT RTOS!!!
I am trying to display UART data received to UI WITHOUT RTOS but I am unsure how to code the model, I am getting error every time. I read the documentation and tried to reproduce the same thing but in vain. I watched a lot of videos on youtube but they all used RTOS. My project consists of not using RTOS.
I can confirm that my UART works and I can receive strings from a terminal. I used HAL UART function in the Main() while loop.
while (1)
{
MX_TouchGFX_Process();
HAL_UARTEx_ReceiveToIdle_DMA(&huart3, RX_String, sizeof(RX_String));
}In my Screen1View.cpp file, I have inserted a function that should display the received UART string to a text box:
void Screen1View::uart_Data(char* RX_String)
{
textArea2.setWideTextAction(touchgfx::WIDE_TEXT_WORDWRAP);
Unicode::strncpy(textArea2Buffer, RX_String, TEXTAREA2_SIZE);
textArea2.invalidate();
}In the Screen1Present.cpp:
void Screen1Presenter::uart_Data(char* RX_String)
{
view.uart_Data(RX_String);
}I declared virtual void uart_Data(char* RX_String); in ModelListener.hpp
I am however having problem with Model.cpp:
void Model::tick()
{
#ifndef SIMULATOR
modelListener->uart_Data(RX_String);
#endif
}This is what I have so far and I feel something is missing. Can someone please give some guidance?
