Update: working around this by creating and retrieving hard-coded calibration data, per the wiki. I am not needing general calibration, as the touch/LCD are physically matched (aside from the flipped/inverted Y). Now have this in my custom board_framebuffer.h:
// Force in calibration data, to compensate for hardware configuration
float calibrationData[] = {
1, // ax: no change
0, // bx: no change
0, // cx: no change
0, // ay
-1, // by: flip Y axis
SCREEN_HEIGHT-1 // cy: flip Y axis
};
gBool LoadMouseCalibration(unsigned instance, void *data, gMemSize sz)
{
if( sz != sizeof( calibrationData ) || instance != 0 ) {
return FALSE;
}
memcpy( data, (void *)&calibrationData, sz );
return gTrue;
}
However, this is not ideal as now every single touch/movement now has costly floating-point math overhead.
I am open to suggestions on a lower-overhead (yet consistent) way of handling touch hardware that is flipped/inverted.
Thanks.