0

I am using the STM32F072B-DISCO, trying to implement an example code for the touch sensing and followed the instructions of the "Getting Started with touch sensing Control on STM32 MCU". The code given in chapter 7.2.6 results in errors.

error_code

Console:

../Core/Src/main.c:78:24: error: conflicting types for 'MyLinRots' 78 | extern TSL_LinRot_T MyLinRots[]; | ^~~~~~~~~ In file included from ../TOUCHSENSING/App/tou

one other error I already removed, was one bracket too much at the end of the example code.

The given example code should be added between the User Code Begin 3 & End which is in the main loop.

Shouldn't be the extern TSL_LinRot_T MyLinRots[]; outside of the loop? According to the manual, I only have to copy and insert this code and it should work without any edits.

link to manual : Getting started with touch sensing control on STM32 microcontrollers

PS: I do not have a lot of programming experience

Lyoner
  • 155
  • 8
  • I am not specifically refering to STM devices but unfortunately few things get outdated quicker than sample code for any MCUs. BTW: Your sample looks more like chapter 7.2.6. – Gerhardh Apr 19 '23 at 08:06
  • You only show the problem window of your IDE (Looks like Code Composer Studio). I assume you get a more detailled error message in Console window when you compile your code. Does it mention what type was expected? – Gerhardh Apr 19 '23 at 08:11
  • yes, you are right, its 7.2.6 I will edit the post. – Lyoner Apr 19 '23 at 08:27
  • I am using the STM32CubeIDE. I will add a picture from the console message – Lyoner Apr 19 '23 at 08:29
  • No, please do not show pictures of text. Instead add it as formatted text in the question. – Gerhardh Apr 19 '23 at 08:31
  • 1
    Is that really all that is in the console window? Looks to me like you've missed a lot of bits out. – pmacfarlane Apr 19 '23 at 18:12

0 Answers0