m5stack / M5Tough

M5Stack Tough Arduino Library
MIT License
16 stars 10 forks source link

error in compile example #14

Closed hosseinaghaie closed 2 months ago

hosseinaghaie commented 2 months ago

when i want to test example of tough controller it display this error: In file included from c:\Users\Admin\Documents\Arduino\libraries\M5Tough\src/M5Display.h:10, from c:\Users\Admin\Documents\Arduino\libraries\M5Tough\src/M5Tough.h:76, from C:\Users\Admin\AppData\Local\Temp.arduinoIDE-unsaved202472-6768-12gh42i.vf28i\Display\Display.ino:13: c:\Users\Admin\Documents\Arduino\libraries\M5Tough\src/M5Display.h: In member function 'void M5Display::startWrite()': c:\Users\Admin\Documents\Arduino\libraries\M5Tough\src/utility/In_eSPI.h:212:26: error: 'GPIO' was not declared in this scope 212 | #define CS_L GPIO.out_w1tc = (1 << TFT_CS);GPIO.out_w1tc = (1 << TFT_CS) | ^~~~ c:\Users\Admin\Documents\Arduino\libraries\M5Tough\src/M5Display.h:46:9: note: in expansion of macro 'CS_L' 46 | CS_L; | ^~~~ c:\Users\Admin\Documents\Arduino\libraries\M5Tough\src/M5Display.h: In member function 'void M5Display::endWrite()': c:\Users\Admin\Documents\Arduino\libraries\M5Tough\src/utility/In_eSPI.h:213:26: error: 'GPIO' was not declared in this scope 213 | #define CS_H GPIO.out_w1ts = (1 << TFT_CS)//;GPIO.out_w1ts = (1 << TFT_CS) | ^~~~ c:\Users\Admin\Documents\Arduino\libraries\M5Tough\src/M5Display.h:57:9: note: in expansion of macro 'CS_H' 57 | CS_H; | ^~~~

Tinyu-Zhao commented 2 months ago

Please provide your Arduino version and M5Tough library version in detail

hosseinaghaie commented 2 months ago

arduino vesrion: 2.3.2 M5Tough library: ican find the vesrion in github, just i use the latest version of: https://github.com/m5stack/M5Tough and add to arduino with zip file(because of cant find it to arduino lib) and just want to run helloworld.ino for test,

Tinyu-Zhao commented 2 months ago

Did you switch development to M5Tough in M5Stack.

image
hosseinaghaie commented 2 months ago

I found the problem. It seems that I have two m5tough, one in the esp32 section and one in the m5stack. When I select m5tough from the esp32 section, it gives this error.

Tinyu-Zhao commented 2 months ago

I found the problem. It seems that I have two m5tough, one in the esp32 section and one in the m5stack. When I select m5tough from the esp32 section, it gives this error.

Thank you for the tip. I'll look into it.