grease_lighting
Well-known member
@Joey120373 Buy Display wrote their code in that funky way as it is used as a driver. I don't understand C-code very much, but that is my take on it.
The Skalwar code throws the errors because the delay is before the I2C endTransmission. I too found the Buy Display code for the Due functions just fine on a T3.2 & T3.5. Skalwar's code was written for a Linux device, but I don't understand why it is different, yet looks so familiar.
When I first purchased the 5-inch display, I noted the data sheet had some errors in pin outs. The connection diagram was correct while the data sheet had pins swapped. I believe Buy Display has fixed that issue.
My solution to all those lines of code was to make 2 programs out if it. One to load the GSL code into an I2C EEPROM and a second to read the EEPROM and send it to the touch controller. Maybe someday I'll figure out how to write it into an acceptable driver. If you look at that long table of numbers, the first byte is an GSL address and the next 4-bytes are the data to be loaded into the GSL. The data is sent to the GSL in an <address><data> format.
I like your shifting method for the Y value. I resorted to just subtracting 4100 in my code.
The Skalwar code throws the errors because the delay is before the I2C endTransmission. I too found the Buy Display code for the Due functions just fine on a T3.2 & T3.5. Skalwar's code was written for a Linux device, but I don't understand why it is different, yet looks so familiar.
When I first purchased the 5-inch display, I noted the data sheet had some errors in pin outs. The connection diagram was correct while the data sheet had pins swapped. I believe Buy Display has fixed that issue.
My solution to all those lines of code was to make 2 programs out if it. One to load the GSL code into an I2C EEPROM and a second to read the EEPROM and send it to the touch controller. Maybe someday I'll figure out how to write it into an acceptable driver. If you look at that long table of numbers, the first byte is an GSL address and the next 4-bytes are the data to be loaded into the GSL. The data is sent to the GSL in an <address><data> format.
I like your shifting method for the Y value. I resorted to just subtracting 4100 in my code.