Complete rotation support for the Adafruit PiTFT 2.8″ capacitive touchscreen display

In my previous post, I introduced the PiTFT 2.8″ capacitive touchscreen display and showed some test code. If you played around with that, you might have noticed that with the default /boot/config.txt setting of rotate=90 the display is a landscape mode.