cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable touch controller?

qqAnton
Senior

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

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @qqAnton​,

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

/Anders

View solution in original post

7 REPLIES 7

Hi @qqAnton​,

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

/Anders

@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);

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

@Anders Nedergaard PETERSEN​  what should I include to use NoTouchController?

Because I get error

Error[Pe020]: identifier "NoTouchController" is undefined 

Please add the following include

#include <platform/driver/touch/NoTouchController.hpp>

That should do the trick

Thank you, now it works!

Hi @qqAnton​ @Anders Nedergaard PETERSEN

I can't find the file "BoardConfiguration.cpp"in my project. Where it should be located ?

Thank you