Skip to main content
July 22, 2019
Solved

How to disable touch controller?

  • July 22, 2019
  • 7 replies
  • 2370 views

Hello,

I use STM32F429 Discovery board, which has touch controller,

but in my project I don't need it, so I want to turn it off.

In BoardConfiguration.cpp I found this initialization:

STM32F4TouchController tc;
HAL& hal = touchgfx_generic_init<STM32F4HAL>(dma, display, tc, dispWidth, dispHeight,(uint16_t*) 0, 0, 0);

And description of touchgfx_generic_init function says:

@param [in] tc Reference to the touch controller driver (or NoTouchController to disable touch input).

How to turn Touch controller off?

Should I change "tc" in touchgfx_generic_init for NoTouchController or what?

Thank you,

Anton

This topic has been closed for replies.
Best answer by Anders Nedergaard PETERSEN

Hi @qqAnton​,

Yes, you should change the tc object to a NoTouchController.

/Anders

7 replies

Anders Nedergaard PETERSEN
Senior II
July 22, 2019

Hi @qqAnton​,

Yes, you should change the tc object to a NoTouchController.

/Anders

July 23, 2019

@Anders Nedergaard PETERSEN​  do you mean this?

STM32F4TouchController NoTouchController;
HAL& hal = touchgfx_generic_init<STM32F4HAL>(dma, display, NoTouchController, dispWidth, dispHeight,(uint16_t*) 0, 0, 0);

Anders Nedergaard PETERSEN
Senior II
July 23, 2019

No, changing the type for tc to a NoTouchController, like so:

NoTouchController tc;
HAL& hal = touchgfx_generic_init<STM32F4HAL>(dma, display, tc, dispWidth, dispHeight,(uint16_t*) 0, 0, 0);

/Anders