Fork of https://os.mbed.com/users/sebastiken/code/Adafruit_RA8875/ ; Adapted for use with K64F and in the process of adding more functions.
Diff: RA8875.cpp
- Revision:
- 1:ac22f0f36d6b
- Parent:
- 0:66c1aa3d198e
- Child:
- 2:040a687cea93
diff -r 66c1aa3d198e -r ac22f0f36d6b RA8875.cpp --- a/RA8875.cpp Fri Sep 08 14:05:04 2017 +0000 +++ b/RA8875.cpp Fri Sep 08 14:14:54 2017 +0000 @@ -63,12 +63,13 @@ */ /**************************************************************************/ Adafruit_RA8875::Adafruit_RA8875(PinName MOSI, PinName MISO, PinName SCLK, - PinName CS, PinName RST) + PinName CS, PinName RST, Serial *pc) : //Adafruit_GFX(800, 480) _cs(CS) , _rst(RST) , spi(MOSI, MISO, SCLK) { + pc = pc; } /**************************************************************************/ @@ -110,7 +111,7 @@ spi.frequency(spi_speed); uint8_t x = readReg(0); -// Serial.print("x = 0x"); Serial.println(x,HEX); + pc->printf("x = 0x"); pc->printf("%x\n" , x); if (x != 0x75) { return false; }