Library to control a Graphics TFT connected to 4-wire SPI - revised for the Raio RA8875 Display Controller.
Dependents:
FRDM_RA8875_mPaint
RA8875_Demo
RA8875_KeyPadDemo
SignalGenerator
... more
Fork of
SPI_TFT
by Peter Drescher
2 comments:
Sorry I didn't see this before, the mbed system didn't notify me...
Please see the simple example for SetOrientation
I am reasonably confident it worked as documented. If you feel it doesn't, please let me know what display (resolution) you have, and which rotations worked, etc. A small sample of code would be most appreciated to help me focus specifically on this.
I just ran a test, and screen rotation works fine. This was on a 480 x 272 display. Below is the exact program I used.
Just to be clear, this is not "font rotation". In other words, I do not have a means to write text onto a single screen with both horizontal and vertical orientation. This is a screen rotation which completely changes the orientation of the lcd control.
Please make sure your library is version 100 or newer (when some changes for rotation were made). I tested this with the latest (v141).
#include "mbed.h" // v122
#include "RA8875.h" // v125
RA8875 lcd(p5, p6, p7, p12, NC, "tft");
#define LCD_C 16 // color - bits per pixel
#define LCD_W 480
#define LCD_H 272
int main()
{
lcd.init(LCD_W, LCD_H, LCD_C);
lcd.Backlight(0.5f);
lcd.cls();
lcd.SetOrientation(RA8875::normal);
lcd.puts(30,30, "Normal Landscape");
wait_ms(2500);
lcd.cls();
lcd.SetOrientation(RA8875::rotate_90);
lcd.puts(30,30, "Rotated 90 Text\r\n");
wait_ms(2500);
lcd.cls();
lcd.SetOrientation(RA8875::rotate_180);
lcd.puts(30,30, "Rotated 180 Text\r\n");
wait_ms(2500);
lcd.cls();
lcd.SetOrientation(RA8875::rotate_270);
lcd.puts(30,30, "Rotated 270 Text\r\n");
wait_ms(2500);
while(1) {
; // end
}
}
Sorry I didn't see this before, the mbed system didn't notify me...
Please see the simple example for SetOrientation
I am reasonably confident it worked as documented. If you feel it doesn't, please let me know what display (resolution) you have, and which rotations worked, etc. A small sample of code would be most appreciated to help me focus specifically on this.