adafruit / Adafruit_TouchScreen

Arduino library for 4-wire resistive touchscreens
http://www.adafruit.com/index.php?main_page=product_info&cPath=35&products_id=333
Other
272 stars 209 forks source link

breakouttouchpaint not compiling for Due #6

Open jtouch opened 10 years ago

jtouch commented 10 years ago

I get the following errors. It seems like the TouchScreen library assumes different types than are used in the Due. Is there a simple fix for this?

Arduino: 1.5.6-r2 (Windows 8), Board: "Arduino Due (Programming Port)"

TouchScreen.cpp: In member function 'TSPoint TouchScreen::getPoint()': TouchScreen.cpp:57: error: invalid conversion from 'Pio* const' to 'uint8_t' TouchScreen.cpp:58: error: invalid conversion from 'Pio* const' to 'uint8_t' TouchScreen.cpp:59: error: invalid conversion from 'Pio* const' to 'uint8_t' TouchScreen.cpp:60: error: invalid conversion from 'Pio* const' to 'uint8_t'

I fixed this by changing "uint8_t" to "Pio".

Not sure if there's a fix that is compatible with other devices.

jtouch commented 10 years ago

Found out the issue - the Due does not support the direct port writes used here.

Also, the code has a number of other bugs that made it nonfunctional.

I've checked in a version that works on the Due and fixes the bugs for non-due variants even when direct port writes are used.