2019-09-04 02:05 AM
I see that inside TouchGFX projects there is a default class for the touchController (ST1232), but it's then reimplemented with a specific class for every disco board.
Is there any way to use that class(ST1232)? i need that because my board touch will use a similar driver (ST1633)
Thanks
Stefano
2019-09-04 05:09 AM
Hi,
Sure, just use that class as is or copy it and make your own modifications (=> ST1633TouchController.cpp). ST1232 is a left over from when we had all board-related files inside the release where as now they're a part of the application templates.
Make sure your new class gets compiled and that should be it. The TouchController class (known by HAL) has only pure virtual functions that are then defined by the user.
#ifndef TOUCHCONTROLLER_HPP
#define TOUCHCONTROLLER_HPP
#include <touchgfx/hal/Types.hpp>
namespace touchgfx
{
/**
* @class TouchController TouchController.hpp platform/driver/touch/TouchController.hpp
*
* @brief Basic Touch Controller interface.
*
* Basic Touch Controller interface.
*/
class TouchController
{
public:
virtual void init() = 0;
virtual bool sampleTouch(int32_t& x, int32_t& y) = 0;
};
} // namespace touchgfx
#endif // TOUCHCONTROLLER_HPP
/Martin